Comments (4)
@zwz this is not a library problem but library documentation issue - the example is broken. Note that it is even worse on Firefox where one cannot even move with the down arrow. If you look at https://tiptap.dev/guide/node-views/react the span in the Component.jsx has contentEditable={false} . The reason is explained by ProseMirror's author here: https://discuss.prosemirror.net/t/nodeviews-with-contentdom-stops-the-cursor-movement-for-a-node-with-text-content/3208/6 "Generally, if you’re going to add non-content DOM structure in a node view, you have to make sure you set it uneditable, or the browser will move the cursor into it (and then ProseMirror will move it out again because it doesn’t consider that position a valid selection endpoint)."
I added contentEditable={false} to the span in https://github.com/sibiraj-s/svelte-tiptap/blob/master/src/routes/_components/Editable.svelte and it fixed the issue.
from svelte-tiptap.
Thanks. Will check this. Sorry for the delay.
from svelte-tiptap.
Thanks @aivo0 . I did not notice your comment. Yes indeed that is the solution. Make sure to add contenteditable=false
to the elements that are not intended to be edited.
from svelte-tiptap.
Related Issues (19)
- Demo link points to unrelated project HOT 2
- Add ability to add/remove svelte components from example? HOT 2
- Minimal example in readme does not work without one extension HOT 3
- how to dynamically update the editor content ?
- Critical error when trying to use with SvelteKit 1.0 HOT 14
- Packaging Upgrades HOT 3
- Typescript types are not in the dist HOT 5
- Editable component doesn't allow backspace or most editing operations if initial content is empty. HOT 2
- Support of Mention/Suggestion extension HOT 1
- No idea what to do... HOT 1
- Help with the `isActive` reactivity HOT 4
- Whole node is draggable HOT 6
- handling unused props with `SvelteNodeViewRenderer` HOT 7
- Could not resolve "@tiptap/extension-floating-menu" HOT 3
- What is the purpose of svelte-component-selected? HOT 3
- Bubble menu glitches when the editor changes positions HOT 6
- Demo site and basic tutorial don't work HOT 3
- Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'element') at init HOT 4
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 svelte-tiptap.