Hey everyone!
As you might have seen in recent threads / GitHub issues, I've been working on a drop-in WYSIWYG editor extension for Flarum. To make that possible, we made some refactors for core and bundled extensions that decouple the editor from the default textarea implementation via a driver system.
Today those refactors merged, so I am pleased to announce that my WYSIWYG editor extension will be releasing with beta 16, as well as a checkbox extension and an update to the markdown tables extension. I want to open up a preview for feedback before the release.
I haven't tagged these yet so they aren't available for download via packagist (mostly to discourage running production on dev-master, which is a very bad idea). For now, I've set up a demo site at http://wysiwyg.flarum.site/ (works just like the nightly/beta demo sites in terms of signing up). I would highly appreciate testing and feedback before the next release.
@neptronix @Bishwas-py I know you have especially expressed interest in this, would be interested in hearing opinions.
FAQ
Is it a bundled extension?
No, at least for now. We might re-evaluate that decision after stable, but for now, it's going to be published and maintained by me personally. That being said, the new editor driver is part of public API, and the editor implementations are mostly pure JS, so it shouldn't experience issues with Flarum updates for the forseeable future.
How much will it cost?
To quote the extremely annoying and even more misleading TurboTax ads, "Free Free, Free Free Free".
What does it support?
By default, everything from https://s9etextformatter.readthedocs.io/Plugins/Litedown/Syntax/ except indented codeblocks and lines under headers. The tables and checklists extensions add support for https://s9etextformatter.readthedocs.io/Plugins/PipeTables/Syntax/ (currently not for compact tables) and https://s9etextformatter.readthedocs.io/Plugins/TaskLists/Synopsis/.
BBCodes will not be WYSIWYD'ed. However, symbols used for them shouldn't be escaped so you should still be able to use them.
What's it written in?
It's based on the excellent ProseMirror editor framework.
Is it extensible?
Yes! The markdown tables and tasklists extensions are meant as a proof of concept of how flexible it is. However, ProseMirror is quite challenging to work with, so these kinds of extensions are quite advanced.
If you're interested in extending it and are very familiar with JS, feel free to reach out.
Does it work with mentions, emoji, and fof upload?
Mentions and emoji already, fof upload mostly (will be fully shortly, I've sent an update PR).
Can users opt out?
Yes, on their settings page there's a preference.
Are there any cons?
This extension has substantial bundle size, about 350kb minified (gzipped will be smaller). For most (especially nontechnical) communities this will be worth it, for others, it might not be. We are looking into code splitting opportunities to reduce the TTFB impact, but that is quite challenging and will likely take a while. Note that this is still considerably less than Flarum competitors.