Closed (fixed)
Project:
FCKeditor - WYSIWYG HTML editor
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Oct 2007 at 16:23 UTC
Updated:
8 Nov 2007 at 07:41 UTC
It seems that when switching from Source mode to WYSIWYG mode *and* your html doesnt begin with a <p>, FCKEditor wraps the entire content with a <p> and </p>. This causes quite a few hiccups when you are editing a block with some PHP code in it.
Any way to disable this "feature"?
Comments
Comment #1
jadwigo commentedThis is a feature of the HTML sanitizing routines of FCKEditor... It is neccesary for many browsers that would otherwise just crash
One idea is to start with a blank paragraph, or any element (for example a
<div></div>)And maybe turning on the protected source (see fckeditor.config.js if
FCKConfig.ProtectedSource.Add( /<\?[\s\S]*?\?>/g ) ; // PHP style server side codeis there and enabled) might helpComment #2
tcconway commentedBrilliant! encasing it in a <div> works great. Any way to make that the default, as opposed to using <p>?
Comment #3
wwalc commentedYou need to change/add this:
FCKConfig.EnterMode = 'div' ; // p | div | br
FCKConfig.ShiftEnterMode = 'br' ; // p | div | br
in fckeditor.config.js
Comment #4
najibx commentedAlso, it automatically, created :
Which cause some spaces on the top on the content. I can remove it, but when edit, it will be there again.
Comment #5
wwalc commentedThis is created:
when in fckconfig.js you have:
Unless you edit page with all HTML headers etc., disable it:
Comment #6
najibx commentedHi wwalc,
Can you explain to me the meaning of "Unless you edit page with all HTML headers etc., disable it:".
Anyhow, I disable it, but it still there. BTW, I didn't have this issue before ...only after I upgrade to 2.5 Beta
I select the "Full HTML" input format :
* Web page addresses and e-mail addresses turn into links automatically.
* Lines and paragraphs break automatically.
Comment #7
wwalc commentedDrupal input filter has nothing common with that, it's a different thing.
The setting that cause troubles is FCKConfig.FullPage either inf fckconfig.js or fckeditor.config.js. You've probably changed it accidentically.
Add the following in fckeditor.config.js:
If nothing happens and your browser still shows:
purge your browser's cache and reopen it.
FCKConfig.FullPage should be set to true only if you edit full page (from <html> to </html>), but in Drupal you usually edit just the content of a block inside <body>.
Comment #8
najibx commentedIt's the browser's cache. This does the trick. Awesome. I am a happy man now ....
thanks man.
Comment #9
wwalc commented