4

TinyMce Editorbreak (<br/>)で、タグの問題に直面しています。を押すと、単一のブレークタグEnterが生成されることもあれば、二重のブレークタグが生成されることもあります。

誰かがこれに関連する解決策を知っているなら、これを解決することは本当に役に立ちます。

このブレークタグについての私の理解によると、生成されるのはに依存しeditors,text,words, strings and space between wordsます。

4

2 に答える 2

1

いくつかの解決策があります。最初にconvert_newlines_to_brsに設定してみてください:false で囲まれた引用符なしでfalse。

これで問題が解決しない場合は、このクリーンアップ機能を使用できます

function CustomCleanup(type, content) {
  switch (type) {
   // gets passed when user submits the form
   case "get_from_editor":
    content = content.replace(/<br \/>/gi, "\n"); // would be nice if this replace only replaces the brs in a pre block. bur for the moment it is ok.
    break;
   // gets passed when new content is inserted into the editor
   case "insert_to_editor":
    break;
  }
return content;
}

tinyMCE.init({
    ...
    cleanup_callback : "myCustomCleanup"
});
于 2013-03-13T17:52:15.813 に答える
1

あなたを助ける以下のリンクをチェックしてください、

  1. TinyMCE フィドル
  2. フル機能の例
  3. HTML5 形式
于 2013-03-19T11:20:03.070 に答える