1

フォーム要素としてAloha HTML5 RTEを使いたいです。 http://aloha-editor.org/index.php

最終的には、「ContentEditable」属性に要約されます。通常は次のように適用されます

<section contenteditable="true" id="editable">
<h2>Go ahead, edit away!</h2>
<p>Here's a typical paragraph element</p>
<ol>
<li>and now a list</li>
<li>with only</li>
<li>three items</li>
</ol>
</section>

フォーム要素に同様の機能が必要なため、フォーマットされた HTML をフォームの名前と値のペアとしてサーバー側に送信できます。

実現可能ですか?どのように ?

4

1 に答える 1

1

テキストエリアで Aloha Editor を使用する方法について、以前ブログ記事を書きました: http://www.supnig.com/blog/using-aloha-editor

Aloha Editor などの WYSIWYG エディターは、contenteditable=true よりもはるかに多くの機能を備えています。ブラウザーのあらゆる種類の奇妙な動作を考慮し、コンテンツを適切にフォーマットする機能を追加します。

Aloha Editor を使用したくない場合は、フォームで送信イベントをリッスンし、contenteditable 要素のコンテンツを取得して、送信データに挿入する必要があります。

于 2013-02-26T15:34:39.670 に答える