4

我有一个文本区域,其行为类似于 ckeditor。在编辑器中有一个按钮可以查看源/html 的内容。我在 textarea 上方有一个输入按钮,可以将 textarea 内容预览为 html 意味着单击我的预览按钮时,它将触发 ckeditor 按钮单击。有人可以帮我吗..?

4

1 回答 1

7

有史以来最短的答案:

editor.execCommand( 'source' );
于 2013-09-16T15:00:39.097 回答