Comments (8)
@artf, you're right again. Whitespace in the node matters. If the text butts right up to the closing node, the first keystroke replaces the text, the next keystroke exits the node, if not, it works as one would expect.
There is an old thread about this (https://github.com/w3c/editing/issues/1560), specifically in webkit and blink, and how they work this way. One of the authors of CKEditor 5 was there, and basically said you have to build an abstraction layer to fix this behavior which is a total PITA in our case.
@Sphenox I'd say that this issue probably existed in the prior release as well from what I read. And, I's also say is likely be too much of a project to build that level of abstraction vs. just using an RTE that already has it built in.
from grapesjs.
Just to clarify, you are referring to the selection of and editing of the text within the link behaving abnormally like this?
from grapesjs.
Yeah, excactly as shown in the video you provided.
from grapesjs.
Okay, I can confirm I am having the same issue. Probably related to the text selection point in the RTE (a guess).
Let's route @artf in on this and see if he has any insights to add.
from grapesjs.
Unfortunately, this is how the default contenteditable works 🤷♂️ (you can reproduce the same behavior there).
The only alternative here is to avoid the built-in RTE (which will be always limited to the native behavior).
from grapesjs.
@artf Let's keep this one open. I can't reproduce with a standard contenteditable as mentioned, and I want to try correcting this behavior.
from grapesjs.
@bernesto I don't know if it helps, but I only noticed this behaviour because I updated the GrapesJS version I was using. Before, I used v0.17.XX, don't remember the excact release.
Before the update, the RTE didn't behave like this.
from grapesjs.
Before the update, the RTE didn't behave like this.
@Sphenox I see the same behavior here: https://jsfiddle.net/3wtjpcro/4/
@bernesto FYI
contenteditable.mp4
from grapesjs.
Related Issues (20)
- BUG: broken link in the API docs
- BUG: Possible upgrade path issue where 'textnode' is now called 'wrapper' from 0.18 -> latest HOT 1
- BUG: Propagating component defaults can break layers when child comments are introduced HOT 1
- BUG: Whitespace handling in inline elements
- BUG: Wrong Type in ColorPickerOptions Interface
- BUG: Building on Windows 10+ HOT 6
- BUG: XSS vulnerability in iframe attribute src HOT 8
- BUG: ColorPicker Offset incorrect when Panels are outside of Editor Container HOT 4
- BUG: The link titles are not editable HOT 2
- BUG: Wrong Type for "content" property in BlockProperties
- BUG: component.get('traits').clone() is no longer available. HOT 1
- BUG: Outlines persist in preview mode HOT 2
- BUG: CSS properties default values HOT 2
- BUG: Editing button text no longer works on 0.21.9 HOT 1
- BUG: How to add a addtional custom block manager like tab or section like block manager and style manager ,and add some blocks it to it? HOT 1
- BUG: typping error in dist/index.d.ts
- BUG: Filtering Blocks does not work as described in Docs HOT 2
- BUG: Unnecessary Canvas style HOT 3
- Interested in Collaboration?
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 grapesjs.