Skip to content

Commit

Permalink
Merge pull request #4233 from serlo/docs/document-frozen-plugins-config
Browse files Browse the repository at this point in the history
docs(editor): Document that plugins config can't be dynamically changed
  • Loading branch information
CodingDive authored Oct 28, 2024
2 parents f7231be + 1e05815 commit 5551528
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ See below for the current API specification.
- `history` - for persisting, undo, redo
- `selectRootDocument` - a function for selecting the current state

- **`plugins` (optional)**: List of plugins that should be active. If undefined, list `defaultPlugins` will be used. Only use in exceptional cases.
- **`plugins` (optional)**: List of plugins that should be active. If undefined, the `defaultPlugins` will be used. Only use this if you need to filter out some plugins. Upon first render, the object will be frozen and you can't dynamically change the plugins anymore! Ensure to do any filtering before you render the Serlo Editor.

- **`initialState` (optional)**: Pass in an `initialState` to the `SerloEditor` component to prevent seeing an empty editor state. [Here is the documentation](https://github.com/serlo/documentation/wiki/Serlo-Editor-Initial-State-of-Plugins) for sample initial states of each plugin, in case you want to render the Editor displaying a particular plugin by default.

Expand Down

0 comments on commit 5551528

Please sign in to comment.