(.+?)<\/a>/gi, '[url=$2]$3[/url]') ;
// [b]
data = data.replace( /<(?:b|strong)>/gi, '[b]') ;
data = data.replace( /<\/(?:b|strong)>/gi, '[/b]') ;
// [i]
data = data.replace( /<(?:i|em)>/gi, '[i]') ;
data = data.replace( /<\/(?:i|em)>/gi, '[/i]') ;
// [u]
data = data.replace( //gi, '[u]') ;
data = data.replace( /<\/u>/gi, '[/u]') ;
// Remove remaining tags.
data = data.replace( /<[^>]+>/g, '') ;
return data ;
},
/*
* Makes any necessary changes to a piece of HTML for insertion in the
* editor selection position.
* @param {String} html The HTML to be fixed.
*/
FixHtml : function( html )
{
return html ;
}
} ;
// This Data Processor doesn't support , so let's use
.
FCKConfig.EnterMode = 'br' ;
// To avoid pasting invalid markup (which is discarded in any case), let's
// force pasting to plain text.
FCKConfig.ForcePasteAsPlainText = true ;
// Rename the "Source" buttom to "BBCode".
FCKToolbarItems.RegisterItem( 'Source', new FCKToolbarButton( 'Source', 'BBCode', null, FCK_TOOLBARITEM_ICONTEXT, true, true, 1 ) ) ;
// Let's enforce the toolbar to the limits of this Data Processor. A custom
// toolbar set may be defined in the configuration file with more or less entries.
FCKConfig.ToolbarSets["Default"] = [
['Source'],
['Bold','Italic','Underline','-','Link'],
['About']
] ;