A simple wysiwyg editor (IE, FF, O, S)

P

Peter Michaux

Hi,

I took apart an existing wysiwyg editor to try to learn how they work
and some of the important issues. The following url has my current
version that seems to work in Safari 2 and Firefox 2. It partly works
in Opera 9 and doesn't work in Internet Explorer 6. This demo uses a
hidden iframe containing a document in design mode.

<URL: http://peter.michaux.ca/temp/rte/example.html>

In Opera 9 it is possible to select some of the wysiwyg text and click
one of the toolbar options (bold etc) and have the desired affect take
place. However when nothing is selected, clicking on a toolbar option
is different than in Safari and Firefox. The click makes the iframe
loose focus and the desired formatting does not occur when typing again
in the place where the cursor was when clicking the toolbar option.

In IE 6 when clicking one of the toolbar options the iframe looses
focus and the desired formatting does not happen.

When I refresh the page in IE 6 I see a permission denied error when
the code tries document.open() on the iframe document. I don't know and
am curious why refreshing and the first load are different in this
situation.

Any info greatly appreciated.

Thank you,
Peter
 
P

Peter Michaux

Peter said:
I took apart an existing wysiwyg editor to try to learn how they work
and some of the important issues. The following url has my current
version that seems to work in Safari 2 and Firefox 2. It partly works
in Opera 9 and doesn't work in Internet Explorer 6. This demo uses a
hidden iframe containing a document in design mode.

<URL: http://peter.michaux.ca/temp/rte/example.html>

In Opera 9 it is possible to select some of the wysiwyg text and click
one of the toolbar options (bold etc) and have the desired affect take
place. However when nothing is selected, clicking on a toolbar option
is different than in Safari and Firefox. The click makes the iframe
loose focus and the desired formatting does not occur when typing again
in the place where the cursor was when clicking the toolbar option.

I think Opera just has problems still. It behaves this way in every
demo I have tried.

In IE 6 when clicking one of the toolbar options the iframe looses
focus and the desired formatting does not happen.

When I refresh the page in IE 6 I see a permission denied error when
the code tries document.open() on the iframe document. I don't know and
am curious why refreshing and the first load are different in this
situation.

I'm not really sure why the following works in IE but it does.

<URL: http://peter.michaux.ca/temp/mozrte/index.html>

Peter
 
D

Dr J R Stockton

In comp.lang.javascript message
Wed said:
I took apart an existing wysiwyg editor to try to learn how they work
and some of the important issues. The following url has my current
version that seems to work in Safari 2 and Firefox 2. It partly works
in Opera 9 and doesn't work in Internet Explorer 6.

<URL:http://www.merlyn.demon.co.uk/js-demos.htm#WHEd> is probably as
simple as a WYSIWYG HTML Editor can be, though it does not conform to
the usual expectation.

It's a good idea to read the newsgroup and its FAQ. See below.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top