-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f748754
commit 0f01c7a
Showing
1 changed file
with
3 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0f01c7a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From
react-rte
todraft-js-plugins
HtmlEditor
is a WYSIWYG html editor currently only used by WorkflowActivityModel, but meant to be used by any application that requires rich text somewhere.Till now it was using
react-rte
https://github.com/sstur/react-rte but the project looks not actively maintained and, even if based on draft-js, not so easy to customize.I've then decided to switch to
draft-js-plugins-editor
https://www.draft-js-plugins.com/, a very basic editor with a plugin architecture and (partial) TS definitions.This plugin architecture should make it easier to allows custom applications to include images, videos, or custom hashtags or user mentions, all features that require a high integration with the application.
If you want to understand more about why draft-js is a better architecture to create rich text editors and how it works under the hoods, here is a nice video: https://www.youtube.com/watch?v=vOZAO3jFSHI
How to update
If you are not using
WorkflowClient
in yourMainAdmin.tsx
, just yarn install inSignum.React.Extensions
should be enough to get rid of the missingdraft-js-plugins-editor
error in Visual Studio.If you are using
WorkflowClient
, the you also need to to add some npm dependencies inpackages.json
and addHtmlEditorSetup.setupStaticToolbar()
to add a basic configuration.Check signumsoftware/southwind@7bcd653 to see all the details.
Cheers!
0f01c7a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.