我开始在网站上的所有内容类型中部署WYMeditor,并且它看起来不错。现在我看到它是如何工作保存和查看,但它没有提交任何内容,我不知道为什么。WYMeditor不会将内容反映到文本区域值
我从几个角度看过这个。我甚至会在这一点上拿一个monkeypatch,如果我能够学习如何自己获取数据,我可以在提交时将其粘贴到现场。这或它自己不工作的真正原因会很好。任何有想法的人?
<li><label for="id_comment">comment on this article:</label> <textarea id="id_comment" rows="10" cols="40" name="comment"></textarea>
<script type="text/javascript">
$(document).ready(function(){
jQuery("#id_comment").wymeditor({
"toolsItems":[
{
"name":"Bold",
"css":"wym_tools_strong",
"title":"Strong"
},
{
"name":"Italic",
"css":"wym_tools_emphasis",
"title":"Emphasis"
},
{
"name":"InsertOrderedList",
"css":"wym_tools_ordered_list",
"title":"Ordered_List"
},
{
"name":"InsertUnorderedList",
"css":"wym_tools_unordered_list",
"title":"Unordered_List"
},
{
"name":"Indent",
"css":"wym_tools_indent",
"title":"Indent"
},
{
"name":"Outdent",
"css":"wym_tools_outdent",
"title":"Outdent"
},
{
"name":"Undo",
"css":"wym_tools_undo",
"title":"Undo"
},
{
"name":"Redo",
"css":"wym_tools_redo",
"title":"Redo"
},
{
"name":"CreateLink",
"css":"wym_tools_link",
"title":"Link"
},
{
"name":"Unlink",
"css":"wym_tools_unlink",
"title":"Unlink"
},
{
"name":"Paste",
"css":"wym_tools_paste",
"title":"Paste_From_Word"
}
],
"logoHtml":"",
"updateEvent":"blur",
"stylesheet":"/static/yui/tiny_mce.css",
"skin":"twopanels",
"classesHtml":"",
"updateSelector":"textarea"
});
});
</script></li>
不幸的是,这不是我遇到的问题。这并不是原始textarea在提交(它确实)时获得正确内容的问题,但是当启用html-编辑模式时,它将显示raw-html textarea和WYMeditor的富文本编辑字段,然后编辑一个不会改变其他。 – ironfroggy 2009-04-19 15:07:55
没错,WYMeditor没有反映没有wymupdate类的变化回textarea。 – 2010-07-20 03:59:24