在iframe微文本编辑器中获取,插入和替换字符串

时间:2013-07-07 21:58:18

标签: javascript string iframe replace rich-text-editor

我有带ID xacta的textarea,

这个简单的小文本编辑器可以创建我的textarea的iframe。

var editorxacta = new TINY.editor.edit("editorxacta", {
id: "xacta",
width: 860,
height: 180,
cssclass: "tinyeditor",
controlclass: "tinyeditor-control",
rowclass: "tinyeditor-header",
dividerclass: "tinyeditor-divider",
controls: ["bold", "italic", "underline", "|", "subscript", "superscript", "|", "outdent", "indent", "|", "leftalign",
    "centeralign", "rightalign", "blockjustify", "|", "hr", "link", "unlink"],
footer: false,
xhtml: true,
bodyid: "editorxacta",
cssfile: "css/style-adnx.css"

});

现在我可以在textareafield中获取,插入和替换文本:

document.getElementById('xacta')。value =“any string” - notwork document.getElementById('editorxacta')。value =“any string” - notwork

请帮助我如何在tinytexteditor的iframe中控制,获取,插入或替换我的textarea中的字符串值?

感谢任何建议,Jozef

0 个答案:

没有答案