Giter Club home page Giter Club logo

Comments (4)

aivo0 avatar aivo0 commented on June 1, 2024 2

@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.

sibiraj-s avatar sibiraj-s commented on June 1, 2024

Thanks. Will check this. Sorry for the delay.

from svelte-tiptap.

sibiraj-s avatar sibiraj-s commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.