This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
Replies: 1 comment
-
Hey @gzuidhof, I like this proposal for the potential to lower bundle size and combine the extension management for both server and client. I'd imagine the client API could be wrapped in a I think the main problem is that the extensions api was never designed for this level of pluggability, the project was originally very opinionated. So many of the extensions need initializing with extra props that hook them into handlers in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Tom,
Moving the editor styles out of
index.tsx
was a good first step, but there's still some stuff going on in there that I think we can split up. I'm happy to contribute / help out, but before I put in the effort I want to make sure you agree!I'd like to propose the following:
editor.tsx
? Or maybecomponents/editor.tsx
?).Currently the index.tsx has side effects due to it exporting
server.ts
, which initializes a bunch of extensions which we probably will never use (and there is some bundle size + init time cost to that)server.ts
andindex.tsx
.extensions
to take an ExtensionManager. The end-user is now responsible for injecting their own ExtensionManager. This is a breaking change (but the migration should be very straightforward - two lines to change or so).The last change especially allows us to remove the
extensions
anddisableExtensions
prop and logic entirely and it will reduce the bundle size for those not using all the extensions. Also it allows for multiple editors on the same page (or when destroying and re-creating) to re-use the same instances of extensions.The new usage would look something like this:
Let me know what you think!
Beta Was this translation helpful? Give feedback.
All reactions