mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 208094 Form/Image doesn't convert <img> r=brade sr=peterv
This commit is contained in:
parent
df3c4ae2bd
commit
dfe143f8b6
@ -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]));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user