Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Barebones core editor #1920

Closed
flaviouk opened this issue Sep 21, 2021 · 6 comments
Closed

Barebones core editor #1920

flaviouk opened this issue Sep 21, 2021 · 6 comments
Labels
Type: Feature The issue or pullrequest is a new feature

Comments

@flaviouk
Copy link
Contributor

The problem I am facing
I'm not able to get a barebones editor, the current base editor (without any extensions) still adds a few core extensions regardless. I need this to have more control over what event listeners are being started
https://github.com/ueberdosis/tiptap/blob/main/packages/core/src/Editor.ts#L222

The solution I would like
An option flag to disable this.

Alternatives I have considered
Fork @tiptap/core

I can do this myself, just wanted to know if you'd welcome a PR and what the name for that flag would be?

@flaviouk flaviouk added Type: Feature The issue or pullrequest is a new feature v2 labels Sep 21, 2021
@philippkuehn
Copy link
Contributor

Do you want to disable all core extensions or just a few some specific ones?
And can I ask why you want to disable them? The clipboardTextSerializer, focus events or the default keymap?

@flaviouk
Copy link
Contributor Author

Pretty much all core extensions yes, I want to be able to pick exactly what I need for performance reasons in my application. eg. Because I have many editors in the page, having a centralised place with all the keymap/paste events is necessary. I think focus events are fine? Just having issues with too many keymap/paste firing

@philippkuehn
Copy link
Contributor

what about core commands? these are registered by an extension too. maybe it would make sense to export the core extensions, so you could use them if needed.

@flaviouk
Copy link
Contributor Author

The ones I've been using is set/toggle node and focus, but I agree exporting the core extensions and then I can pick and chose what I need

@flaviouk
Copy link
Contributor Author

What should the flag be called? @philippkuehn? I'll raise a PR

@philippkuehn
Copy link
Contributor

great! since we have enableInputRules and enablePasteRules already: maybe enableCoreExtensions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature The issue or pullrequest is a new feature
Projects
None yet
Development

No branches or pull requests

2 participants