When i editing some content using tinymce editor an unwanted empty <p> </p>
is saving at beginning and ending of the content. How i can remove this thanks in advance
views:
20answers:
1
A:
One way would be to change the code that returns HTML to first check the DOM of the editable area and if there is a wrapping P with no style or id or other attribute, then move all content of the P tag to the root and remove the P tag.
I have not tested this but I am investigating this for another editor we use for the exact same problem.
David Mårtensson
2010-10-22 12:34:19
is their any other way
THOmas
2010-10-22 12:42:00
Well, you have to make sure that the start P and end P in the HTML block are the same. Because you could have <p>jshdjshd</p><p>jhsdjshd</p> and in that case you do not want to remove the first and last P. Doing it from the htmlsource makes this much more difficult to parse.
David Mårtensson
2010-10-22 14:44:18