wagtail / wagtail-generic-chooser

A toolkit for custom chooser popups in Wagtail
BSD 3-Clause "New" or "Revised" License
116 stars 25 forks source link

Provide example for use in rich text editor #13

Closed victoriachan closed 5 years ago

victoriachan commented 5 years ago

Thanks for this! I've successfully implemented this as a collection chooser for a collection field in my page model.

On the readme, it's mentioned that this can be used as a feature on rich text editors as well, but I cannot think of how I may implement this (eg. as a person chooser).

Do you think you can provide an example in the readme file?

Thank you!

gasman commented 5 years ago

Hi @victoriachan, Unfortunately using wagtail-generic-chooser for rich text isn't quite workable yet - the mention of rich text in the readme is more an explanation of why we treat the form widget and the modal views as separate components (since rich text is a place where we use the latter but not the former).

Wagtail's Draftail integration code is currently somewhat hard-coded around the four built-in chooser types (image, document, link, embed) and would need refactoring to support custom choosers - hopefully that will happen soon as part of the commissioned work we're doing over the next couple of months.

victoriachan commented 5 years ago

Ah alright. Will close this issue then. Thank you!