This would be fun to add early on, even though behind the scenes it's just another Text field.
We should try and create a really great content authoring experience for Keystone 5, and I've been looking at Slate as the basis for our rich content editor.
It's also a good use of our new ability to have independent field packages.
So this task is to:
Create a new package for @keystonejs/field-html-wysiwyg (we shouldn't bundle it by default, because the choice of editor is opinionated, and if you don't need it then let's not add the weight)
Get a good default setup of Slate running in the Field UI Component
Keep the Implementation of the field simple, separately we'll start extracting common functionality for basic data type fields into shareable packages so we don't keep repeating the code for queries / logic / etc
Styles sheets used when previewing/editing. Should be configurable for the field I guess?
Classes that are available to set within the editor?
All text values should be sanitised for HTML but obviously HTML (and markdown) fields are more complicated since many tags are valid. We need to decide how this is configured and pick some sensible defaults.
This would be fun to add early on, even though behind the scenes it's just another Text field.
We should try and create a really great content authoring experience for Keystone 5, and I've been looking at Slate as the basis for our rich content editor.
It's also a good use of our new ability to have independent field packages.
So this task is to:
@keystonejs/field-html-wysiwyg
(we shouldn't bundle it by default, because the choice of editor is opinionated, and if you don't need it then let's not add the weight)Field
UI Component