我开始在网站上的所有内容类型中部署 WYMeditor,它看起来不错。现在我要看看它是如何保存和查看的,但它没有提交任何东西,我不知道为什么。
我从几个角度看待这个问题。我什至会在这一点上使用猴子补丁,如果我可以自己学习如何获取数据,我可以在提交时将其粘贴到字段中。那或者它不能自行工作的真正原因会很棒。有人有想法吗?
<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>