Code highlighter threshold#4
Conversation
| RootNode, | ||
| TextNode, | ||
| LineBreakNode, | ||
| CodeLineNode, |
There was a problem hiding this comment.
We should not add line node here (by default), it should be added by editor user if they actually want to have code nodes. IT should be registered at the same place where CodeNOde and CodeHighlightNode are registered
| const childKey = children[children.length - 1]; | ||
| const node = nodeMap.get(childKey); | ||
| return $isLineBreakNode(node) || $isDecoratorNode(node); | ||
| return $isCodeLineNode(node) || $isDecoratorNode(node); |
There was a problem hiding this comment.
Need to rollback linebreak -> isColdeLineNode changes in reconciler, selection and utils. We should keep all changes for the code blocks with lexical/code. Reason for it: codeNode is not a core node, meaning it's not required for editor to have it registered to work. Hence all features/functionality should be isolated into its own package
We can look into reasons why this change was required after that
| @@ -0,0 +1,171 @@ | |||
| /** | |||
There was a problem hiding this comment.
Need to move this into @lexical/code
|
Hi guys, I am new to this field and I really wanna contribute. But I don't know even where to start. I have some knowledge in C and Java. Can anyone please help and guide me? |
Issue 2118 - Introduce
CodeLineNodethat will wrap each line of code..