Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.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
Ckeditor 如何编辑第一行缩进段落?_Ckeditor_Ckeditor4.x - Fatal编程技术网

Ckeditor 如何编辑第一行缩进段落?

Ckeditor 如何编辑第一行缩进段落?,ckeditor,ckeditor4.x,Ckeditor,Ckeditor4.x,如何像ms word一样在Ckeditor中进行第一行缩进?据我所知,它没有插件。 谢谢您的帮助。如果您只关心查看模式,那么只需编辑contents.css并将以下内容放在末尾: p { text-indent: 40px; } 或者你喜欢的任何长度 但是,这不会出现在源代码中,因此,如果您希望数据在CKEditor之外的其他位置显示缩进内联,您可以在提交之前替换标记,如下所示: CKEDITOR.instances.editor1.getData().replace(/<p&g

如何像ms word一样在Ckeditor中进行第一行缩进?据我所知,它没有插件。
谢谢您的帮助。

如果您只关心查看模式,那么只需编辑
contents.css
并将以下内容放在末尾:

p {
    text-indent: 40px;
}
或者你喜欢的任何长度

但是,这不会出现在源代码中,因此,如果您希望数据在CKEditor之外的其他位置显示缩进内联,您可以在提交之前替换
标记,如下所示:

CKEDITOR.instances.editor1.getData().replace(/<p>/gi, '<p style="text-indent: 40px;"')
CKEDITOR.instances.editor1.getData().replace(//gi,'