-
Notifications
You must be signed in to change notification settings - Fork 1.2k
DraftJS Editor #1256
DraftJS Editor #1256
Conversation
Brainstorm around how we're going to store the data created in the editor. This is the current state:
The good thing about this storage model is that saving messages as plain text is easy and fast. We did that for threads too, but to implement editing we have to store the raw state. The downside is that to implement any kind of more advanced/interactive feature like mentions we have to actually render the Slate state rather than convert it to plain text and render as markdown. |
We'll need to store raw DraftJS state for both threads and messages and then render it out as React components rather than convert it to plain text and render as markdown to support any kind of advanced feature we want to add. From the I'll dig into that! |
There's now a migration script from slate to draft which works almost 100%. There's some small bugs in the library I'm using. At least links and images are fixed by an open PR, maybe also fixes blockquotes and code blocks. (TBD) I've pinged the author to merge that PR so we can move forward with this, otherwise I'll publish a forked version from that PR. |
@mxstbr things are working right with one last issue: when the publish button is pressed on mobile, the url needs to change from |
Done! |
@mxstbr can we move the PoC toolbar to a diff branch so we can just ship this? I don't think that should block shipping tbh. We're way overdue on this imo. |
Oh yeah for sure, let's ship this today! |
Removed the PoC side toolbar, let's ship it tonight when you get up? |
I approved this, but not going to merge bc I don't want to do the migration work. I'm ready to go on this. Down to stay up and ship in your AM too, Max. |
Shipping this as soon as CI has passed. |
Rebuild editor with DraftJS for better cross browser support.
EDITOR
draft-js-import-markdown
).css
files and SSR, ughMIGRATION SCRIPT
Ref and closes #1254. Also closes #1148, closes #1018, closes #1151 and closes #1017 (invalid).