Могу ли я добавить класс к абзацам в редакторе Quill?

Есть ли способ, чтобы редактор Quill вставлял класс в каждый div, чтобы я мог регулировать интервал между абзацами с помощью CSS вместо тегов br?

Вот один из примеров, когда он использует эти br:

<div class="ql-editor" id="ql-editor-1" contenteditable="true">
  <div>
      <span style="font-size: 18px;">One Ring to Rule Them All</span>    
  </div>
  <div>
    <a href="http://en.wikipedia.org/wiki/One_Ring">http://en.wikipedia.org/wiki/One_Ring</a>
  </div>

  <div><br></div>

  <div>Three Rings for the <u>Elven-kings</u> under the sky,</div>
  <div>Seven for the <u>Dwarf-lords</u> in halls of stone,</div>
  <div>Nine for <u>Mortal Men</u>, doomed to die,</div>
  <div>One for the <u>Dark Lord</u> on his dark throne.</div>

  <div><br></div>

  <div>In the Land of Mordor where the Shadows lie.</div>
  <div>One Ring to <b>rule</b> them all, One Ring to <b>find</b> them,</div>

  <div>One Ring to <b>bring</b> them all and in the darkness <b>bind</b> them.</div>
  <div>In the Land of Mordor where the Shadows lie.</div>
</div>

person Aidan Miles    schedule 20.11.2015    source источник


Ответы (1)


Теги <br> используются только в пустых строках и не являются обязательными. Лучший способ повлиять на CSS строк Quill - использовать селекторы потомков.

person jhchen    schedule 23.11.2015