+const em = {
+ parseDOM: [{tag: "i"}, {tag: "em"}, {style: "font-style=italic"}],
+ toDOM() {
+ return ["em", 0]
+ }
+};
+
+const strong = {
+ parseDOM: [{tag: "strong"},
+ // This works around a Google Docs misbehavior where
+ // pasted content will be inexplicably wrapped in `<b>`
+ // tags with a font-weight normal.
+ {
+ tag: "b", getAttrs: function (node) {
+ return node.style.fontWeight != "normal" && null;
+ }
+ },
+ {
+ style: "font-weight", getAttrs: function (value) {
+ return /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null;
+ }
+ }],
+ toDOM() {
+ return ["strong", 0]
+ }
+};
+
+const code = {
+ parseDOM: [{tag: "code"}],
+ toDOM() {
+ return ["code", 0]
+ }
+};