SitePoint Sponsor |
|
User Tag List
Results 1 to 1 of 1
Thread: rte editor createRange()
-
Nov 13, 2007, 14:29 #1
- Join Date
- Jul 2007
- Posts
- 10
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
rte editor createRange()
hi,
i'm trying to solve a ie 6/7 problem using <br>, <p> tags in a RTE editor (like this one in the forum).
Pressing the Enter key in ie6/7 should automatically add a <p></p> tag around the text instead of a <br> after the text.
can anyone help me out how this could work
thanks
Code JavaScript:if(isIE) { if (iframeWindow.event.keyCode == 13) { range = myRTEdoc.selection.createRange(); range.pasteHTML("<br>"); range.select(); } }
Bookmarks