Comments (4)
Hello @damir-i , initialEditorState
property of RichTextPlugin
is deprecated with Lexical 0.5, see;
facebook/lexical@8cba075
Seems like, the functionality of initializing an editor state is moved to LexicalComposer
;
https://lexical.dev/docs/concepts/editor-state#understanding-the-editor-state
<LexicalComposer initialConfig={{
editorState: initialEditorState
}}>
<LexicalRichTextPlugin />
<LexicalOnChangePlugin onChange={editorState => editorStateRef.current = editorState} />
<Button label="Save" onPress={() => {
if (editorStateRef.current) {
saveContent(JSON.stringify(editorStateRef.current))
}
}} />
</LexicalComposer>
We need to adapt verbum to this changes accordingly.
from verbum.
Thank you for your response, I will keep using the older version until this is adapted.
from verbum.
Thank you for your response, I will keep using the older version until this is adapted.
0.4.1 is now released with initialEditorState
feature.
from verbum.
hey there @ozanyurtsever, i'm new to verbum/lexical. is initialEditorState
how we would set an intial value in the editor?
my usecase: we have a form, onChange we save to our data, before submission a use can preview their submission (new page), but they can go back to change things, but the editor is blank. i'd like to paste back in that data we saved from their current work in progress.
so need to know how to set the ('.ContentEditable__root').innerHTML with an initial value, thanks!
from verbum.
Related Issues (20)
- Upgrade lexical to 0.8 HOT 1
- Allow access to LexicalComposerContext HOT 4
- can't use ctrl +v paste image HOT 1
- Feature: Editor's size, font-size, font-family HOT 3
- YouTube doesn't seem to export to html
- global CSS names missing namespaces HOT 4
- In next.js 13, Error: Unable to find an active editor state HOT 3
- Toolbar z-index
- New release? HOT 7
- Custom Node and Plugin
- Disable CharacterStylesPopupPlugin
- No Emoji Support? HOT 3
- Lexical.dev.js:9060 Uncaught Error: Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update() or editorState.read(). HOT 1
- Error: parseEditorState: type "heading" + not found
- Uncaught Error: updateEditor: selection has been lost because the previously selected nodes have been removed and selection wasn't moved to another node. Ensure selection changes after removing/replacing a selected node. HOT 1
- How to Programmatically Update Editor State in verbum HOT 2
- Verbun inside react hook form causes any action to submit the form
- Footnote Plugin
- Over 660 stars yet no live demo and the example code doesn't work in next 13 HOT 4
- DropDown position doesn't align with toolbar buttons
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from verbum.