Conversation
Maxxich
marked this pull request as ready for review
September 24, 2026 10:48
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="packages/editor/src/core/Editor.ts" line_range="112" />
<code_context>
-
- plugins.unshift(LoggerFacet.of(logger));
- plugins.unshift(ParserFacet.of(parser));
+ } = manager.build();
const state = EditorState.create({
</code_context>
<issue_to_address>
**issue (broader_impact):** `manager.build()` returns a shared `ActionsManager` when multiple `WysiwygEditor` instances reuse the same `extensionsManager`; each constructor then calls `actions.setActions(...)`, overwriting the action bindings for every earlier editor. Actions invoked through an earlier editor therefore dispatch against the most recently constructed editor view.
**Triggers:** When two or more WysiwygEditor instances are created with the same extensionsManager.
**Suggested fix:** Keep action bindings per WysiwygEditor, or create a fresh ActionsManager/action map for each view while sharing only the immutable dependency data.
</issue_to_address>|
|
||
| plugins.unshift(LoggerFacet.of(logger)); | ||
| plugins.unshift(ParserFacet.of(parser)); | ||
| } = manager.build(); |
There was a problem hiding this comment.
issue (broader_impact): manager.build() returns a shared ActionsManager when multiple WysiwygEditor instances reuse the same extensionsManager; each constructor then calls actions.setActions(...), overwriting the action bindings for every earlier editor. Actions invoked through an earlier editor therefore dispatch against the most recently constructed editor view.
Triggers: When two or more WysiwygEditor instances are created with the same extensionsManager.
Suggested fix: Keep action bindings per WysiwygEditor, or create a fresh ActionsManager/action map for each view while sharing only the immutable dependency data.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepare schema, Markdown parsers, serializer and actions once, independently of
ProseMirror view components. Extract the common configuration factory and let
WysiwygEditorconsume an already prepared manager without mutating its pluginarray. This supports parsing before a view exists while retaining the existing
editor construction path.
Summary by Sourcery
Share lazily prepared editor dependencies across views while keeping view-specific components isolated.
New Features:
Bug Fixes:
Enhancements:
Tests: