Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > JS WYSIWYG Editor - Image Alignment...?

Reply
Thread Tools

JS WYSIWYG Editor - Image Alignment...?

 
 
Edd
Guest
Posts: n/a
 
      01-08-2004
Hi,

I have built a basic WYSIWYG HTML editor using Javascript the
ExecCommand commands.

What is fustrating me is that, according to the MSDN site, there is no
way to set the alignment of an image (eg left, right, middle).

This MUST be possible using Javascript...and I have thought about
using the command

document.iEditor.imagename.style.float = "right"

BUT...i don't know how to set the 'imagename' above to the image
currently selected within the editor.

(FYI 'iEditor' is an iFrame with DesignMode set to 'on')

If anyone has any ideas about how to go about doing this, it would be
massively appreciated!!

Thanks
Edd
 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      02-04-2004
Edd wrote:

> I have built a basic WYSIWYG HTML editor using Javascript the
> ExecCommand commands.


Yet another one ...

> What is fustrating me is that, according to the MSDN site,


URL?

> there is no way to set the alignment of an image (eg left, right, middle).


M$ is lying again. You only need to assign the "align"
property of an HTMLImageElement object a proper value.

> This MUST be possible using Javascript...and I have thought about
> using the command
>
> document.iEditor.imagename.style.float = "right"
> [...]
> (FYI 'iEditor' is an iFrame with DesignMode set to 'on')


Quickhack (see <http://pointedears.de.vu/scripts/test/whatami>):

var oImageStyle = document.frames['iEditor'].images[imagename].style;
oImageStyle.float = "right";

> BUT...i don't know how to set the 'imagename' above to the image
> currently selected within the editor.


<computer> Please restate your request. </computer>

> If anyone has any ideas about how to go about doing this, it would be
> massively appreciated!!


How much are you going to pay me?


PointedEars
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need a very easy to use WYSIWYG editor, not a full-featured editor. I. Myself HTML 39 05-31-2006 03:20 PM
ANN: New low-cost XML Editor, XSLT Editor, XSLT Debugger, DTD/Schema Editor Stylus Studio Java 0 08-03-2004 03:53 PM
XML Editor WYSIWYG Word processor-like validating XML Editor ?! Hatem KNANI XML 2 08-04-2003 03:22 PM
recommendation for a good WYSIWYG editor control yoni ASP .Net 1 07-30-2003 04:39 PM



Advertisments