Javascript tinymce自定义实现-他们的docAPI可能更好
我只是想让用户能够插入,Javascript tinymce自定义实现-他们的docAPI可能更好,javascript,tinymce,Javascript,Tinymce,我只是想让用户能够插入,,&和,我该怎么做 他们的网站对我来说太混乱了 有人能帮我吗?这是你的答案 var Editor = tinyMCE.get('YourEditorID'); Editor.focus(); Editor.selection.setContent('<strong>Hello World</strong>'); var Editor=tinyMCE.get('YourEditorID'); Editor.focus(); Editor.selec
,&- 和
,我该怎么做
他们的网站对我来说太混乱了
有人能帮我吗?这是你的答案
var Editor = tinyMCE.get('YourEditorID');
Editor.focus();
Editor.selection.setContent('<strong>Hello World</strong>');
var Editor=tinyMCE.get('YourEditorID');
Editor.focus();
Editor.selection.setContent(“helloworld”);
注意:根据具体情况,可能不需要focus()。您想调整
主题\u高级\u按钮的设置:
tinyMCE.init({
//...
theme_advanced_buttons1: 'bullist,numlist,image',
theme_advanced_buttons2: '',
theme_advanced_buttons3: '',
theme_advanced_buttons4: '',
//...
});
好吧,你总是能找到段落
查看更多信息,右侧边栏中列出了各种示例。但定制在哪里?@Toni Michel Caubet:“AFAIK”==“据我所知”,段落应始终以TinyMCE提供。将2,3,4保留为空字符串,除非您需要多个工具栏。如果您不在按钮2和3中放置空字符串,则将获得这些工具栏的默认工具栏按钮列表。我很确定你不需要button4,因为它没有默认设置。