legacy-knowledge-base
公開されました Jul. 2, 2025

AlloyEditorのフィールドをAUIフォームに統合する

written-by

Daniel Couso

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • CKEditor テキストエリアは通常、JSPページでタグリブInputEditorを呼び出すことで導入されます:
<liferay-ui:input-editor
contents="<%= HtmlUtil.escape(title) %>"
editorName="ckeditor"
name="titleEditor"
onChangeMethod="OnChangeTitle"
placeholder="title"
required="<%= true %>"
showSource="<%= false %>"
>
  • ただし、属性 editorName の値を ckeditor alloyeditor に変更するだけで、エディタタイプを CKEditor から AlloyEditor に変更しても動作しない。

Environment

  • DXP 7.1+

解決策

  • タグリブのInputEditorを使ったAlloyEditorの統合は、CKEditorのように簡単ではありません。
  • さらに2つの要素を入れなければならない:
    • 補助的な隠し入力フィールド(ブログ例)。
    • フォーム送信時にAlloy Editorの内容を前述の補助的な隠し入力フィールドにコピーするJavascriptの補助コード(ブログの例)。
did-this-article-resolve-your-issue

legacy-knowledge-base