3

epiceditor の stackoverflow マークダウン エディターに似たヘルパー ボタンをいくつか作成しようとしています。

この方法を試しましたが、実際には実際のファイルを上書きし、追加しません

これは太字ボタンの例です

$('.icon-bold').click(function(){
   editor.importFile('epiceditor', '**strong text**')
});

epiceditor を使用してファイルにテキストを追加するにはどうすればよいですか?

このソリューションは、大きなファイルではやり過ぎだと思います

 $('.icon-bold').click(function(){
   content = editor.exportFile('epiceditor');
   editor.importFile('epiceditor',content + '**strong text**')
 });
4

0 に答える 0