| Page 1 of 1 | [ 5 posts ] |
|
I've been trying to use
ptags: true in my yui editor config and it generates some strange behavior. It wraps the current line in <p></p> tags which is reasonable if you press return at the *end* of a line. However if you press it at the beginning or even at the middle of a line, it merely adds <p> </p> after the text of the current line. So for example if i place a cursor in a fresh editor window and alert out my html i get: html=<br> If i then type 'hello world' without pressing return i get: html=hello world<br> If i then press return it reformats visually and in terms of tags i get: html=<p>hello world</p><p> </p> This is still reasonable behavior as I pressed return at the end of the line, However if i back up my cursor and press return after 'hello' (ie in the middle of the line) i get: html=<p>hello world</p><p> </p><p> </p> So it ignores my cursor placement and always assumes im at the end of the line, this also means that if i attempt to back up to the beginning of the document and press return i get: html=<p>hello world</p><p> </p><p> </p><p> </p> So I can never place any content in its own paragraph or line before the existing content on the first line. Nor can I break up an existing paragraph into two paragraphs. Any thoughts? is this a known bug? Or can this be the way it's intended it to work? We've tried this both in our own code and in an example i made when testing the spellchecker found here: http://john.martirano.net/code/spelltest/test2/ you can reproduce the problem here, commenting out ptags: true fixes the problem. John |
|
I should add - the reason we want to use ptags is that we have a custom version of the editor which only embeds structural and semantic content, no styling. This is why paragraphs are desirable over br line-breaks which are often mis-used in attempts to create paragraphs, the result being that you cant tell where paragraphs begin or end. With using only ptags this problem is solved. So it is an important feature!
If there is no plan to solve this bug it would still be useful even if a veteran could give guidance on how we could go about overriding the 'return' event to achieve what we need. |
|
bump....
|
|
bump - still unsolved.
|
|
bump... still unresolved... anybody have any guidance??
is editor 3.0 slated to solve this issue? |
| Page 1 of 1 | [ 5 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© YUI Library - Site Credits
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group