Rich Editor coming out of beta & Rich Editor file attachments
With the 2.8 release Rich Editor will be coming out of beta and will be the default on all new sites for mobile and desktop.
In order to make this possible we've been rapidly improving Rich Editor. Here's a few of the improvements we've made since the beta went out:
File Attachments
Rich editor supports file attachments in the post contents. Here's a couple examples.
These attachments are controlled by the Garden.Uploads.Add permission.
Syntax Highlighting / Code prettifying
Our new syntax highlighting is even better than what our previous code-prettifying plugin did. It is built into rich editor and works live in the editor as you type!
Here's an example using the code that starts up the syntax highlighter.
/**
* @author Adam (charrondev) Charron <adam.c@vanillaforums.com>
* @copyright 2009-2018 Vanilla Forums Inc.
* @license GPL-2.0-only
*/
import BaseSyntaxModule from "quill/modules/syntax";
import Quill from "quill/core";
import CodeBlockBlot from "@rich-editor/quill/blots/blocks/CodeBlockBlot";
/**
* Override the core syntax module to register our own code block.
*/
export default class SyntaxModule extends BaseSyntaxModule {
public static register() {
super.register();
Quill.register(CodeBlockBlot);
}
/**
* Overridden to ensure quill has focus before resetting the selection
* because quill selection does not always get moved away from quill when focus moves.
*
* For example opening the paragraph menu retains selection, but the setSelection at the end here
* would clear remove focus from the paragraph menu.
*
* Check if this needs to be removed with Quill 2.0.
*/
public highlight() {
if ((this.quill as any).selection.composing) {
return;
}
this.quill.update(Quill.sources.USER);
const range = this.quill.getSelection();
const hasFocus = this.quill.hasFocus();
(this.quill as any).scroll.descendants(CodeBlockBlot).forEach(code => {
code.highlight(this.options.highlight);
});
this.quill.update(Quill.sources.SILENT);
if (range != null && hasFocus) {
this.quill.setSelection(range, Quill.sources.SILENT);
}
}
}
Bug Fixes
We're fixed numerous bugs affecting rich editors integration with various other parts of our systems.
- Rich Editor now mounts on every page.
- Rich Editor posts (as well as BBCode & Markdown which weren't) are now formatted in notification emails.
- Rich Editor now works with signatures.
- Rich Editor can no successfully paste almost any content while converting most of its formatting. This was recently tested in a sprint demo where an entire article from our public documentation was successfully copied and pasted into the editor with all formatting (line breaks, headings, paragraphs, bold, italic, etc) preserved.
For Advanced Editor Users
While we are still working on Advanced Editor -> Rich conversion tools, existing users of Advanced editor can set Rich Editor as their default editor without losing any existing content. Just be sure to leave on Advanced Editor as well an editing an existing post in bbcode, markdown, html, text, textex or wysiwyg will continue to use advanced editor.
Comments
-
I just had this thought as I tried to figure out how to do bullet points while writing a post - why don't we have a little link to the documentation the same way we have had a link to what markdown is on wikipedia.
I know documentation is typically for Admins but end users are going to be the ones using the Rich Editor as well. It doesn't make sense for our clients to constantly have to educate their clients on how our product works or have the guidelines posted somewhere.
Ya end users might see a lot of stuff that isn't relevant to them so maybe some other kind of static page would be better than our docs website. However, if we want there to be adoption of this editor, which by i's nature is definitely 'different' than what most are used to, it's going to have to be clear to them how it works.
5 -
How does rich editor handle superscript and subscript?
0 -
We don't support that for the moment. Not sure if it's planned.
1 -
I just had a request for sub/superscript support, as well.
0 -
That might actually do the trick, but how would it end up looking in the Rich Editor? The client requesting this is a wind/solar energy group, so I'd say they're fairly technical (at least in their field), but I'd still worry about some end-users being left confused if the formatting option wasn't easily accessible.
0 -
By default it would look kind of like this, although we could likely make it a bit nicer with some effort. All depends on how important the client is whether we need to make a great expression editor or just one that fulfills the requirements.
0 -
The client that I'm talking to is a starter client, so probably not really high up priority-wise, but they have been with us for four years now - so there is some loyalty there that I feel shouldn't be forgotten.
For their case though (just wanting to super/sub-script certain things), I think it would work fine.
0 -
@Andrew_D If the customer has given you a more detailed request then forward it to product@vanillaforums.com and it will get a vote.
I will consider stuff that has a story attached to it, but am unlikely to add a feature based on a raw request. To illustrate why you can look to this thread.
- Maybe they are entering math or science formulas. In that case @Adam Charron's solution would be best.
- Maybe their community writes sarcastic sentences as subscript. This would go against our vision so nope.
- What else are they doing? Maybe knowing would allow us to add one tiny thing that would cater to an entirely new market and unlock countless new customers.
0 -
I'm going to steal @BrendanParm's slack post and leave this here:
Congratulations on getting this out team!
I must also say I am relieved to see a nice review of the feature. This editor was a bit of a gamble for us because so many people are entrenched in the old bbcode/markdown way of doing things. If we make sure the editor is a success then it's a major differentiator between us and the competition and shows that we are a forward thinking product.
1 -
Rapidminer is very excited about the rich text editor, and is wondering if we plan on adding numbering to the code blocks? They use a TON of code blocks so this would be a big win for them as an option.
0 -
No immediate plans. Get the requests in and we'll gauge interest. Are line numbers something that quill supports "out of the box" @Adam Charron?
0 -
It’s not a Quill thing. We’d just have to do the CSS for it I think. FWIW the open source forum currently has the old code prettifier and rich editor code style on. You don’t get lines in the editor but they appear in the output content.
Probably not too big of an issue @Todd
Edit:
Example from the open source forum:
1

