问题描述
我目前正在使用 tinyMCE 和 react 开发文本编辑器。当我转到“插入 > 媒体”时,会出现一个对话框面板。它有几个选项卡,如常规、嵌入和高级。我需要的是从面板中删除常规选项卡。
我确定有办法做到这一点,但我似乎无法在文档中找到它。 有没有办法做到这一点?
<Editor
apiKey={this.props.tinymceApiKey}
initialValue={this.props.initialContent}
init={{
height: 500,convert_urls: false,ie7_compat: false,force_br_newlines: false,force_p_newlines: false,default_link_target: "_blank",link_context_toolbar: true,link_assume_external_targets: true,link_title: false,custom_elements:
"math,maction,maligngroup,malignmark,menclose,merror,mfenced,mfrac," +
"mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mroot," +
"mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub," +
"msup,msubsup,mtable,mtd,mtext,mtr,munder,munderover,script,svg,mjx-container,defs,path,g,use,mjx-assistive-mml",extended_valid_elements:
"span[class|style],line[x1|y1|x2|y2],g[stroke-width|stroke|fill|transform],svg[style|role]" +
",div[onclick|class|contenteditable],path[id|d],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value|onclick|type],audio[id],source[src|type],img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align|onclick|class|data-mce-resize|data-mce-placeholder]",plugins:
"print preview paste searchreplace autolink autosave save directionality code visualblocks" +
"visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking" +
"anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons",menubar: "file edit view insert format tools table",menu: {
file: { title: "File",items: "preview | print " },edit: {
title: "Edit",items:
"undo redo | cut copy paste pastetext | selectall | searchreplace",},view: {
title: "View",items: "code | spellchecker | preview fullscreen",insert: {
title: "Insert",items:
"image link media inserttable Math codesample | charmap emoticons hr | pagebreak anchor toc | insertdatetime",format: {
title: "Format",items:
"bold italic underline strikethrough superscript subscript codeformat | formats blockformats fontformats fontsizes align lineheight | forecolor backcolor | removeformat",tools: { title: "Tools",items: "spellchecker | code wordcount" },table: {
title: "Table",items: "inserttable | cell row column | tableprops deletetable",toolbar: this.props.toolbar,toolbar_sticky: true,height: 600,quickbars_selection_toolbar:
"bold italic | quicklink h2 h3 blockquote quickimage quicktable",noneditable_noneditable_class: "mceNonEditable",toolbar_mode: "sliding",contextmenu: "link image imagetools table",image_title: false,image_description: false,image_dimensions: false,images_upload_handler: this.props.imageUploadHandler,setup: function (editor) {
that.editor = editor;
editor.ui.registry.addButton("Math",{
text: "Math",tooltip: "Math equation",onAction: function (_) {
that.setEditorOpen(true);
},});
editor.ui.registry.addButton("Focus",{
text: "Focus",tooltip: "Focus editor",onAction: function (_) {
that.editor.focus();
},});
editor.ui.registry.addMenuItem("Math",{
text: "Math equation",onAction: function () {
that.setEditorOpen(true);
},});
},}}
onEditorChange={this.handleEditorChange}
/>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)