Forum closed. New forum available at http://community.wymeditor.org/

"width" and "height" attributes...

Support forum for WYMeditor.

"width" and "height" attributes...

Postby Fifi on Tue Nov 13, 2007 2:20 pm

Hello !

Is there a way to get the "width" and "height" attributes for an image ?
Fifi
 
Posts: 32
Joined: Mon Nov 05, 2007 10:06 am

Postby Al on Fri Dec 14, 2007 9:44 pm

you can try this :

-arround the line 366 add :
Code: Select all
widthSelector:    ".wym_width",
heightSelector:    ".wym_height",


-arround the line 437 add into dialogImageHtml
Code: Select all
+ "<div class='row'>"
+ "<label>Width</label>"
+ "<input type='text' class='wym_width' value='' size='40' />"
+ "</div>"
+ "<div class='row'>"
+ "<label>Height</label>"
+ "<input type='text' class='wym_height' value='' size='40' />"
+ "</div>"




-arround the line 1347 add into : if(image) {...}
Code: Select all
if (jQuery(wym._options.widthSelector).val()!=""){
   image.attr("width", jQuery(wym._options.widthSelector).val());
   image.attr("height", jQuery(wym._options.heightSelector).val());
}


-arround the line 1298 add into : if(wym._selected_image) {...}
Code: Select all
if(jQuery(wym._selected_image).attr("width")){
   jQuery(wym._options.dialogImageSelector + " " + wym._options.widthSelector).val(jQuery(wym._selected_image).attr("width"));
   jQuery(wym._options.dialogImageSelector + " " + wym._options.heightSelector).val(jQuery(wym._selected_image).attr("height"));
}
Al
 
Posts: 4
Joined: Fri Dec 14, 2007 8:32 pm
Location: Orléans (France)


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests