Bug 208094 Form/Image doesn't convert <img> r=brade sr=peterv

This commit is contained in:
neil%parkwaycc.co.uk 2003-06-03 14:44:05 +00:00
parent df3c4ae2bd
commit dfe143f8b6
2 changed files with 4 additions and 4 deletions

View File

@ -90,7 +90,7 @@ function Startup()
// We found an image element, convert it to an input type="image"
var attributes = ["src", "alt", "width", "height", "hspace", "vspace", "border", "align", "usemap", "ismap"];
for (i in attributes)
imageElement.setAttribute(attributes[i], imageElement.getAttribute(attributes[i]));
imageElement.setAttribute(attributes[i], imgElement.getAttribute(attributes[i]));
}
}

View File

@ -98,15 +98,15 @@ function Startup()
return;
}
var imageElement = editor.getSelectedElement("img");
if (imageElement)
var imgElement = editor.getSelectedElement("img");
if (imgElement)
{
// We found an image element, convert it to an input type="image"
inputElement.setAttribute("type", "image");
var attributes = ["src", "alt", "width", "height", "hspace", "vspace", "border", "align"];
for (i in attributes)
inputElement.setAttribute(attributes[i], imageElement.getAttribute(attributes[i]));
inputElement.setAttribute(attributes[i], imgElement.getAttribute(attributes[i]));
}
else
inputElement.setAttribute("value", GetSelectionAsText());