Skip to content
Snippets Groups Projects
Commit fd6b6788 authored by chris's avatar chris
Browse files

feat: underline service

parent bada3064
No related branches found
No related tags found
1 merge request!45Develop
export { default as Blockquote } from "./Blockquote";
export { default as SmallCaps } from "./SmallCaps";
export { default as Underline } from "./Underline";
export { default as Table } from "./Table";
export { default as TableDropDownOptions } from "./TableDropDownOptions";
import Service from "wax-prosemirror-core/src/services/Service";
import { underlineMark } from "wax-prosemirror-schema";
import Underline from "./Underline";
class UnderlineService extends Service {
register() {
this.container.bind("Underline").to(Underline);
this.container
.bind("schema")
.toConstantValue({
underline: underlineMark
})
.whenTargetNamed("mark");
}
}
export default UnderlineService;
......@@ -4,11 +4,14 @@ import EmphasisService from "./EmphasisService/EmphasisService";
import SubscriptService from "./SubscriptService/SubscriptService";
import SuperscriptService from "./SuperscriptService/SuperscriptService";
import StrikeThroughService from "./StrikeThroughService/StrikeThroughService";
import UnderlineService from "./UnderlineService/UnderlineService";
export default [
new CodeService(),
new StrongService(),
new EmphasisService(),
new SubscriptService(),
new SuperscriptService(),
new StrikeThroughService()
new StrikeThroughService(),
new UnderlineService()
];
......@@ -12,6 +12,7 @@ export { default as emphasisMark } from "./src/marks/emphasisMark";
export { default as subscriptMark } from "./src/marks/subscriptMark";
export { default as superscriptMark } from "./src/marks/superscriptMark";
export { default as strikethroughMark } from "./src/marks/strikethroughMark";
export { default as underlineMark } from "./src/marks/underlineMark";
export { default as smallcapsMark } from "./src/marks/smallcapsMark";
/*
LIST OF SUPPORTED NODES
......
......@@ -3,15 +3,6 @@ const emDOM = ["em", 0],
codeDOM = ["code", 0];
const marks = {
underline: {
parseDOM: [{ tag: "u" }, { style: "text-decoration:underline" }],
toDOM: () => [
"span",
{
style: "text-decoration:underline"
}
]
},
small_caps: {
attrs: {
class: { default: "small-caps" }
......
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