Skip to content
Snippets Groups Projects
Commit 6cdddb9a authored by Giannis Kopanas's avatar Giannis Kopanas
Browse files

feat(services): add services

parent df2e2150
No related branches found
No related tags found
1 merge request!45Develop
import { Plugin, PluginKey } from "prosemirror-state";
export const findLink = new PluginKey("findLink");
export default items => {
return () =>
new Plugin({
key: findLink,
state: {
init() {
return items;
}
}
});
};
import { Plugin, PluginKey } from "prosemirror-state";
export const placeholderLink = new PluginKey("placeholderLink");
export default items => {
return () =>
new Plugin({
key: placeholderLink,
state: {
init() {
return items;
}
}
});
};
import { Container } from "wax-prosemirror-core";
export default class Service {
constructor() {
this.container = Container;
}
boot() {}
}
......@@ -27,63 +27,54 @@ const OverlayPlugin = args => {
export default OverlayPlugin;
reactComponent
overlayPlugin position
linkPlugin showhide
linkPlugin = createplugin (reactComponent, overlay)
const createPlugin = (reactComponent, overlayPlugin) => {
return new Plugin ({
key,
state,
view,
})
}
createPlugin = () => class {
name: "test",
renderArea,
component: () => {},
itemsMenus: [],
plugins: [plugin, plugin]
}
class createPlugin {
constructor() {
this.name
this.plugins.push(overlayPlugin(Component, showCommand))
}
plugins () { return []}
}
class waxPlugin {
constructor() {
this.name
}
createPlugin () {
}
}
class linkPlugin extends waxPlugin {
component:
renderArea:
showCommand:
itemsMenus:
}
new(OverlayPlugin)
\ No newline at end of file
// reactComponent
// overlayPlugin position
// linkPlugin showhide
// linkPlugin = createplugin(reactComponent, overlay);
// const createPlugin = (reactComponent, overlayPlugin) => {
// return new Plugin({
// key,
// state,
// view
// });
// };
// createPlugin = () => class {
// name: "test",
// renderArea,
// component: () => {},
// itemsMenus: [],
// plugins: [plugin, plugin]
// }
// class createPlugin {
// constructor() {
// this.name;
// this.plugins.push(overlayPlugin(Component, showCommand));
// }
// plugins() {
// return [];
// }
// }
// class waxPlugin {
// constructor() {
// this.name;
// }
// createPlugin() {}
// }
// class linkPlugin extends waxPlugin {
// component:
// renderArea:
// showCommand:
// itemsMenus:
// }
// new(OverlayPlugin)
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment