L
L
Light7772016-02-15 19:02:07
Yii
Light777, 2016-02-15 19:02:07

Is it possible to add styles to TinyMce in Yii2?

Is it possible to add styles to TinyMce in Yii2?
For example, I create a list in the editor and save How to set margin-top-20 for all uls and class="template-bullet" for all lis? How to make it so that they are saved in the database with styles? For example like this<ul> <li>

<ul class="list margin-top-20">
<li class="template-bullet">

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
snizhok, 2016-02-16
@snizhok

What's the point of binding classes? Why not just write styles for the specified tags. And if you need to style exactly those lists that are entered through the editor, then at the place where the text is output from the editor, wrap them with some tag with a specific class, for example, <div class="text-wrap"></div>and set styles for lists with a parent.text-wrap

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question