Code Monkey home page Code Monkey logo

Comments (12)

YousefED avatar YousefED commented on June 12, 2024 1

This is because we're adding a so-called trailing node. This makes it easier for users to use their mouse and click below the document and start adding content. It's similar to what notion does.

If you want to disable this, you could try creating a PR. We could add an editor option that would disable the extension here:

from blocknote.

YousefED avatar YousefED commented on June 12, 2024 1

@35C4n0r @ezhil56x Thanks for your submissions! I'll look into the PRs next week (out of town at the moment). Could you make sure to add relevant unit and / or playwright tests?

Also note that only one of you can be rewarded the bounty afaik

from blocknote.

jaredly avatar jaredly commented on June 12, 2024

ooh yes I want this disabled as well

from blocknote.

jaredly avatar jaredly commented on June 12, 2024

@YousefED I can imagine three different levels of intervention:

(1) add an option noTrailingNode: boolean, simple & only solves the present issue
(2) add an option customizeExtensions: (extensions: AnyExtension[]) => AnyExtension[] -- allows the user to remove or modify any of the list of default extensions, allowing users to customize things further
(3) add an option customizeTipTapOptions: (options: TipTapEditorOptions) => TipTapEditorOptions, allowing the greatest amount of control, not just over the extensions that are loaded, but a bunch of other things as well. This would superceded the _tipTapOptions option that's currently available.

Do you have a preference?

from blocknote.

jaredly avatar jaredly commented on June 12, 2024

Alternatively, @moroshko here's the hack that I've figured out, while waiting for PRs to happen and such:

const ext = editor._tiptapEditor.extensionManager.extensions.find((e) => e.name === 'trailingNode');
if (ext) {
    // Disable the trailingNode extension
    ext.config.addProseMirrorPlugins = () => [];
}

from blocknote.

YousefED avatar YousefED commented on June 12, 2024

``
Thanks @jaredly! I feel like this should be a first-class option without needing to know about TipTap, so I'd be in favor of:

(1) add an option noTrailingNode: boolean, simple & only solves the present issue

Small caveat: I'd use trailingBlock: boolean which defaults to true ("Block" is more BlockNote like, and I think it's a bit nicer to not have a negation ("no") ).

from blocknote.

YousefED avatar YousefED commented on June 12, 2024

/bounty 50

from blocknote.

algora-pbc avatar algora-pbc commented on June 12, 2024

💎 $50 bounty created by BlockNote
🙋 If you start working on this, comment /attempt #631 along with your implementation plan
👉 To claim this bounty, submit a pull request that includes the text /claim #631 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to TypeCellOS/BlockNote!

👉 Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @35C4n0r Mar 27, 2024, 3:04:17 PM #665
🟢 @ezhil56x Mar 27, 2024, 3:33:14 PM #664

from blocknote.

35C4n0r avatar 35C4n0r commented on June 12, 2024

/attempt 631

Algora profile Completed bounties Tech Active attempts Options
@35C4n0r 13 bounties from 4 projects
Python, JavaScript,
HTML & more
Cancel attempt

from blocknote.

ezhil56x avatar ezhil56x commented on June 12, 2024

/attempt #631

Algora profile Completed bounties Tech Active attempts Options
@ezhil56x 16 bounties from 10 projects
JavaScript, TypeScript,
Rust & more
Cancel attempt

from blocknote.

algora-pbc avatar algora-pbc commented on June 12, 2024

💡 @ezhil56x submitted a pull request that claims the bounty. You can visit your bounty board to reward.

from blocknote.

algora-pbc avatar algora-pbc commented on June 12, 2024

💡 @35C4n0r submitted a pull request that claims the bounty. You can visit your bounty board to reward.

from blocknote.

Related Issues (20)

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.