Rich Text and HTML Editors
There have been some new releases in the Rich Text Editor over the years, (http://docs.releasenotes.salesforce.com/he-il/winter15/release-notes/rn_general_html_editor_updates.htm), but we still have the problem of having 4 different HTML (or Rich Text) Editors. And now MORE with Lightning and Quill!
- Standard HTML Editor for Rich Text Fields no text formatting functionality, No View Source. Completely useless.
- Case Feeds HTML Editor https://help.salesforce.com/HTViewHelpDoc?id=case_interaction_sending_email.htm&language=en_US - Font, Size, Format and colour, no View Source. (This is where you DON'T what users to be adding all sorts of colours and fonts - all formatting should be controlled through the HTML Email templates to maintain a corporate style).
- Knowledge Article Editor - good enough text formatting, and View Source. If this one were everywhere, I could just about cope with that.
- HTML Email Editor - old and ugly, but still has some basic formatting functions like Font and Size.
- New Lightning Email Editor - just to make things completely different again. Again, font and size should be a corporate style thing - AND THERE IS NO WAY TO INSERT AN IMAGE!
- New Quill JS Editor in Notes in Lightning Spring '17 - oh we have just gone so backwards. NO HTML LINKS! How is that even possible? But there are images!
A Note about Quill
QuillJS is the new Rich Text Editor for Salsesforce. Basically, due to some security issues (part of Lightning Locker Service), all the Rich Text Editors need to be replaced. Quill is apparently built by ex Salesforce people, and is one of the only editors that works with the new security settings. You will see at the moment (Spring '17) that Rich Text Editors do not work in Sandbox because Locker Service is enabled by default. In Spring '17 they introduced Quill to one section of Lightning - Notes.
Quill is Open Source - maybe I should contribute - but that doesn't mean it will get into Salesforce.
Issues with Quill in Spring '17 in Notes
- Don't need underline
- Need Hyperlink
- Need keyboard shortcuts at least for the same things as on the toolbars
- Need headings 1, 2 and 3. With keyboard shortcuts.
- Would LOVE markdown.
- Where has the Task functionality gone???
Notes should be a place where you quickly jot down what you are thinking - it should work like SimpleNote or Confluence or even Word or Google Docs if you don't touch any of the styles. Just quickly jot things down, apply some headings, bullets, numbering and maybe turn those lists into tasks.
It doesn't paste from Word adequately at all - well it strips out formatting nicely, but the rest is not good at all.
- Some lines of text get put over two lines
- Numbers are separated from their paragraph and separated by two lines.
- Many line breaks
This is not good. Not good at all.
This is the HTML it saved
<div><p><br></p><p><br></p><p>A simple note document:</p><p><br></p><p><br></p><p>- </p><p>Would have some bullets</p><p><br></p><p><br></p><p>- </p><p>And another bullet</p><p><br></p><p><br></p><p>And maybe some <b>bold</b></p><p>and <i>italics</i> for emphasis:</p><p><br></p><p><br></p><p>1. </p><p>And a numbered list</p><p><br></p><p><br></p><p>2. </p><p>Continuing. </p><p><br></p><p><br></p><p>And a hyperlink to <a href="http://www.google.com/" target="_blank">google</a></p><p>for good measure. </p><p><br></p></div>
Well, look I can be thankfull it didn't save ALL the word style info, so that is good. Now if it could just fix up the extra spacing then it might be on the right track.
Look, we ALL know that 90% of sales type people are going to write their notes in word and upload the word document, or paste it into notes. If you can't even get pasting from Word right, then we have a problem. How is this even going to work for Knowledge articles.
Things I want in a Text Editor
See my blog post from years ago about formatting in text editing https://thedetaildept.com/2012/07/31/confluence-is-not-a-word-document/. This is the reason I use Confluence, and still love it. I would prefer full Markdown though. Keep your hands on the keys, let the words flow out. Do some simple formatting as your are typing.
Minimum Requirements
- Ability to turn off formatting options at a system-wide or permission based level.
- No, there is NO reason to have pink as a font colour, or 28pt font in corporate communications - unless of course that is part of your corporate style.
- No there is NO reason to have underlined text in the same document that you have hyperlinks. WHY OH WHY IS UNDERLINE STILL A THING IN QUILL?
- You get to rid your corporate communications of Comic Sans for ever!
- Keyboard shortcuts for headings eg ctrl+1, 2 etc - similar to Word or Google Docs (note they both have different key combinations.
- Keyboard shortcuts for bullets and numbering.
- Keyboard shortcuts for standard things like insert hyperlink (ctrl+k)
- Strips out all extra formatting when text is pasted from Word.
- Paste into word with appropriate formatting only (eg keep bullets and numbers).
Great to have features
- Markdown style editing as an option - eg even Word has put stars around a word to make it bold (yes you can turn it off).
- This allows you to keep your hands on the keyboard.
- A predefined set of styles that the user can choose from in the corporate style guidelines - eg Heading 2 is always 1.2em Arial Bold.
- But ensuring that only <h2> is saved in the raw HTML that is saved, and that the styles are only applied by CSS in the text editor.
- But this depends on where the text is displayed and that that applies the styles consistently.
- And if it is in an email that it knows that it has to save the styles as inline styles into the raw HTML.
- The ability to paste images in or drag and drop them in, and if they come from a URL keep the URL (eg serving images up from an external CDN).
- Allows for typing in markdown which formats the text into HTML
- Allows for users to choose only a restricted set of styles' to maintain the corporate style guide.
- Sets the base style to match the corporate style guide
- Limits the styles that can be used - eg, there is no place for underlined text in any online documents as it gets confused with a hyperlink - so underline is NOT an option.
- Allows for ctrl+1, 2 etc keyboard shortcuts for heading styles so it it's similar to Word for quick editing.
If I ruled the world
Here's my spec for Rich Text editors if I ruled the world.
Alternote is a fabulous editor.
- Font Size
- Font Style
- Strikethrough
- Font Colour
- Background Colour