http://archon.org
for (var i = 0; i < parent.frames.length; ++i ) if ( parent.frames[i].FCK ) parent.frames[i].FCK.UpdateLinkedField();
FCK.DataProcessor =
{
ConvertToHtml : function( data )
{
...
// [url]
data = data.replace( /\[url\](.+?)\[\/url]/gi, '<a href="$1">$1</a>' ) ;
data = data.replace( /\[url\=([^\]]+)](.+?)\[\/url]/gi, '<a href="$1">$2</a>' ) ;
...
return '<html><head><title></title></head><body>' + data + '</body></html>' ;
},
ConvertToDataFormat : function( rootNode, excludeRoot, ignoreIfEmptyParagraph, format )
{
...
// [url]
data = data.replace( /<a .*?href=(["'])(.+?)\1.*?>(.+?)<\/a>/gi, '[url=$2]$3[/url]') ;
...
return data ;
},
...
} ;
Re: Need help with equivalent to updateLinkedEditor and BBCode
function updateeditor() { var textareas = $('textarea'); $.each(textareas, function () { var idname = $(this).attr('id'); var editor = CKEDITOR.instances[idname]; $(this).val(editor.getData()); }); }This is run right before submitting the form via ajax. So now the only remaining issue is where to edit the CKEditor to add the BBCode support.