Skip to content

Commit

Permalink
docs: update some examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ocavue committed Jul 26, 2020
1 parent 6b3371f commit 0a371fa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packages/@remirror/core/src/builtins/commands-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ declare global {
* const MyExtension = ExtensionFactory.plain({
* name: 'myExtension',
* version: '1.0.0',
* createCommands: () => {
* createCommands() {
* return {
* haveFun() {
* return ({ state, dispatch }) => {
Expand Down
40 changes: 21 additions & 19 deletions packages/@remirror/core/src/builtins/plugins-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,26 +385,28 @@ declare global {
* return 'me' as const;
* }
*
* createPlugin: (): ExtensionPluginSpec => ({
* props: {
* handleKeyDown: keydownHandler({
* Backspace: handler,
* 'Mod-Backspace': handler,
* Delete: handler,
* 'Mod-Delete': handler,
* 'Ctrl-h': handler,
* 'Alt-Backspace': handler,
* 'Ctrl-d': handler,
* 'Ctrl-Alt-Backspace': handler,
* 'Alt-Delete': handler,
* 'Alt-d': handler,
* }),
* decorations() {
* pluginState.setDeleted(false);
* return pluginState.decorationSet;
* createPlugin (): ExtensionPluginSpec {
* return {
* props: {
* handleKeyDown: keydownHandler({
* Backspace: handler,
* 'Mod-Backspace': handler,
* Delete: handler,
* 'Mod-Delete': handler,
* 'Ctrl-h': handler,
* 'Alt-Backspace': handler,
* 'Ctrl-d': handler,
* 'Ctrl-Alt-Backspace': handler,
* 'Alt-Delete': handler,
* 'Alt-d': handler,
* }),
* decorations() {
* pluginState.setDeleted(false);
* return pluginState.decorationSet;
* },
* },
* },
* })
* }
* }
* }
* ```
*
Expand Down

0 comments on commit 0a371fa

Please sign in to comment.