So far I have figured out how to make dialogs, return values and insert new html and elements.
My comment sections are as follows:
I'm having a difficult time getting the editor to recognize that a particular section has a comment and adding the appropriate items to the context menu on right-click (similar to scayt, or links). I'm going through the scayt plugin code and coming up dry. Any shortcuts? code snippets?
My comment sections are as follows:
<span id="comment4" comment="this is a comment"> <p> This is some HTML. </p> </span>
I'm having a difficult time getting the editor to recognize that a particular section has a comment and adding the appropriate items to the context menu on right-click (similar to scayt, or links). I'm going through the scayt plugin code and coming up dry. Any shortcuts? code snippets?

Re: Working on a "Comments" Plugin
//Register it into the context menu if(editor.contextMenu) { editor.contextMenu.addListener(function(element, selection) //function to be run when context menu is displayed { if(! element || !element.is('span') || element.getAttribute('comment') == '') return null; return { commentPluginCommand: CKEDITOR.TRISTATE_OFF }; }); }Note that you might have to play around with what the attribute equals, since I don't remember if it comes back '', null or false.
Double click is basically the same process.
//Register this for double clicking on formulas editor.on( 'doubleclick', function( evt ) { var element = evt.data.element; if ( element.is( 'span' ) && element.getAttribute('comment') != '' ) evt.data.dialog = 'commentPluginCommand'; });Hope that helps. It's actually pretty easy once you get the hang of it!