gpt4 book ai didi

javascript - TinyMCE 未在工具栏中显示 "hr"

转载 作者:行者123 更新时间:2023-11-30 17:09:31 25 4
gpt4 key购买 nike

我正在尝试将 TinyMCE 用作编辑器,并希望能够添加“hr”元素。我已经按照他们的概述添加了插件,但我没有在我的编辑器中看到“hr”按钮/选项。

任何对此问题的见解都会很棒!

我是这样启动它的:

tinymce.init({
selector: "textarea",
plugins: [
"template advlist autolink link image lists charmap print preview",
"advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"save table contextmenu directionality emoticons template paste textcolor"
],
browser_spellcheck : true ,
toolbar: "undo redo | styleselect | bold italic | link image | template ",
menubar: false,
resize: "both",
content_css: "/Content/bootstrap.min.css, /Content/Site.css",
template_cdate_classes: "cdate creationdate",
template_mdate_classes: "mdate modifieddate",
template_selected_content_classes: "selcontent",
template_cdate_format: "%m/%d/%Y : %H:%M:%S",
template_mdate_format: "%m/%d/%Y : %H:%M:%S",
file_browser_callback_types: 'file image media',

templates: [
{
title: "Center Column",
url: "/Scripts/tinymce/template/center_column.html",
description: "Adds Editor Name and Staff ID"
},
{
title: "Two Column w/ Image Right",
url: "/Scripts/tinymce/template/two_column_image_right.html",
description: "Adds an editing timestamp."
},
{
title: "Two Column w Image Left",
url: "/Scripts/tinymce/template/two_column_image_left.html",
description: "Adds an editing timestamp."
},
{
title: "Contact Page",
url: "/Scripts/tinymce/template/contact_page.html",
description: "Adds an editing timestamp."
}
]


});

最佳答案

您的工具栏语法应如下所示:

toolbar: "hr undo redo | styleselect | bold italic | link image | template ",

我在按钮堆栈的开头插入了 hr 按钮,但您可以将其插入到您需要的任何位置。希望 tinyMCE 会在 relevant page 上写下这个.

关于javascript - TinyMCE 未在工具栏中显示 "hr",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27297540/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com