473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

iframe and execCommand

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

Jul 23 '05 #1
4 7127
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/default.asp?url=/workshop/author/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/default.asp?url=/workshop/author/dhtml/reference/objects/iframe.asp>

Jul 23 '05 #2
Jc
am75 wrote:
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/Ope...Directory.html

Jul 23 '05 #3


VK wrote:
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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #4
VK
> Mozilla since 1.4 supports designMode
and execCommand for editable iframes.


Oh! I didn't know it. Another "bonus" point for Mozilla Docs.

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Edd Read | last post by:
Hi, I have made a basic WYSIWYG editor using the execCommand functions. I use an iFrame as the editing area and so far I have managed to create documents from a blank page and save them to a...
3
by: Sharon | last post by:
Hi! I need help. I have a variable which is just a string containing the output of a transform from XML to CSV format. I want the client to be able to download this as a file (.csv), so I used...
1
by: Saint's Knight | last post by:
here is code that i use. <html> <head> </head> <body> <form> <input type=checkbox name=source value=1 OnClick="SourceCode(source.checked)">Source <input type=checkbox name=bold...
12
by: syedfasih | last post by:
I have created a text area using IFRAME. The problem is that it is working only in Internet Explorer not in Mozilla Firefox. Please help me regarding this problem. IS there any special command or tag...
23
by: abdalimohd | last post by:
hi all, i m developing an html editor for my web page since i cannot trace out the enter key press for the available html editors for asp.net app. now i have done everything that i need with this...
2
by: colinzhu | last post by:
I want to have the print dialog shown automatically after the the page is loaded, but when I try to call window.print() BEFORE the iframe, the print dialog is not shown at all. Anyone can help? ...
1
by: appleseed | last post by:
I'm having some problems on IE with a small editor I'm building. The source of the problem is the following: Consider having an iFrame with designMode="on" in which you select some text. When...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.