0

maybe I don't understand draft-js idea at all but I can't find answer on important question for me.

  1. How can I use own css selectors ID's and classes.

I know that if I'll create decorators I can add action create-row add there <div class="row"></div>

But I need to also for elements add own css selectors and id's.

I have no idea how I can add this functions to draft to export html with my id's classes.

My goal is use draf-js to create page content (standad add, images, columns) based on Zurb Foundation sites framework and I need to export html with correct classes and extra I need to add addtional classes for some elements to add extra css.

All tutorials what I watched based on add links, embed videos etc. but all time html result without extra elements like class, id data-foo

jaroApp
  • 849
  • 3
  • 13
  • 27

1 Answers1

0

put any extra data to the data field of entity or block, and use them in render() of your custom component.

Jiang YD
  • 3,205
  • 1
  • 14
  • 20
  • Thanks for answer. I've been tried data in `data` field of entity and I used export to html without result. I'll try again. Good to know that this is correct way – jaroApp Jun 01 '17 at 07:49