springload / draftail

📝🍸 A configurable rich text editor built with Draft.js

Home Page:https://www.draftail.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add options (classes) to lists

jozo opened this issue · comments

commented

I'm using Wagtail and I would like to add to Draftail the possibility to mark items in a list as "pluses" or "minuses". Then the li element would have a class with the value "plus" or "minus". What is the best way to achieve that?

Based on docs I think the only option is to create a new entity. However, I don't want to re-implement all the functionality that the default list entity has.

I imagine li element would have a tooltip similarly as in this example in docs. In the tooltip, there would be checkboxes with classes (plus, minus, etc.). How to do it?

Which terms did you search for in the docs, issues, Stack Overflow?

  • In the https://www.draftail.org/ documentation I searched for: I read everything in section Introduction and Guides
  • In the issues / pull requests, I searched for: class
  • In Stack Overflow, I searched for: draftail (read titles of all 66 questions and checked some questions)