【问题标题】:How to reduce the white space between two line in CKeditor如何减少CKeditor中两行之间的空白
【发布时间】:2022-01-07 01:47:29
【问题描述】:

我想删除 CKeditor 中两行之间的空格。如果我按回车键输入一行后,它会在两行之间占用一些 exyra 空间。如何删除它。我已经突出显示了图像中的行距。

【问题讨论】:

  • 空间存在是因为 p 元素的 margin-block-start 和 margin-block-end 的默认样式。

标签: php html css ckeditor


【解决方案1】:

出现空格是因为 ckeditor 在按下回车键时会开始一个新段落,而不是开始一个新行。

您可以通过配置更改此行为:https://ckeditor.com/docs/ckeditor4/latest/features/enterkey.html

【讨论】:

【解决方案2】:

您应该在 CK 编辑器中使用行高,请在此处查看http://ckeditor.com/addon/lineheight

【讨论】: