AW: [opencms-dev] Wysiwyg Editor

Frank Wunderlich k.frank.wunderlich at gmx.de
Thu Jun 12 14:50:02 CEST 2003


Hi Mark,

You are right. If I just drag the pictures onto the page from the image
gallery, no style attribute is attached to the img-tag.
But usually you format the image afterwards by selecting the pic and
opening its property-window (for example for adding a title/alt-text or
aligning it to the rest of the page). After this operation the editor
control adds automatically an additional style-attribute with correct
width and height values.

To use the source code editor is an option that is suitable for me, but
certainly not for the "end-users" that shall be able to maintain the
site without any knowledge of html.

But I think, I have found a workaround in the meantime.

In "opencms_edithtml.js" I have simply added a new javascript-function
that is called whenever the page is submitted or saved.
Here I can do all the tidy-up-work I want to do, for example translating

	
	style="width:10px; height:10px" 
to 
	width=10 height=10

or even applying additional stylesheet-classes (the class-attribute is
no problem for ns4) to the img-tag.

But thanks for answering anyway!
Greetings,
Frank.

> 
> 
> Resize your pictures before you upload them to a gallery ... 
> it is bad practice to define an image with a different size 
> than it actually has (ie. by using the wysiwyg image resize). 
> Simply copy (drag & drop) the picture onto your page without 
> any resizing and all will be fine in all browsers ... except 
> maybe lynx :)
> 
> All the code I have seen has been fine, although I tend to 
> use the source code editor to clean up pages created by 
> others using the wysiwyg editor.
> 
> 
> All the besr,
> 
> mark
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: opencms-dev-admin at opencms.org 
> [mailto:opencms-dev-admin at opencms.org] Im > Auftrag von Frank
Wunderlich
> Gesendet: 12 June 2003 12:09
> An: opencms-dev at opencms.org
> Betreff: [opencms-dev] Wysiwyg Editor
> 
> Hi,
> 
> I have a question about the Wysiwig editor as well:
> 
> A lot of html-code generated by the editor-control is not 
> very "cross-browser-suitable"... For example, if I place an 
> image into my page, the resulting img-tag uses the 
> style-attribute to set the width and height of the pic. In 
> Netscape 4.x for example (alright, it's not very popular any 
> more, but nonetheless...) this simply destroys the layout.
> 
> Is there anyway to manipulate the output of the editor control? 
> I guess, Microsoft hasn't made this control opensource, have 
> they ;-) ?
> 
> How do you handle those kind of problems in your projects?
> 
> Cheers,
> Frank.
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, 
> please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, 
> please visit http://mail.opencms.org/mailman/listinfo/opencms-dev
> 





More information about the opencms-dev mailing list