ignitionworks / draftjs_exporter

Export Draft.js content state into HTML.
MIT License
16 stars 20 forks source link

Link entity not required by default #3

Closed avk closed 7 years ago

avk commented 7 years ago

Just noticed that when following the config in the current README:

config = {
  entity_decorators: {
    'LINK' => DraftjsExporter::Entities::Link.new(className: 'link')
  },
  # ...
}

This line

DraftjsExporter::Entities::Link.new(className: 'link')

fails with NameError: uninitialized constant DraftjsExporter::Entities::Link unless I do an explicit

require 'draftjs_exporter/entities/link'

Any reason the Link entity shouldn't be required by default?

theozaurus commented 7 years ago

People may not want the Link entity which is why it's not required by default (or they may want a different type of link entity). If you can think of a way of making the documentation clearer in this respect please make a pull request.

Thanks,

Theo