springload / wagtailcommonblocks

Common StreamField blocks for Wagtail
https://pypi.python.org/pypi/wagtailcommonblocks
MIT License
40 stars 10 forks source link

Update SimpleRichTextBlock and SimpleRichTextField to Draftail? #8

Open loicteixeira opened 6 years ago

loicteixeira commented 6 years ago

I believe SimpleRichTextBlock and SimpleRichTextField have been broken for a long time. Indeed, despite defining a small set of available elements, with Wagtail prior 1.12, the toolbar shows some additional elements:

1_8_toolbar

In addition, it is now outdated:

7 make just make it work™, but given the confusing behaviour (see above) and that there is no tests, I woulnd't feel too confident upgrading the package on a production website which is using either SimpleRichTextBlock or SimpleRichTextField.


It looks like the expected behaviour was:

  1. Restrict the list of features to: paragraphs, bold, italic, unordered lists, ordered lists, links and document links
  2. Allow some attributes on links?
  3. Allow arbitrary html to be pasted in

Assuming we were update it to use the Draftail editor:

  1. Should be achievable with features
  2. Will need investigation
  3. I'm afraid it's not possible at the moment so it might be an issue
loicteixeira commented 6 years ago

The branches wagtail-1.6 and fix/hallo_widget might be worth checking as they seems to work on the hallo editor.