Skip to content

Commit

Permalink
Merge pull request #4094 from serlo/chore/release-editor-web-componen…
Browse files Browse the repository at this point in the history
…t-v0.7.0

Chore/release editor web component v0.7.0
  • Loading branch information
CodingDive authored Sep 12, 2024
2 parents bd4fc37 + 816ac1c commit 319d7cd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
Binary file not shown.
Binary file not shown.
11 changes: 10 additions & 1 deletion packages/editor-web-component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,16 @@ export default defineComponent({
</script>
```

If you want to display a certain plugin as an initial state of the Serlo Editor, check out the [documentation](https://github.com/serlo/documentation/wiki/Serlo-Editor-Initial-State-of-Plugins) for each JSON state of the plugins.
To familiarize yourself with our JSON structure, for each plugin, you can look at example JSONs [here](https://github.com/serlo/documentation/wiki/Serlo-Editor-Initial-State-of-Plugins). You can also go to our editor [preview page](https://de.serlo-staging.dev/___editor_preview), enter any plugin and through the menu in the top right corner, click "copy plugin". If you paste it in your code editor, you will see the JSON structure of the plugin you selected through the toolbar.

If you want to display a certain plugin as an initial state of the Serlo Editor, we recommend importing the `plugins` and `Plugin` constant/enum. Check out the [documentation](https://github.com/serlo/frontend/tree/staging/packages/editor#plugins-constant-and-plugin-enum) for more information.

```typescript
import { plugins, Plugin } from '@serlo/editor'

const singleChoiceKey = Plugin.SingleChoiceExercise
const initialStateOfSingleChoice = plugin[singleChoiceKey].initialState
```

## Shadow DOM vs. normal DOM

Expand Down
6 changes: 3 additions & 3 deletions packages/editor-web-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serlo/editor-web-component",
"version": "0.6.0",
"version": "0.7.0",
"homepage": "https://de.serlo.org/editor",
"bugs": {
"url": "https://github.com/serlo/frontend/issues"
Expand Down Expand Up @@ -39,11 +39,11 @@
"yalc:publish": "yarn build && yalc publish --push --sig"
},
"resolutions": {
"@serlo/editor": "0.13.0"
"@serlo/editor": "0.14.0"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.5",
"@serlo/editor": "0.13.0",
"@serlo/editor": "0.14.0",
"@serlo/typescript-config": "workspace:*",
"@types/escodegen": "^0.0.10",
"@types/estraverse": "^5.1.7",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5623,7 +5623,7 @@ __metadata:
resolution: "@serlo/editor-web-component@workspace:packages/editor-web-component"
dependencies:
"@rollup/plugin-replace": ^5.0.5
"@serlo/editor": 0.13.0
"@serlo/editor": 0.14.0
"@serlo/typescript-config": "workspace:*"
"@types/escodegen": ^0.0.10
"@types/estraverse": ^5.1.7
Expand Down Expand Up @@ -5658,15 +5658,15 @@ __metadata:
languageName: unknown
linkType: soft

"@serlo/editor@npm:0.13.0":
version: 0.13.0
resolution: "@serlo/editor@npm:0.13.0"
"@serlo/editor@npm:0.14.0":
version: 0.14.0
resolution: "@serlo/editor@npm:0.14.0"
dependencies:
"@serlo/katex-styles": 1.0.1
react: ^18.2.0
react-dom: ^18.2.0
react-resizable: ^3.0.5
checksum: 2cd5f04150371bf3bf49a3b06dbdc6ad3cb9e8f6cf8b4fd511949f21babe1f11f3da6121d724fcf773369de0cb844b3c1b3e75ce8491e2af849e2a1197dc7e48
checksum: 63f04aa6a6bc1450a67a1cbca5e5c9563c601667eaad191f5111ea32a110e33a6c0cd9798f79b0b979a50a1afe2571e54f979c635d0e51f4f3995117e58a879a
languageName: node
linkType: hard

Expand Down

0 comments on commit 319d7cd

Please sign in to comment.