Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - RTE 3.0 b2 input/output to Access 2000
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedRTE 3.0 b2 input/output to Access 2000

 Post Reply Post Reply Page  <123>
Author
dj1811 View Drop Down
Newbie
Newbie


Joined: 11 February 2005
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj1811 Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2005 at 9:37pm

More on <P> bugs in MSIE 6.0.28 (have not tested other versions of MSIE):

Step 1) Reset Form
 
Step 2) Type the letter "A".  Switch to HTML view.  HTML formating is simply "A".
 
Step 3) Switch back to the RTE and backspace over the letter "A".  Then retype the letter "A".  Now switch to HTML view again.   HTML formating is something like "<P><FONT style="BACKGROUND-COLOR: #dadeda">A</FONT></P>"  From this point on paragraphs start misbehaving.   Rather than utilizing <BR> when the enter key is pressed -- (this works nicely in netscape) -- the RTE uses variably <P> or <DIV>; and also adds in background color to the text ... either #dadeda or #ffffff.
 
************
 
NETSCAPE 7.1 BUG:  Cannot delete tables in Netscape (can in MSIE)
 
************
 
Also, a minor "bug" is that files edited in Netscape then opened in MSIE cannot be fully edited.   While I didn't test this extensively, I notice that if alignment is centered in Netscape, then the file is saved and opened in MSIE the alignment is locked (because a different technique is used to perform the centering in each browser, presumably.)
Back to Top
dj1811 View Drop Down
Newbie
Newbie


Joined: 11 February 2005
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj1811 Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2005 at 10:03pm

I notice in RTE 2.0 & 3.0b2 there is a similarity in how the user pressing the ENTER key is handled.

Netscape does this very neatly:
 
text<BR>
text<BR>
etc..
 
MSIE does not do so well:
 
text<BR>
<DIV>text</DIV>
 
OR alternatively I get:
 
<P>text</P>
(a blank line in the editor here)
 
<DIV>text</DIV>
 
I think it would be great if MSIE handled the ENTER key the way Netscape did.
 
I suppose it is possible to format the text using replace(), as a workaround, i.e.:
 
<%
'if msie then...
strEditorContent = Replace(strEditorContent,"<DIV>","")
strEditorContent = Replace(strEditorContent,"</DIV>","<BR>")
'etc..
%>
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2005 at 4:00am
I'm afraid that most of these so called 'bugs' as you mention them are just something you have to live with until the built in RTE features of the various browsers are changed.

The Web Wiz RTE, uses the built in Rich Text Editing (RTE) features built into the web browser.

Mozilla and Microsoft have implemented RTE features in different ways in their respective browsers.

The implementation of their RTE features are very different, sometimes quite buggy, and both lack allot of simple features.

This makes it quite difficult witting an RTE editor, as it means that you have to try and get around the various quirks and bugs that are built into the browsers, and the biggest problem of all is what works in one browser doesn't often work in the other.

Microsoft's implantation of RTE features in IE is very sketchy, and you will find, like most MS software (just look at Words HTML), that it does completely re-write allot of HTML putting in allot of completely unwanted and useless tags.

This is just part of the browser and something that you just have to deal with.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2005 at 4:08am
To answer your question on IE handling the 'ENTER' key badly.

YES IT DOES Angry

This has been one of the biggest pains to over come.

In Microsoft implementation of RTE features in their browser they for some stupid reason decided that if you hit the 'ENTER' key it will put in a <p> tag.

This then leads to double line spacing Angry, unless for some strange reason you hit 'SHIFT -> ENTER', then it will insert a <br>

Many people have complained about this for years with IE, so from version 2 I wrote some code that uses the 'attachEvent' method so that when a key is pressed in the browser a function is run, if it finds that the key pressed is 'ENTER' it will override the normal <p> tag and instead put in <br>

This prevents the <p> double line spacing when 'ENTER' is pressed, but like everything in IE, the 'attachEvent' doesn't always for some reason intercept the keypress event.

Why does it do this? Who knows, but the sooner people realise what a naff browser IE is and move away for it, the sooner programming for developers will get easier.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2005 at 4:43am
Originally posted by dj1811 dj1811 wrote:

A bug found in MSIE 6.0.28:
 
Step 1) Press "Reset Form" button once, and it works normally.
 
Step 2) Enter a line of text then hit the "Enter" key so there is a blank line following text.
 
Step 3) Press "Reset Form" button again.
 
Step 4) Enter a line of text then hit the "Enter" key so there is a blank line following text.  BUG: Now the <P> tags are not being replaced by <BR>'s.
 
Step 5) Press "Reset Form" button one last time.
 
Step 6) Enter some text.  SECOND BUG: Now the text has a white background.
 


Been looking at trying to find solution to this for about an hour now.

It seems that in IE if you press 'RESET' and the cursor remains in the RTE area then the event listener to listen to key presses stops working so <p> are no-longer replaced.

However, if you use the mouse and click onto the RTE area, any time after hitting reset, the event listener starts to work again.

I have tried to find a solution to this, by trying to force the focus away from the RTE area, this way the user is forced to use the mouse to click back onto the RTE area, thus making the event listener work again, but so far this isn't working.
Back to Top
dj1811 View Drop Down
Newbie
Newbie


Joined: 11 February 2005
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj1811 Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2005 at 7:19pm

For testing purposes, I added this before the textarea:

<INPUT TYPE="text" NAME="bogus" SIZE='12'>
 
And then then modified the reset button to:
 
<INPUT TYPE="reset" NAME="reset" value="Reset Form" ONCLICK="document.myForm.bogus.focus();">
 
Essentially this takes the focus off the textarea when the form is reset and put's the focus in a "bogus" form field.  This does alleviate some of the problem but not entirely.  I still got white background text 1 time while testing (although I could not replicate it).
 
I'll see if I can find a fluid way of implementing this, but javascript is not my thing.
 
*********
 
Also, I notice this undesirable behavior in MSIE:
 
1) start with a blank form
2) type a letter
3) press ENTER -- the RTE uses <DIV> tags for the new line
3) backspace until the form is blank again
4) type a letter
5) press ENTER -- now the RTE uses ugly <P> tags for the new line
 
Are you using some script to replace <P> with <DIV>?  Or is this an MSIE bug?  I guess what I am wondering is .. what is the "normal" behavior for MSIE when ENTER is pressed?
 
Do you think it is possible to replace the ENTER key with <BR> instead of <P> or <DIV> in MSIE --- to duplicate the nice way that it works in netscape?  My javascript is weak, and I've never used attachEvent.  However, is it possible to do something like:
 
//if msie
function checkEnterKey(){
if(event.keyCode == 13)
{
//something here to write </br> .. my js stinks..
event.keyCode == 0
event.cancelBubble = true;
}
 
And then use onkeypress in the textarea?  Sorry for the terrible javascript, but you probably get the idea of what i'm trying to say.
 
Sorry for the bold .. but I just realized that I typed a lot of stuff .. and this really is the main question I have.
 
I thought about using replace() to reformat the MSIE text, but on looking at it further, this is no easy task in itself.
Back to Top
dj1811 View Drop Down
Newbie
Newbie


Joined: 11 February 2005
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj1811 Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2005 at 8:47pm
Hrm..
 
I just looked at the RTE_javascript.asp and I see that the textarea is actually being replaced by an inline frame.  All in all the whole mechanism is more complex than I imagined -- although I have a little better understanding now of how the editor works.
 
I see in your comments:
 
'If this is IE then detect if enter key is prssed then replace <p> with <br>
 
Then a few lines lower:
 
//Insert <div> instead of <p>
 
Like you changed your mind at some point in how to work with ENTER in MSIE.
 
I wonder -- keep in mind i am no js expert -- is it possible to capture and block keyCode(13) and instead run a function to simply write "<BR>" & vbCrLf ?   Rather than replacing the P tags?  Thanks for your time borg --- I'll stop pestering you now.   I really do appreciate all the work you've done and I can see where this program might come in handy!
 
Back to Top
dj1811 View Drop Down
Newbie
Newbie


Joined: 11 February 2005
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj1811 Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2005 at 9:28pm
Originally posted by dj1811 dj1811 wrote:

I'll see if I can find a fluid way of implementing this, but javascript is not my thing.

 
<INPUT TYPE="reset" NAME="reset" value="Reset Form" ONCLICK="self.focus();">
Back to Top
 Post Reply Post Reply Page  <123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.