Hello,

I'm using Mozilla 1.7 and have an editable document in a frame for a web page of mine. The best way to explain this, I think, is with an example.

In my editable document (document.body). I have some content that a user can edit:

----------------------------------------------
Html view:

This is a formatting test.
Oh such formatting we can do!

Code view:

<div>This is a formatting test.</div>
<div>Oh such formatting we can do!</div>
----------------------------------------------

If the user puts the cursor at the end of the first line like so:

----------------------------------------------
Html View:

This is a formatting test.|<-----[cursor]
Oh such formatting we can do!
----------------------------------------------

And they press backspace this is what the editor does:

----------------------------------------------
Code view:

<>This is a formatting test. Oh such formatting we can do!</>
----------------------------------------------

Needless to say this is not what I was hoping for. It does this for both div and p tags.

The current way I deal with this is search the document for <> when the delete or backspace key is hit. Obviously that is a bad work around. Is there a better way of dealing with this?

Thanks for your time.




_______________________________________________ mozilla-editor mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-editor

Reply via email to