Hi, the editor seems just great, but I have a question. I would like to get the basic editor, I want to let people only post simple and basic stuff, no HTML allowed.
This is exactly what I'm looking for : http://www.fckeditor.net/demo/toolbar?toolbar=Basic ...
... BUT if you take some text from an email, a word document, and paste it on the editor, it will keep all the text formatting (tables included, etc.). I need to copy it on notepad before pasting it on the editor to loose all text formatting. Is there a way/config to auto remove all this automatically ... like a real textarea?
All I want to do it let people making bold text, lists and hyperlinks, like the basic editor BUT removing automatically all text formatting.
Thanks
Tue, 11/11/2008 - 14:14
#1
Re: remove html code
Perhaps the ForcePasteAsPlainText option is what you're looking for?
see http://docs.fckeditor.net/FCKeditor_2.x ... sPlainText
Re: remove html code
I'm having the same problem.
But i'm implementing FCK this way:
<?
$oFCKeditor = new FCKeditor('evidence') ;
$oFCKeditor->Height = '200';
$oFCKeditor->Width = '420';
$oFCKeditor->ToolbarSet = 'Custom_2';
$oFCKeditor->BasePath = '/admin/fckeditor/';
$oFCKeditor->Value = $evidence;
$oFCKeditor->Create() ;
?>
How can I set the ForcePasteAsPlainText value if working this way?
Thanks,
Mark.
Re: remove html code
Hi Mark,
See http://docs.fckeditor.net/FCKeditor_2.x ... on_Options
So that would be:
Re: remove html code
Cool! Thanks!

Now a more complex question I think..
Ideally it would be nice to paste text from word and remove all formatiing, but keep <P> <B> <STRONG> <I> <EM> en <A HREF> tags, but still removing formatting from them if used any..
If you would have something like this, people can copy from wherever (word, html,...) and the text will automatically take over the websites style when publically shown..
Actually this is something I seem to miss in all editors I ever tried (tinyMCE, FCK,...).
Maybe I'm asking too much!
Best regards,
Mark.
Re: remove html code
There no out-of-the-box solution, but there editor allows you to create you own function with a plugin. If you do this, name the function 'CustomCleanWord' and put it on the editorInstance/FCK object, then the editor will use it over the default 'CleanWord' function (see why in file 'fckeditor\editor\dialog\fck_paste.html' line 121). You can base your function on the existing 'CleanWord' function, which can be found in file 'fckeditor\editor\dialog\fck_paste.html' line 185.
Paul
Re: remove html code
Thanks Paul.
Little bit too complicated for me I'm afraid
But thanks anyway!
Mark.
Re: remove html code
... I offer freelance development
Re: remove html code
Ok, I'm almost where I want to be, take a look : http://www.net-cube.ca/fckeditor/test1.php
But, what I would really ... really like, is that it would remove exactly all text formatting like it does now, pasting it as plain text EXCEPT for the availaible buttons on the toolbar (take a look at the buttons on the toolbar).
I would like to keep the formatting ONLY for;
POINT A
- Bold
- Italic
- Underline
- Font color
- Ordered list
- Unordered list
- Hyperlink (a href, a name and a mailto)
- text alignment (left, center, right, justify)
I would like to be able to paste this from at minimum;
POINT B
- a webpage
- a word document
- a pdf file
All pasted text must be parsed and purged from text formatting EXCEPT for text formatting in POINT A if it comes from documents types in POINT B, if the copy does not come from POINT B, paste as plain text only.
Is that something possible??
saul11 : you still make some freelancing?? Interested???