is there a way to report back to a custom format dropdown so that it can display the name of format that is selected?
I have created a custom dropdown that sets a format to the selected text like this:
var fragment = editor.getSelection().getRanges().extractContents(); htmlString = '<span class="sapclass '+value+'"></span>'; container = CKEDITOR.dom.element.createFromHtml(htmlString, editor.document); fragment.appendTo(container); editor.insertElement(container);
where value is a css-StyleClass.
So is there a way to report the containing element (as element so that I can check further ancestors too) of the cursor to the plugin so that it can display the associated format?
Thanks in advance for any help