Closed heldinz closed 7 years ago
You are completely correct about this issue. The wysiwyg logic was originally part of the text plugin, which moved to the core with the PluginHtmlField
option.
The curlpit is the admin_init_template = "admin/fluent_contents/plugins/text/admin_init.html"
in the text plugin, which adds the wysiwyg editor. The wysiwyg initialization should off course be placed in the standard HTML templates, when a plugin includes the PluginHtmlField
in the form.
If you can provide a pull request for this, I'd be happy to accept it! That would be the fastest way to solve it properly (or you'd have to wait until we have time to fix it).
Thanks for getting back to me! I'll try to get to it in the next few days.
Hello. I have just came up against this issue as well. I do not want a dependency on django-wsyiswg. Could a simple check in enable_wysiwyg
and disable_wysiwyg
suffice for now?
if (typeof django_wysiwyg === "undefined") return;
Happy to submit a PR.
@m-sanders: thanks, that is a good point. I'd be happy to accept a PR on this!
Hello. What about my PR #88?
Sorry, it's merged now!
If
fluent_contents.plugins.text
is not installed and included in the list of plugins for a PlaceholderField, a JavaScript ReferenceError occurs in the admin interface.Trace:
I'm working around this by including the Text plugin so that
django_wysiwyg
is loaded, but it doesn't seem right to assume that this will always be present.