Comments (4)
To be clear, I don't think that the presence of a tab should spawn a new block (edit: text node) at all.
from lexical.
@steveluscher please could you also paste in the step recorder output test case? Might as well use it given we have it!
from lexical.
{
name: '<YOUR TEST NAME>',
inputs: [
insertText("v"),
moveNativeSelection([0,0,0],2,[0,0,0],2),
insertText("C"),
deleteWordForward()
],
expectedHTML: '<div contenteditable="true" data-outline-editor="true"><p class="editor-paragraph" dir="ltr"><span>ABC</span><span></span><span>EFG</span></p></div>',
expectedSelection: {
anchorPath: [0,1,0],
anchorOffset: 0,
focusPath: [0,1,0],
focusOffset: 0,
},
},
The insertText("v")
isn't really accurate. That was the clipboard paste. You can file that as another bug if you like :)
The problem is that you can't type tabs in the example app. I have to paste.
from lexical.
Looks like the reason we split up the text node into multiple blocks on the first paste is because of the useMentions
hook. As there are capital letters, it prepares the text for potentially needing to be a mention. The reason it happens again is because of the useMentions
plugin again, applying a split. I'll look into how the plugin can undo it's split when it detects no results :)
from lexical.
Related Issues (20)
- Bug: CJK composition broken in android firefox
- Bug: ForwardRef Build Issue HOT 4
- Bug: Link node at the end of paragraph is persisted when replacing the entire paragraph after it has been selected via triple-click
- dir is not computed correctly when paragraph starts with a link
- Bug: after undo, input anything will be wrong
- Feature: Document the withKlass option for node replacement
- Feature: Expose <ContentEditable /> HTMLElement ref HOT 6
- Bug: Cut from a table doesn't remove values
- Feature: Document RootNode semantics/special cases
- Feature: Ordered lists starting with upper roman/ lower roman numbers HOT 1
- Bug: $selectAll do not set the selection `style` parameter from the anchored text node
- Bug: history should work with custom TextNodes containing non-standard properties HOT 1
- Allow table update on attribute changes in case of extending (overriding) TableNode
- Bug: build failure on astro integration test due to node version
- Bug: Copy/pasting an image from Slack to Lexical does not work HOT 1
- Bug: Wrong new line (\n) in some cases with the option shouldPreverseNewLines = true HOT 5
- Feature: Deprecate Lexical HOT 2
- Bug: Text mode is not respected when patching text style
- Bug: AutoLink crashes the editor HOT 1
- Bug: "shouldPreserveNewLines" erroneously merges the second node with the above node on conversion back from markdown 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.