1

WordPress TinyMce エディターでいくつかのプラグインを生成するいくつかのプラグイン ボタンを作成しようとしています。

コードが次のように出力されることを除けば、すべてが 100% 動作します。

[accordion_wrap] [accordions]This is where some content goes..[/accordions] [accordions]This is where some content goes..[/accordions] [accordions]This is where some content goes..[/accordions] [/accordion_wrap]

このように見える代わりに

[accordion_wrap]

[accordions]This is where some content goes...[/accordions]
[accordions]This is where some content goes...[/accordions]
[accordions]This is where some content goes...[/accordions]

[/accordion_wrap]

私がこれを行ったコードは次のとおりです。

   if(p == 'Accordions'){

    content =  '[accordion_wrap]'+'\n'+'[accordions]This is where some content goes...[/accordions]'+'\n'+'[accordions]This is where some content goes...[/accordions]'+'\n'+'[accordions]This is where some content goes...[/accordions]'+'\n'+'[/accordion_wrap]';

  tinymce.execCommand('mceInsertContent', false, content);

    } // end of shortcode

誰かが私が間違っていることを教えてくれますか。

ありがとう

4

0 に答える 0