The most troublesome part about how the ENTER key is implemented in IE, is that it is not consistent. While it usually replaces the <P> tags with <DIV> it does not always do so.
What about using CSS to correct the ugly <P> tags in IE, and then not replacing the <P> with <DIV>? For example (from RTE_javascript.asp):
iframeContent += '<style>\n';
iframeContent += 'html,body{border: 0px;}\n';
iframeContent += 'p{margin:0px 0px 0px 0px;}\n';
iframeContent += '</style>\n';
Obviously the display would have to use the same paragraph style.... so perhaps this is not such a great idea?
Alternatives in the setup file for handling ENTER in IE would be beneficial I would think.
Truth be told I would greatly prefer <BR> if it were at all feasible...
-boRg- wrote:
Placing the onclick event on the reset button could be a problem when people intergarte the RTE into their own form
|
What about this (also from RTE_javascript.asp):
//resetting the form
textArea.form.onreset = function(){
if (window.confirm('WARNING! This will erase any changes you have made.')){
editor.body.innerHTML = textArea.value;
self.focus();
return true;
}
return false;
}
Note: I also made a couple of changes with this function so that it would perform more like a standard reset button.
This has improved some of the peculiarities in IE for me. I don't know if this is really advantageous over using the OnClick event on the reset button, however.
****************************
I still experience a very annoying "bug" (in MSIE of course), where if I:
#1) start with an empty editor
#2) type text
#3) BACKSPACE over the text so the editor is again empty
#4) type text
1 or 2 odd things will happen:
1: the textarea will begin with <P> <P> --- the <P> tags occur without pressing ENTER .. which is why they are not being captured and replaced.
2: I occasionally get text with a white background .. or less frequently a gray background.