-
Notifications
You must be signed in to change notification settings - Fork 0
Packages of the Serlo Editor
anbestCL edited this page Feb 6, 2023
·
2 revisions
packages/
├── plugins/
├── private/
├── public/
On the first level, the repository separates plugins from everything else, e.g. shared type definitions or the store logic. Due to circular dependencies, some type definitions are first defined in the private directory and then imported into the public directory, for instance the public/default-document-editor imports from the private/document-editor/.
├── plugins/
│ ├── anchor/
│ ├── blockquote/
│ ├── files/
│ └── geogebra/
│ └── highlight/
│ └── image/
│ └── input-exercise/
│ └── multimedia-explanation/
│ └── rows/
│ └── sc-mc-exercise/
│ └── serlo-injection/
│ └── spoiler/
│ └── table/
│ └── text/
│ └── video/
Let’s step through the different plugins available:
-
anchorallows the user to jump to a specific section of the document -
blockquoteis an outdated plugin to create a block quote -
filesis an outdated plugin developed to share files in the schulcloud -
geogebraembeds a geogebra applet in the document -
highlightallows the user to write code snippets for different programming languages -
imagelets the user upload or use an online image and insert it -
input-exercisecreates the solution to an input exercise (linking to task description is done by separate plugin) -
multimedia-explanationallows the user to illustrate content using multimedia and text -
rowsaggregates different plugins and adds a menu where you can e.g. set the document description visible for search engines -
sc-mc-exercisecreates the solution to a single-choice-multiple-choice exercise (linking to task description is done by separate plugin) -
serlo-injectionembeds a different document via its id into the current document -
spoilercreates a box which folds out to suggest further courses to the user -
tableis an outdated plugin to create a table -
textconfigures rich-text editing using SlateJS (link to introduction/Slate) -
videolets the user embed a video in the document
├── private/
│ ├── bundle-size/
│ └── demo/
│ └── dev-expression/
│ └── document-editor/
│ └── fixtures/
│ └── plugin/
│ └── plugin-state/
│ └── plugin-toolbar/
-
bundle-sizeis a package that can be run to determine the bundle size of the editor -
demois the package that creates and configures the storybook to test out the editor locally (link to introduction/storybook) -
dev-expressionis used to display warning messages -
document-editorcontains the type definitions for the editor container (->public/default-document-editororpublic/document-editor) -
fixturesexports list of plugins used in the storybook -
plugincontains the shared type definitions for the plugins (-> public/plugin) -
plugin-statecontains the type definitions for the different state types (-> public/plugin) -
plugin-toolbarcontains the type definitions for the plugin toolbar (-> public/plugin-toolbar)
└── public/
│ └── core/
│ └── default-document-editor/
│ └── default-plugin-toolbar/
│ └── document-editor/
│ └── editor-ui/
│ └── math/
│ └── plugin/
│ └── plugin-toolbar/
│ └── renderer/
│ └── renderer-ssr/
│ └── renderer-ui/
│ └── store/
│ └── store-devtools/
│ └── ui/
-
coreinstantiates the editor with respective context. There are two variants for that: either one editor component or an editor provider with multiple documents where each document has a clear scope (see core concepts) -
default-document-editorrenders the default toolbar and the default editor container for the plugins -
default-plugin-toolbarimplements the interface from public/plugin-toolbar to provide the default plugin toolbar -
document-editorimports the types fromprivate/document-editor -
editor-uicovers configuration of buttons, checkboxes and the bottom toolbar on the editor level -
mathis a package that covers the editing and rendering of math formulas -
pluginimports generic type definitions from private/plugin-state and implements state types (scalar, list etc.) -
plugin-toolbarimports the types from private/plugin-toolbar -
rendereris responsible for the rendering of the editor -
renderer-ssrsets the styles of the renderer -
renderer-uiincludes feedback on exercises or submit buttons, particular for the render view -
storecontains the redux store logic, including sagas, actions and reducers -
store-devtoolssets up redux dev tools to trace redux actions (for set-up go to the introduction) -
uisets the editor theme
- Home
- Serlo Infrastructure
- Serlo Infrastructure for Non programmers
- Resources for new programmers
- Setup of the toolchain
- Best Practices
- Data Privacy for Devs
- How Tos
- Single Sign On
- Integration with the Data Wallet
- User-Journey: SSO and Data Wallet
- User-Journey: Collaboration with Serlo Editor + Datenraum
- Integration of "Datenraum" into the Serlo Editor
- Introduction to the Serlo editor
- Core concepts of the Serlo editor
- Packages of the Serlo editor
- Creating a new plugin (outdated)
- Redux process in the Serlo editor
- The content format of the Serlo editor
- Serlo Editor Plugin Initial State
- How the Serlo Editor is integrated into edu-sharing via LTI
- Learner Events and xAPI