How to use the survey-creator.SurveyPropertyModalEditor function in survey-creator

To help you get started, we’ve selected a few survey-creator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github surveyjs / surveyjs_angular_cli / src / app / survey.creator.component.ts View on Github external
afterRender: function(modalEditor, htmlElement) {
    var editor = window["CKEDITOR"].replace(htmlElement);
    editor.on("change", function() {
      modalEditor.editingValue = editor.getData();
    });
    editor.setData(modalEditor.editingValue);
  },
  destroy: function(modalEditor, htmlElement) {
    var instance = window["CKEDITOR"].instances[htmlElement.id];
    if (instance) {
      instance.removeAllListeners();
      window["CKEDITOR"].remove(instance);
    }
  }
};
SurveyCreator.SurveyPropertyModalEditor.registerCustomWidget(
  "html",
  CkEditor_ModalEditor
);

@Component({
  selector: "survey-creator",
  template: `
    <div id="surveyCreatorContainer"></div>
  `
})
export class SurveyCreatorComponent {
  surveyCreator: SurveyCreator.SurveyCreator;
  @Input() json: any;
  @Output() surveySaved: EventEmitter = new EventEmitter();
  ngOnInit() {
    SurveyKo.JsonObject.metaData.addProperty(

survey-creator

Use SurveyJS Creator to create or edit JSON for SurveyJS Form Library.

SEE LICENSE IN LICENSE
Latest version published 6 days ago

Package Health Score

81 / 100
Full package analysis