#21 fckeditor setValue bug when value contains double quotes

closed
nobody
FCKeditor (10)
5
2007-10-19
2007-10-19
Tom M. Yeh
No

try the following simple script. the value wont show in the editor!

<window title="FCKeditor">
<hbox id="box" visible="false">
<fckeditor id="ed" value=""/>
</hbox>
<zscript>
<![CDATA[
ed.value = "<p><strong><font size=\"3\" color=\"#ff0000\">Music
&amp; Audio avilion</font></strong></p><p><strong>Booth:&nbsp;
</strong>NW_1101</p>";
box.visible = true;
]]>
</zscript>
</window>

---
Seems the problem is in the double quotes. try this:

<window title="FCKeditor">
<zscript>
<![CDATA[
x = "<p><strong><font size='3' color='#ff0000'>Music &amp; Audio
avilion</font></strong></p><p><strong>Booth:&nbsp; </strong>NW_1101</p>";
y = "<p><strong><font size=\"3\" color=\"#ff0000\">Music &amp; Audio
avilion</font></strong></p><p><strong>Booth:&nbsp; </strong>NW_1101</p>";
]]>
</zscript>
<fckeditor value="${x}"/>
<fckeditor value="${y}"/>
</window>

---
here's another simpler script:

<window title="FCKeditor">
<zscript>
<![CDATA[
x = "<p><strong><font size=\"3\" color=\"#ff0000\">Music &amp; Audio
avilion</font></strong></p><p><strong>Booth:&nbsp; </strong>NW_1101</p>";
y = "simple"
]]>
</zscript>
<fckeditor value="${x}"/>
<fckeditor value="${y}"/>
</window>

Discussion

  • Tom M. Yeh
    Tom M. Yeh
    2007-10-19

    • status: open --> closed
     
  • Tom M. Yeh
    Tom M. Yeh
    2007-10-19

    Logged In: YES
    user_id=91099
    Originator: YES

    Fixed since 10/19