Reputation: 3271
I want to create a custom self closing node in CKeditor, is there a way to do this? My code so far:
this.videoElement = editor.document.createElement('cfwvideo');
this.videoElement.setAttribute('src', videoSource);
editor.insertElement(this.videoElement);
Upvotes: 2
Views: 682
Reputation: 3271
Ah found it, you'll have to add the control name to the $empty list in CKEDITOR.dtd like this: CKEDITOR.dtd.$empty['cfwvideo'] = 1;
Upvotes: 2