askvortsov/flarum-rich-text

Rich Text Editor for Flarum

Installs: 1 902

Dependents: 1

Suggesters: 0

Security: 0

Stars: 6

Watchers: 1

Forks: 2

Open Issues: 5

Language:JavaScript

Type:flarum-extension

v2.1.0 2021-08-21 14:36 UTC

This package is auto-updated.

Last update: 2021-08-30 15:00:56 UTC


README

License Latest Stable Version

A Flarum extension. Fully integrated Rich Text Editor for Flarum.

Screenshot

Installation

Use Bazaar or install manually with composer:

composer require askvortsov/flarum-rich-text:*

Updating

composer update askvortsov/flarum-rich-text

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.

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?

Yes.

Can users opt out?

Yes, on their settings page there's a preference. You can also enable a setting in the admin dashboard that will add a toggle directly to the editor.

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.

Links