css - 通过 TinyMCE 设置行高

标签 css configuration tinymce

有没有办法让用户可以在 tinyMCE 编辑器中轻松更改段落的行高属性?类似于它的原生“字体大小”或“格式”<select>或其他任何东西。我知道我可以使用“编辑 CSS”功能并将其设置在那里。我正在寻找对用户更友好的东西。

我到处都找不到。

最佳答案

我在 TinyMCE 版本 4.1.5 (2014-09-09) 中找到了这个插件

https://github.com/castler/tinymce-line-height-plugin

这样设置:

tinymce.init({
    plugins: 'lineheight',
    toolbar: 'lineheightselect' 
});

你也可以像这样配置不同的高度:

tinymce.init({
    lineheight_formats: "8pt 9pt 10pt 11pt 12pt 14pt 16pt 18pt 20pt 22pt 24pt 26pt 36pt",
});

我对此进行了测试,效果很好。

关于css - 通过 TinyMCE 设置行高,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11595702/

相关文章:

azure - Tinymce ImageManager 连接到 Windows Azure Blob 存储

css - Bootstrap 4 Grid 在 UL 内部不工作

javascript - jQuery : update css on one table column based on attribute of another column

hadoop - 使用Apache框架安装/配置Hue

c# - 使用 ConfigurationPropertyAttribute 避免重复属性名称 3 次

jquery - TinyMCE 不能在 jquery ui 模式对话框中工作,为什么?

javascript - TinyMCE 上下文菜单 mceInsertContent?

html - 如何展开下拉项

javascript - 在透明图像或 div 中放大背景图像

c++ - .sln 文件未生成