1) I want my enterMode to be set to P (default behavior) 2) Without entering a new line, meaning simply typing "Hello", shows in the source as <p>Hello</p> 3) The editor will always wrap it with <p> (no clue why!)
Remember that I do *not* want to change the enterMode behavior, because I want it to use <p> whenever I enter a new line. However, in this case, the <p> is added wrapping my entire line.
If I changed the source and replaced the added <p> with <div> it seems to keep it that way, however, that doesn't help me as <div> is a block element, which I am trying to avoid. Replacing it with <span> or <em> or <strong> does not prevent the editor from wrapping the whole thing with <p>.
I have searched the web, docs and this forum for an answer but without results.
Anyone found a solution (or a hack in the code) that fixes this issue?
I also am interested in a solution for this. E.g. when I click in an empty editor and add a table, the table always has a <p> </p> as ancestor. That's not what I want
Changing the enterMode to 'br' helps in that way that you can click in an empty text window without <p> directly being executed. However if you type a few characters and press backspace intill they all are erased you will see the <p> coming up. This happens only in IE.
1) I want my enterMode to be set to P (default behavior) 2) Without entering a new line, meaning simply typing "Hello", shows in the source as <p>Hello</p> 3) The editor will always wrap it with <p> (no clue why!)
Remember that I do *not* want to change the enterMode behavior, because I want it to use <p> whenever I enter a new line. However, in this case, the <p> is added wrapping my entire line.
If I changed the source and replaced the added <p> with <div> it seems to keep it that way, however, that doesn't help me as <div> is a block element, which I am trying to avoid. Replacing it with <span> or <em> or <strong> does not prevent the editor from wrapping the whole thing with <p>.
I have searched the web, docs and this forum for an answer but without results.
Anyone found a solution (or a hack in the code) that fixes this issue?
Thank you for your time and efforts.
I agree! This is the same issue I would like to solve. I want to be able to turn off the wrapping <p></p> paragraph tags, yet still be able to keep my enterMode behavior set to enter <p> for when the user wants a <p> inserted when they click "enter".
albeik wrote: 1) I want my enterMode to be set to P (default behavior) 2) Without entering a new line, meaning simply typing "Hello", shows in the source as <p>Hello</p> 3) The editor will always wrap it with <p> (no clue why!) ....
I agree! This is the same issue I would like to solve. I want to be able to turn off the wrapping <p></p> paragraph tags, yet still be able to keep my enterMode behavior set to enter <p> for when the user wants a <p> inserted when they click "enter".
Makes sense. I wouldn't want my contents littered with hard breaks where they are not needed either. That would make it really hard to get nicely flowing contents when rendered in boxes with varying widths.
I have no clue why you wouldn't want the contents to be wrapped in a paragraphs in that case, it makes perfect sense since a single line is... well, a single paragraph! You did want HTML, right?
Should the first row not be a paragraph, but the second, third, fourth etc rows should be paragraphs? Or should single line contents not be paragraphs, but multi-line contents should? Seems a bit in-consequent to me.
One thing I do find odd is that an empty paragraph like
<p> </p>
is not removed when it is the only thing in the editor. They appear as soon as the editing area is clicked and then refuses to go away. Anything saved with the editor will then be non-empty strings and fail any test like
if (empty($theContents)) {
print 'Default text or empty validation failed message';
}
else {
print $theContents;
}
Re: auto paragraph function
What i'm looking for is to avoid the <p></p> tags that editor add by itself when you add some content.
Re: auto paragraph function
Add this in the config.js file :
Some docs : http://docs.cksource.com/ckeditor_api/s ... .enterMode
Re: auto paragraph function
It keeps enclosing my content between <p> tags.
Re: auto paragraph function
1) I want my enterMode to be set to P (default behavior)
2) Without entering a new line, meaning simply typing "Hello", shows in the source as <p>Hello</p>
3) The editor will always wrap it with <p> (no clue why!)
Remember that I do *not* want to change the enterMode behavior, because I want it to use <p> whenever I enter a new line. However, in this case, the <p> is added wrapping my entire line.
If I changed the source and replaced the added <p> with <div> it seems to keep it that way, however, that doesn't help me as <div> is a block element, which I am trying to avoid. Replacing it with <span> or <em> or <strong> does not prevent the editor from wrapping the whole thing with <p>.
I have searched the web, docs and this forum for an answer but without results.
Anyone found a solution (or a hack in the code) that fixes this issue?
Thank you for your time and efforts.
Re: auto paragraph function
Thanks anyway.
Re: auto paragraph function
Re: auto paragraph function
I also am interested in a solution for this. E.g. when I click in an empty editor and add a table, the table always has a <p> </p> as ancestor. That's not what I want
Thanks for any help on this!
Re: auto paragraph function
Re: auto paragraph function
Having exactly the same problem (only in IE; not in FF, Opera, Safari or Chrome) I wonder if someone allready found a solution for this problem?
Re: auto paragraph function
Re: auto paragraph function
Re: auto paragraph function
I agree! This is the same issue I would like to solve. I want to be able to turn off the wrapping <p></p> paragraph tags, yet still be able to keep my enterMode behavior set to enter <p> for when the user wants a <p> inserted when they click "enter".
Re: auto paragraph function
One thing I do find odd is that an empty paragraph like is not removed when it is the only thing in the editor. They appear as soon as the editing area is clicked and then refuses to go away. Anything saved with the editor will then be non-empty strings and fail any test like
Re: auto paragraph function
Be sure that we had good reason for the auto paragraphing feature, but in case you find it sucks, a ticketis opened for introducing this flexibility.