如何在Struts 2中应用TinyMCE文本编辑器?

时间:2013-05-31 06:05:34

标签: java struts2 tinymce

我想在我的Struts 2项目中应用富文本编辑器。为此,我在我的.jsp文件中以下列方式使用TinyMCS:

<%@ taglib prefix="sjr" uri="/struts-jquery-richtext-tags"%>
  <s:url var="remoteurl" action="ajax1" />
  <sjr:tinymce
    id="richtextTinymceAdvancedEditor"
    name="notices.contentBody"
    rows="10"
    cols="80"
    width="800"
    href="%{remoteurl}"
    editorLocal="de"
    editorTheme="advanced"
    editorSkin="o2k7"
    toolbarAlign="left"
    toolbarLocation="top"
    plugins="safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template"
    toolbarButtonsRow1="save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect"
    toolbarButtonsRow2="cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor"
    toolbarButtonsRow3="tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen"
    toolbarButtonsRow4="insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage"
    onSaveTopics="submitRichtextForm"
  />

但它显示的是一个简单的EditArea,没有工具栏。我已经包含了所有必需的库。我还应该做些什么来展示一个完整的富文本编辑器?

感谢。

0 个答案:

没有答案