I am creating a plugin to designate highlighted text for deletion when the user submits (like Word does). The plugin itself initializes correctly but I'm having trouble selecting the highlight code and surrounding it with tags, like <remove>this text will be deleted</remove>.
I tried reading the code for fck_replace.html but it's too overwhelming for me to narrow down the exact lines of code I would need.
I tried reading the code for fck_replace.html but it's too overwhelming for me to narrow down the exact lines of code I would need.
var FCKRedline = function() { this.name = 'Redline'; } FCKRedline.prototype ={ Execute:function() { FCKUndo.SaveUndoStep(); /************ need to put in highlighted text tags here **********/ }, GetState:function() { if (FCK.EditMode!=0) return -1; return FCK.GetNamedCommandState('Redline'); } } FCKCommands.RegisterCommand( 'Redline', new FCKRedline() ) ; var oRedline = new FCKToolbarButton( 'Redline', FCKLang['DlgInsertHrLineBtn'] ) ; oRedline.IconPath = FCKPlugins.Items['Redline'].Path + 'icon.gif' ; FCKToolbarItems.RegisterItem( 'Redline', oRedline ) ;
Re: Selecting Highlighted Text for Plugin
Try my 'HOWTO - Work with the selection in the editor', viewtopic.php?f=6&t=806