The most simple sytuation,
When I fire examples of FCKeditor in "FCKeditor - JavaScript - Sample 1" if I want to have a simple image added image in HTML mode to my editor. I place sth like:
<img src="some_image.jpg" alt="">
When I switch between WYSIWYG/HTML View there are <p> tags wraping my image.
<p><img src="some_image.jpg" alt=""></p>
Is there any way to get rid of that <p> (paragraph)?
Best Regards
Mikolaj
When I fire examples of FCKeditor in "FCKeditor - JavaScript - Sample 1" if I want to have a simple image added image in HTML mode to my editor. I place sth like:
<img src="some_image.jpg" alt="">
When I switch between WYSIWYG/HTML View there are <p> tags wraping my image.
<p><img src="some_image.jpg" alt=""></p>
Is there any way to get rid of that <p> (paragraph)?
Best Regards
Mikolaj
RE: Auto <p> tags? How to get rid of them?
RE: Auto <p> tags? How to get rid of them?
Looking for
else
{
if (FCKConfig.IgnoreEmptyParagraphValue&&C.body.innerHTML=='<P> </P>') B='';
else B=FCKXHtml.GetXHTML(C.body,false,A);
};
Replace with
{
if (FCKConfig.IgnoreEmptyParagraphValue&&C.body.innerHTML==' ') B='';
else B=FCKXHtml.GetXHTML(C.body,false,A);
};
Good luck.
RE: Auto <p> tags? How to get rid of them?
this doesen't work, at least not for me, i realy need to fix fck to stop inserting paragraphs, it's driving me nuts
there surely must be a solution to this somewhere out there?
RE: Auto <p> tags? How to get rid of them?
By the way, for the basics configuration question
Did you change
FCKConfig.EnterMode = 'p' ; // p | div | br
FCKConfig.ShiftEnterMode = 'br' ; // p | div | br
to
FCKConfig.EnterMode = 'br' ; // p | div | br
FCKConfig.ShiftEnterMode = 'br' ; // p | div | br
?
You have to change that to make it insert <br /> instead of annoying <p> tag
RE: Auto <p> tags? How to get rid of them?
i'm not realy good with JS... but why sould this matter? FCKConfig.EnterMode if i understand it right is to make (p | div | br) when you press enter and the other solution with "if (FCKConfig.IgnoreEmptyParagraphValue&&C.body.innerHTML=='<P> </P>')..." is for FCK to remove empty paragraphs or to ignore em...

problem i have is when i type anything in FCK even one line of text and than save or change WYSIWYG/HTML view, it warps that single line in <p></p> tags which i can only remove if i edit it and manualy deleate it in FCK source mode and save right after, problem with this is whenever i re-edit the imput it gets warped in <p></p> again....
not sure if i described the problem right, but i realy need to get rid of those &$&^$^%#$ paragraphs
Re: Auto <p> tags? How to get rid of them?
FCKConfig.EnterMode = 'p' ; // p | div | br
FCKConfig.ShiftEnterMode = 'br' ; // p | div | br
The problem I'm having is that the editor changes (or fixes??) the markup upon submission. Before submitting, my source is this:
After submitting, FCKEditor changes it to:
This happens without typing anything. Is there a way to turn this "fix html" or auto-paragraph feature off?