SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Aug 17, 2003, 17:07 #1
- Join Date
- Jan 2003
- Location
- New York, NY
- Posts
- 125
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Problems with execCommand on FontName
I am attempting to write a wysiwyg text editor to use in back-end site administration forms. It's working pretty well, aside from one error: when I hilight a large block of text and change the font, the change only applies to portions of the text selected (which appears to be random portions). Here is the javascript I'm using:
Code:function applyFont() { document.all.rtEditor.focus(); document.execCommand("fontname", false, document.all.fontNameSelector.value); }
So I says to him, I says, Hey! Llama! How about a little something, you know, for the effort, you know?
-
Aug 17, 2003, 21:54 #2
- Join Date
- Feb 2000
- Location
- where the World once stood
- Posts
- 700
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hi,
Mind giving a hint as to what rtEditor and fontNameSelector are -- a textarea and selection list?
VinnyWhere the World Once Stood
the blades of grass
cut me still
-
Aug 18, 2003, 09:41 #3
- Join Date
- Jan 2003
- Location
- New York, NY
- Posts
- 125
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
rtEditor is the ID of the contenteditable div that's used to edit the text, and fontNameSelector is the id of the select list used to choose fonts.
So I says to him, I says, Hey! Llama! How about a little something, you know, for the effort, you know?
-
Aug 20, 2003, 21:34 #4
- Join Date
- Jan 2003
- Location
- New York, NY
- Posts
- 125
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Anyone know?
So I says to him, I says, Hey! Llama! How about a little something, you know, for the effort, you know?
Bookmarks