Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/465.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何更改标题编辑器下拉列表中的字体标签?_Javascript_Html_Css_Ckeditor_Editor - Fatal编程技术网

Javascript 如何更改标题编辑器下拉列表中的字体标签?

Javascript 如何更改标题编辑器下拉列表中的字体标签?,javascript,html,css,ckeditor,editor,Javascript,Html,Css,Ckeditor,Editor,在CKEditor中,当我将样式从Normal更改为H1、H2或H3时,下拉列表中的字体标签不会更改 我想在用户自动更改标题样式时更改字体标签。我怎么做 Content.css h1 { font-size: 28px !important; } h2 { font-size: 24px !important; } h3 { font-size: 22px !important; } h4 { font-size: 20px !important; } h5 {

CKEditor中,当我将样式从Normal更改为H1、H2或H3时,下拉列表中的字体标签不会更改

我想在用户自动更改标题样式时更改字体标签。我怎么做

Content.css

h1
{
    font-size: 28px !important;
}
h2
{
    font-size: 24px !important;
}
h3
{
    font-size: 22px !important;
}
h4
{
    font-size: 20px !important;
}
h5
{
    font-size: 18px !important;
}

突出显示的字体标签应根据定义的css进行更改!我通过在contents.css中添加css尝试了上述方法,但它不起作用

有两种不同的东西

第一:以这种方式定义样式只适用于CKEditor中文本的视觉方面。字体大小不会自动改变

第二:字体大小与span元素一起应用。您可以使用此按钮选择大小不同的
h1
元素。操作可用的字体大小选项,但它不会从h1样式表中自动检测它们


请详细了解如何在CKEditor中管理样式:

有两个不同的方面

第一:以这种方式定义样式只适用于CKEditor中文本的视觉方面。字体大小不会自动改变

第二:字体大小与span元素一起应用。您可以使用此按钮选择大小不同的
h1
元素。操作可用的字体大小选项,但它不会从h1样式表中自动检测它们


请详细了解如何在CKEditor中管理样式:

添加HTML,我们只是不知道您正在使用的元素,因此我们不知道在何处进行更改以帮助您CKEditor按名称或id设置目标!我认为这没有必要添加!如果有人是开发者,他/她知道这一点!添加HTML,我们只是不知道您正在使用的元素,所以我们不知道在何处进行更改以帮助您编辑,或者只按名称或id设置目标!我认为这没有必要添加!如果有人是开发者,他/她知道这一点!