Hi
I want to restrict any formating related to colour and font size. Although I have disable those control in FCK editor, but when I am using 'Ctrl+V' I am able to paste text with all those formating.
Is there any way to disable formating when pasting using 'Ctrl+V' or how to rermove the formating tags from the html output.
Thanks & Regards,
Suchi
I want to restrict any formating related to colour and font size. Although I have disable those control in FCK editor, but when I am using 'Ctrl+V' I am able to paste text with all those formating.
Is there any way to disable formating when pasting using 'Ctrl+V' or how to rermove the formating tags from the html output.
Thanks & Regards,
Suchi
Re: Removing selective formating when pasting using Ctrl+V
If someone do find the anwser of this one, I'll be very gratefull for the way to do so
Re: Removing selective formating when pasting using Ctrl+V
I found the solution myself
I modified the FCKeditor_2.5.1\fckeditor\editor\dialog\fck_paste.html. Most of the code is already available. I modified them as per my requirements. Some examples:
html = html.replace( /\s*style="\s*"/gi, '' ) ;
html = html.replace( /<SPAN\s*[^>]*>\s* \s*<\/SPAN>/gi, '' ) ;
html = html.replace( /<SPAN\s*[^>]*><\/SPAN>/gi, '' ) ;
html = html.replace( /<FONT\s*>(.*?)<\/FONT>/gi, '$1' ) ;
html = html.replace( /<H1([^>]*)>/gi, '<div><b>' ) ;
html = html.replace( /<H2([^>]*)>/gi, '<div><b>' ) ;
Hope this is helpful
Regards,
Suchi