'readonly = false'に設定すると、richfacesエディタは常に単純なテキストボックスに戻ります。したがって、この場合、この属性は無意味です。代わりに、私は目標を達成するために2つの別個のconfiguration.propertiesファイルを使用して問題を解決しました。
XHTMLは、パラメータ「たconfigFile」に応じて、適切なプロパティファイルをロードします。
<rich:editor id="pLRiTa" value="#{pReq.comment}"
autoResize="true" useSeamText="false"
configuration="#{configFile}"
oninit="tinyMCE.activeEditor.getBody().setAttribute('contenteditable', #{isEditable});">
<f:param name="save_enablewhendirty" value="true" />
<f:param name="save_onsavecallback" value="savenow" />
構成プロパティが編集を有効にしてファイルです。
theme="advanced"
width="100%"
plugins="save,paste,fullscreen"
save_enablewhendirty="true"
save_onsavecallback="savenow"
theme_advanced_buttons1="bold,italic,underline,strikethrough,separator,cut,separator,forecolor,backcolor,separator,save,separator,fullscreen"
theme_advanced_buttons2="bullist,separator,outdent,indent,separator,undo,redo,separator,cleanup,help,code"
theme_advanced_buttons3="pastetext,pasteword,selectall,separator,removeformat,visualaid,separator,sub,sup,separator,charmap"
theme_advanced_toolbar_location="top"
theme_advanced_toolbar_align="left"
構成プロパティファイル編集無効の場合:
theme="advanced"
plugins="fullscreen"
theme_advanced_buttons1="fullscreen"
theme_advanced_buttons2=""
theme_advamced_buttons3=""
theme_advanced_toolbar_location="top"
theme_advanced_toolbar_align="left"
width="100%"
そして「savenow」次のように定義されています
<a4j:jsFunction name="savenow" id="savenowid"
action="#{plEditModalController.saveWithoutClosing()}"
ignoreDupResponses="true" immediate="false" process="plEditAll"
oncomplete="console.log('saved')"/>
彼らはボンネットの下にCKEditorバージョンを使用しています。豊富なショーケースとckeditorを調べて、必要なものが得られるかどうかを確認します。 http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=editor&sample=advancedConfiguration&skin=blueSky http://docs.ckeditor.com/#!/guide/dev_readonly – axemoi
@axemoi RichFaces 3は[tinyMCE]を使用しています。 (https://www.tinymce.com/docs/) – Makhiel
これは間違いなく、tinyMCE 3 https://www.tinymce.com/docs-3x/です。 I.amが作業を終えるとすぐに私の解決策を掲載します。 – Robert