[英]Adding inline styles to multiple elements in ckeditor
I need to add inline style to multiple html elements using the inline style option in the ckeditor.我需要使用 ckeditor 中的内联样式选项将内联样式添加到多个 html 元素。 I have added the following code in the styles.js file.我在styles.js 文件中添加了以下代码。
{ name: 'Red italics', element: 'p', styles: {'font-style' : 'italic', 'color' : '#632423'} },
I need to add the styling to multiple html tags , something like the below我需要将样式添加到多个 html 标签,如下所示
{ name: 'Red italics', element: 'p, div, li', styles: {'font-style' : 'italic', 'color' : '#632423'} },
but this does not work.但这不起作用。 Can anyone please tell me how can I do the above.任何人都可以告诉我如何才能做到以上几点。
Thanks in advance.提前致谢。
Regards,问候,
Neha尼哈
Please try this solution..请试试这个解决方案..
{ name: 'Red italics', element : ['p', 'div', 'li'], styles: {'font-style' : 'italic', 'color' : '#632423'} }
let me know if it helps you...让我知道它是否对你有帮助......
EDIT编辑
if that does not work then try below code如果这不起作用,请尝试下面的代码
{ name: 'Red italics', element : ['p', 'div', 'li'], attributes: {'font-style' : 'italic', 'color' : '#632423'} }
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.