Comments (12)
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.
@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.
ooh yes I want this disabled as well
from blocknote.
@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.
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.
``
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.
/bounty 50
from blocknote.
💎 $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 bounty • Share 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.
/attempt 631
Algora profile | Completed bounties | Tech | Active attempts | Options |
---|---|---|---|---|
@35C4n0r | 13 bounties from 4 projects | Python, JavaScript, HTML & more |
Cancel attempt |
from blocknote.
/attempt #631
Algora profile | Completed bounties | Tech | Active attempts | Options |
---|---|---|---|---|
@ezhil56x | 16 bounties from 10 projects | JavaScript, TypeScript, Rust & more |
Cancel attempt |
from blocknote.
💡 @ezhil56x submitted a pull request that claims the bounty. You can visit your bounty board to reward.
from blocknote.
💡 @35C4n0r submitted a pull request that claims the bounty. You can visit your bounty board to reward.
from blocknote.
Related Issues (20)
- Handle Images/Tables combined with Text when Parsing HTML HOT 1
- List placeholder shows on top of pasted custom inline element HOT 1
- Global Dragstart events might be interfering with text selection in custom block. HOT 3
- Mantine adding data-mantine-color-scheme to the html tag HOT 1
- :sparkles: Editor API for AI Text Suggestion HOT 2
- Unable to have "focus stealing" components in Suggestion menu and formatting toolbar HOT 4
- Table doesn't save columns width after refresh
- Slash menu scrolls the page to top when triggered first time after loading document.
- Multiple editor instances cause duplicates on drag&drop
- Bug: Cannot add space at the end of a custom block's content HOT 3
- Placeholder customization, to add a new text or data HOT 1
- About the best rerendering strategy HOT 1
- Passing a new theme object causes editor to lose focus HOT 2
- Add custom comment data to my editor block
- Question: How to add/overwrite keyboard shortcuts? HOT 1
- Setting Text Cursor Position
- Slash menu style is distorted on Next.js project HOT 10
- video embedding feature HOT 1
- Possible to create forms using BlockNote Editor Custom Blocks? HOT 1
- Ability to drag blocks next to each other to create columns HOT 1
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 blocknote.