iframe and execCommand

A

am75

Hi everybody,
I'm developing web pages for content management using iframes, through
which users can edit html portions... I found execCommand to apply
simple formats (bold, italic...) to text.
Is there a command to pass to execCommand for applying a style through
a class attribute to the text? Does anyone know where can I find a
reference with all the possible commands to execCommand? And also a
reference to what is standard and what is not about atrributes and
methods of the iframe element in javascript?
And, in your opinions, are iframes (used with the designMode property
setted on) the best choice for content management?
Thanks,

Alessio
 
V

VK

where can I find a reference with all
the possible commands to execCommand

You go to http://www.google.com, type in "execCommand" in the search
box and press "I'm Feeling Lucky" button. This tricky procedure will
bring you to:

<http://msdn.microsoft.com/library/d...uthor/dhtml/reference/methods/execcommand.asp>

;-)

a reference to what is standard and what is not
about atrributes and methods of the iframe element in javascript

<http://www.mozilla.org/docs/dom/domref/dom_frame_ref13.html>
Whatever you see there is standard, whatever you don't is
browser-specific.

But it really should not bother you as both designMode and execCommand
are IE-exclusive, so your program will work only under IE and NN 8 (in
"IE mode") anyway. So you better use this link instead:
<http://msdn.microsoft.com/library/d...hop/author/dhtml/reference/objects/iframe.asp>
 
J

Jc

am75 said:
Hi everybody,
I'm developing web pages for content management using iframes, through
which users can edit html portions... I found execCommand to apply
simple formats (bold, italic...) to text.
Is there a command to pass to execCommand for applying a style through
a class attribute to the text? Does anyone know where can I find a
reference with all the possible commands to execCommand? And also a
reference to what is standard and what is not about atrributes and
methods of the iframe element in javascript?
And, in your opinions, are iframes (used with the designMode property
setted on) the best choice for content management?
Thanks,

Alessio

Assuming you can find one that meets your needs, you may want to
consider using an open source editor, such as ones found at:
http://www.cmsreview.com/WYSIWYG/OpenSource/Directory.html
 
M

Martin Honnen

VK said:
But it really should not bother you as both designMode and execCommand
are IE-exclusive,

That is not true, Mozilla since 1.4 supports designMode and execCommand
for editable iframes.
 

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

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top