You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a custom plugin which adds a an element via the insertNode call. However, even though the editor's data is being updated the model is not. The code is similar to the below with the attributes and html set from an object.
var editorSelection = editor.getSelection();
var editorRange = editorSelection.getRanges()[0];
var newAnchor = new CKEDITOR.dom.element('a', editor.document);
I created a custom plugin which adds a an element via the insertNode call. However, even though the editor's data is being updated the model is not. The code is similar to the below with the attributes and html set from an object.
var editorSelection = editor.getSelection();
var editorRange = editorSelection.getRanges()[0];
var newAnchor = new CKEDITOR.dom.element('a', editor.document);
newAnchor.setAttributes({
id: 'customId',
name: 'customName',
type: 'customType'
});
newAnchor.setHtml('customText');
editorRange.insertNode(newAnchor);