Ticket #5347 (closed defect: fixed)
Editor.getValue() is incorrect when using hiliteColor plugin on Internet Explorer 6
| Reported by: | guest | Owned by: | liucougar |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | Editor | Version: | 1.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I'm using IE 6.0.2 xp sp2 on Windows XP. Using dojo 1.0.1-20071128, from the IBM internal site.
I'm running the test_editor.html with the 'hiliteColor' plugin. When I change the background of some text, the color changes correctly. But when I call Editor.getValue(), the font tag is returned as "<font style="[object]">", hence it is not usable.
I've narrowed down the problem to RichText?.getNodeHtml() line 1283. The best solution I found was to use the style.cssText property, but that is not compatible for all browsers. Here is the spot I narrowed it down to:
if(key == 'class'){
attrarray.push([key,node.className]);
} else {
attrarray.push([key,node.getAttribute(key)]); //<---- storing a style object here,
//a string was expected ie //"background-color: #ffffff"
}