Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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(