Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/release editor web component v0.8.0 #4170

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions packages/editor-web-component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ export default defineComponent({

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.
If you want to display a certain plugin as an initial state of the Serlo Editor, we recommend importing the `pluginMenuEn` / `pluginMenuDe` object and `Plugin` enum. Check out the [documentation](https://github.com/serlo/frontend/tree/staging/packages/editor#pluginmenuen--pluginmenude-constant-and-plugin-enum) for more information.

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

const singleChoiceKey = Plugin.SingleChoiceExercise
const initialStateOfSingleChoice = plugin[singleChoiceKey].initialState
const initialStateOfSingleChoice = pluginMenuEn[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.7.0",
"version": "0.8.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.14.0"
"@serlo/editor": "0.15.3"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.5",
"@serlo/editor": "0.14.0",
"@serlo/editor": "0.15.3",
"@serlo/typescript-config": "workspace:*",
"@types/escodegen": "^0.0.10",
"@types/estraverse": "^5.1.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-web-component/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { Plugin, plugins } from '@serlo/editor'
export { type Plugin, pluginMenuDe, pluginMenuEn } from '@serlo/editor'
export { EditorWebComponent } from './editor-web-component'
11 changes: 6 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5899,7 +5899,7 @@ __metadata:
resolution: "@serlo/editor-web-component@workspace:packages/editor-web-component"
dependencies:
"@rollup/plugin-replace": ^5.0.5
"@serlo/editor": 0.14.0
"@serlo/editor": 0.15.3
"@serlo/typescript-config": "workspace:*"
"@types/escodegen": ^0.0.10
"@types/estraverse": ^5.1.7
Expand Down Expand Up @@ -5934,15 +5934,16 @@ __metadata:
languageName: unknown
linkType: soft

"@serlo/editor@npm:0.14.0":
version: 0.14.0
resolution: "@serlo/editor@npm:0.14.0"
"@serlo/editor@npm:0.15.3":
version: 0.15.3
resolution: "@serlo/editor@npm:0.15.3"
dependencies:
"@serlo/katex-styles": 1.0.1
react: ^18.2.0
react-dom: ^18.2.0
react-hot-toast: ^2.4.1
react-resizable: ^3.0.5
checksum: 63f04aa6a6bc1450a67a1cbca5e5c9563c601667eaad191f5111ea32a110e33a6c0cd9798f79b0b979a50a1afe2571e54f979c635d0e51f4f3995117e58a879a
checksum: 6992e6258335d68e64b9269f9d628707130d146c1a35aa9578835f8094af9cdf306c8a02cbfc2647004a75e618549c04d4dad5861d278b66186bb25fcc2fcdee
languageName: node
linkType: hard

Expand Down