Comments (4)
When you override the node, you shouldn't pass the 'key'. Before it was silently failing, right now we just made the error visible.
from lexical.
What @ivailop7 is saying is correct, people used to make this mistake and the error message happened later in a confusing place. Here you get it much sooner. Specifically this is the code that's broken:
with: (node: TextNode) => {
return new FoxTextNode(node.__next!, node.__key);
},
It should be this:
with: (node: TextNode) => {
return new FoxTextNode(node.__text);
},
from lexical.
Is seems work if I remove replace config in node registry list. Plz update your documents if things have changed
from lexical.
What @ivailop7 is saying is correct, people used to make this mistake and the error message happened later in a confusing place. Here you get it much sooner. Specifically this is the code that's broken:
with: (node: TextNode) => { return new FoxTextNode(node.__next!, node.__key); },It should be this:
with: (node: TextNode) => { return new FoxTextNode(node.__text); },
Thanks, that works.
from lexical.
Related Issues (20)
- Bug: Mentions Format was not applied, the Font size style was not applied in html
- $convertToMarkdownString does not slashify HOT 1
- Bug: Can't type spaces in collapsible title after deselect in Firefox
- Bug: HorizontalRuleNode breaks TableCell in some case
- Bug: n.matchAll is not a function. (In 'n.matchAll(/\S+/g)', 'n.matchAll' is undefined) HOT 2
- Bug: CI fails because it can't set up Node HOT 1
- Bug: $generateNodesFromDOM only generates plain text HOT 1
- Bug: Selection formatting/styling is lost when you indent a list
- Bug: Pasting text from the clipboard into a CustomElementNode does not work properly
- Feature: Scroll for table HOT 9
- Bug: 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 8
- Bug: 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 9
- Bug: Tables ignore alignment HOT 1
- Bug: the undo command behaves incorrectly, requiring two undo actions to revert a single change. HOT 1
- Bug: Redo doesnโt work by Key Board (command + Y) HOT 1
- Bug: _cell gets lost on child table cell nodes when parent table is resized in the playground
- Bug: highlight TextFormatType is missing in importDOM losing state HOT 1
- Feature: Get markdown content for selection HOT 4
- Feature: Support for admonitions
- Bug: Editor Crash when selecting an empty paragraph with an image HOT 2
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 lexical.