Hi there,
I'm currently having some issues with the editor. It may just be me, but I feel that there's a serious issue with the documentation for fckeditor, with very little explanation for each config option and how and where (which file) it can be used.
1. First thing is that I'm trying to protect php tags (and some others like div) in my pages. I know that I should be able to use the ProtectedTags option but it doesn't work for me. Here's how I'm using it before $oFCKeditor->Create(); :
$oFCKeditor->Config['ProtectedTags'] = 'div|?php';
But this hangs the page whilst it's loading. What am I doing wrong?
2. I would like to use ProtectedSource option but again, have no idea how. All the wiki says it that I can use it, but not how. I assumed something like this would work but it doesn't:
$oFCKeditor->Config['ProtectedSource'] = 'php';
I'm guessing I'm completely wrong on this.
Don't get me wrong - I'm very grateful for fckeditor. It's by far the best I've tried, and very good.
However, I don't understand how people implement it without problems. I would trade 90% of the features for an editor that will always put out clean valid xhtml, and not allow users to mess up their pages beyond repair without going into the source view.
I've got it running in my CMS and about half the time someone edits a page, there are issues and I have to go through the source cleaning it up.
Pasting in from word doesn't seem to remove half the formatting it should as it's still a big mess after doing this. Pasting in as plain text seems to leave div tags in and stuff, so again I have to go and clean it up. Surely it should be literally plain text with ALL tags removed? I've had tags repeated like 8 times round an item before like <strong><strong><strong><strong><strong><strong>some-text</strong></strong></strong></strong></strong></strong> and then these are repeated in all subsequent paragraphs. How has the editor gone on so long with these issues intact?
Also the code putout is far from valid as is claimed. Depreciated tags like <font> and tags getting nested where they shouldn't like <p><h2><h1></h1></h2></p> contributes mostly to this.
The editor is obviously in use all over the place, which makes me wonder how people deal with these issues? I'm looking to put my cms out to a large number of clients but if I do that now I'm going to be answering support calls all day.
Can anyone give me some tips on how to limit and 'protect' the editor so that there will be very few issues with the code produced?
I'm currently having some issues with the editor. It may just be me, but I feel that there's a serious issue with the documentation for fckeditor, with very little explanation for each config option and how and where (which file) it can be used.
1. First thing is that I'm trying to protect php tags (and some others like div) in my pages. I know that I should be able to use the ProtectedTags option but it doesn't work for me. Here's how I'm using it before $oFCKeditor->Create(); :
$oFCKeditor->Config['ProtectedTags'] = 'div|?php';
But this hangs the page whilst it's loading. What am I doing wrong?
2. I would like to use ProtectedSource option but again, have no idea how. All the wiki says it that I can use it, but not how. I assumed something like this would work but it doesn't:
$oFCKeditor->Config['ProtectedSource'] = 'php';
I'm guessing I'm completely wrong on this.
Don't get me wrong - I'm very grateful for fckeditor. It's by far the best I've tried, and very good.
However, I don't understand how people implement it without problems. I would trade 90% of the features for an editor that will always put out clean valid xhtml, and not allow users to mess up their pages beyond repair without going into the source view.
I've got it running in my CMS and about half the time someone edits a page, there are issues and I have to go through the source cleaning it up.
Pasting in from word doesn't seem to remove half the formatting it should as it's still a big mess after doing this. Pasting in as plain text seems to leave div tags in and stuff, so again I have to go and clean it up. Surely it should be literally plain text with ALL tags removed? I've had tags repeated like 8 times round an item before like <strong><strong><strong><strong><strong><strong>some-text</strong></strong></strong></strong></strong></strong> and then these are repeated in all subsequent paragraphs. How has the editor gone on so long with these issues intact?
Also the code putout is far from valid as is claimed. Depreciated tags like <font> and tags getting nested where they shouldn't like <p><h2><h1></h1></h2></p> contributes mostly to this.
The editor is obviously in use all over the place, which makes me wonder how people deal with these issues? I'm looking to put my cms out to a large number of clients but if I do that now I'm going to be answering support calls all day.
Can anyone give me some tips on how to limit and 'protect' the editor so that there will be very few issues with the code produced?
RE: Various problems I'm having - please help
That protected tags is probably crashing due to the ? -- as for protected source you need to use RegEx like:
FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side code.
You can find this in fckconfig.js
The other issues you mention are mostly due to the browser's internal rich editor, the one in IE uses old frontpage architecture, and the one in Firefox is not a whole lot better. I personally use server side code to clean up a lot of the dirty HTML, but even that is not foolproof. In any case, its widely used because its pretty good at what it does, but none of these types of apps are going to be perfect.
About the best I've come across is: http://xopus.com/ But its cost prohibitive.
RE: Various problems I'm having - please help
bit in the php config instead like:
$oFCKeditor->Config['ProtectedSource'] = '/<\?[\s\S]*?\?>/g';
or something? (I don't know how to do the '.Add' bit in php)
RE: Various problems I'm having - please help
As mentioned before, I'd trade most of fckeditor's features for perfect, valid, non destructive editing.