Opened 18 years ago
Closed 18 years ago
#529 closed Bug (invalid)
Editor wrapping code in P tags
Reported by: | tarek | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | FCKeditor 2.4.2 |
Keywords: | Cc: |
Description
I recently upgraded from version 2.3.2 to 2.4.2 and the editor is now adding code (i.e. formatting my html) in a new an undesirable way. It's adding P tags around content automatically, which negatively impacts my source code and formatting.
For example, it's turning this:
"<a href="xyz.com">"
Into this:
"<p><a href="xyz.com"></p>"
It happens in both IE and FF. It doesn't appear to happen when <p> or <div> tags are already surrounding my content.
I've seen some similar tickets opened about the editor adding <p> </p> to empty fileds, but this seems a little different, albeit potentially related.
If the EnterMode configuration is set to "p" or "div", you may expect that the content of paragraphs will always be enclosed inside a <p> or a <div>. So, the editor behaves accordingly.
If you instead don't want <p>s, just set the EnterMode='br' and no "paragraphization" will happen.