Skip to content

Commit

Permalink
fix: wysiwyg editor actions only firing bold
Browse files Browse the repository at this point in the history
- add code build to prepublish command
  • Loading branch information
ifiokjr committed Sep 25, 2019
1 parent 39a72b3 commit 66af99a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 5 additions & 7 deletions @remirror/editor-wysiwyg/src/components/wysiwyg-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ActionNames, AnyFunction, Attrs, KeyOfThemeVariant, memoize } from '@remirror/core';
import { ActionNames, AnyFunction, Attrs, KeyOfThemeVariant } from '@remirror/core';
import { bubblePositioner, useRemirrorContext } from '@remirror/react';
import { useRemirrorTheme } from '@remirror/ui';
import {
Expand Down Expand Up @@ -58,12 +58,10 @@ const menuItems: Array<[ActionNames<WysiwygExtensions>, [ComponentType<IconProps
['horizontalRule', [RulerHorizontalIcon]],
];

const runAction = memoize(
(method: AnyFunction, attrs?: Attrs): MouseEventHandler<HTMLElement> => e => {
e.preventDefault();
method(attrs);
},
);
const runAction = (method: AnyFunction, attrs?: Attrs): MouseEventHandler<HTMLElement> => e => {
e.preventDefault();
method(attrs);
};

/**
* Retrieve the state for the button
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"build:ts": "tsc -b tsconfig.prod.json --verbose",
"checks": "run-s integrity lint typecheck test",
"checks:parallel": "run-p lint typecheck test",
"checks:publish": "run-s checks build test:e2e",
"checks:publish": "run-s checks build test:e2e:ssr",
"ci": "yarn clean:all && yarn",
"clean": "yarn if-clean git clean -fdx --exclude=.config.json --exclude=node_modules --exclude=**/node_modules",
"clean:all": "git clean -fdX --exclude=.config.json",
Expand Down Expand Up @@ -52,9 +52,9 @@
"lint": "run-s lint:*",
"lint:es": "eslint -f friendly --ext=.tsx,.ts,.js .",
"lint:prettier": "prettier --check \"**/*.{json,yml,yaml,md,mdx}\" \"!docs/api/**\" \"!support/api/**\" \"!**/temp/**\"",
"publish:canary": "yarn if-clean run-s checks lerna:publish:canary",
"publish:minor": "yarn if-clean run-s checks lerna:publish:minor",
"publish:patch": "yarn if-clean run-s checks lerna:publish:patch",
"publish:canary": "yarn if-clean run-s checks:publish lerna:publish:canary",
"publish:minor": "yarn if-clean run-s checks:publish lerna:publish:minor",
"publish:patch": "yarn if-clean run-s checks:publish lerna:publish:patch",
"size": "size-limit",
"start:checks": "cpy support/.config.sample.json ./ --rename=\".config.json\"",
"stop:checks": "rimraf ./.config.json",
Expand Down

0 comments on commit 66af99a

Please sign in to comment.