diff --git a/editors/editoria/src/config/config.js b/editors/editoria/src/config/config.js index 4138b0607514616730b31bb6808487fce7f35768..82fb3775f1ed02ff8924f5e6641e27626487ccd4 100644 --- a/editors/editoria/src/config/config.js +++ b/editors/editoria/src/config/config.js @@ -13,7 +13,7 @@ export default { ], RulesService: [ { - rules: [ellipsis] + rules: [emDash, ellipsis] } ] }; diff --git a/wax-prosemirror-core/src/Wax.js b/wax-prosemirror-core/src/Wax.js index 91666d49e8e39fc959521f1247b3d3f2b613be6e..7588a2b58376373a826f92d5e1c364512b3cb69f 100644 --- a/wax-prosemirror-core/src/Wax.js +++ b/wax-prosemirror-core/src/Wax.js @@ -51,11 +51,9 @@ class Wax extends Component { const { value, onChange, options } = this.props; const { schema, plugins, keys, rules } = options; const WaxOnchange = onChange ? onChange : value => true; + this.application.bootServices(); - // const WaxShortCuts = keys - // ? keys - // : new CreateShortCuts({ schema: schema, shortCuts: {} }); const editorContent = value ? value : ""; if (plugins) defaultPlugins.push(...plugins); @@ -64,7 +62,7 @@ class Wax extends Component { placeholder({ content: this.props.placeholder }), ...this.application.getPlugins() ]); - console.log("cretated?"); + this.WaxOptions = { schema, plugins: finalPlugins diff --git a/wax-prosemirror-plugins/src/PlaceholderService/PlaceholderService.js b/wax-prosemirror-plugins/src/PlaceholderService/PlaceholderService.js index 0b16f671fe33a653d0055426e94cb7946f8ba796..a3c08b71fb520b0f3e4670aaf9d86843d1fb1e18 100644 --- a/wax-prosemirror-plugins/src/PlaceholderService/PlaceholderService.js +++ b/wax-prosemirror-plugins/src/PlaceholderService/PlaceholderService.js @@ -1,14 +1,11 @@ import Service from "wax-prosemirror-core/src/services/Service"; import placeholderPlugin from "./pmPlugins/placeholderPlugin"; const PLUGIN_KEY = "imagePlaceHolder"; -import { emDash } from "prosemirror-inputrules"; export default class PlaceholderService extends Service { name = "PlaceholderService"; register() { - const rules = this.container.get("Rules"); - rules.addRule([emDash]); this.app.PmPlugins.add(PLUGIN_KEY, placeholderPlugin(PLUGIN_KEY)); } }