aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/util/RichTextSchema.tsx10
-rw-r--r--src/client/util/TooltipTextMenu.tsx9
2 files changed, 14 insertions, 5 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index 2a3c1da6e..98c22204a 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -222,7 +222,15 @@ export const marks: { [index: string]: MarkSpec } = {
code: {
parseDOM: [{ tag: "code" }],
toDOM() { return codeDOM }
- }
+ },
+
+
+ timesNewRoman: {
+ parseDOM: [{ style: 'font-family: "Times New Roman", Times, serif;' }],
+ toDOM: () => ['span', {
+ style: 'font-family: "Times New Roman", Times, serif;'
+ }]
+ },
}
// :: Schema
diff --git a/src/client/util/TooltipTextMenu.tsx b/src/client/util/TooltipTextMenu.tsx
index eaf18825c..3f37d5fb8 100644
--- a/src/client/util/TooltipTextMenu.tsx
+++ b/src/client/util/TooltipTextMenu.tsx
@@ -1,4 +1,5 @@
import { action, IReactionDisposer, reaction } from "mobx";
+import { Dropdown, DropdownSubmenu, MenuItem } from "prosemirror-menu";
import { baseKeymap, lift } from "prosemirror-commands";
import { history, redo, undo } from "prosemirror-history";
import { keymap } from "prosemirror-keymap";
@@ -6,7 +7,6 @@ import { EditorState, Transaction, NodeSelection } from "prosemirror-state";
import { EditorView } from "prosemirror-view";
import { schema } from "./RichTextSchema";
import { Schema, NodeType } from "prosemirror-model";
-import { liftItem } from "prosemirror-menu";
import React = require("react");
import "./TooltipTextMenu.scss";
const { toggleMark, setBlockType, wrapIn } = require("prosemirror-commands");
@@ -44,15 +44,16 @@ export class TooltipTextMenu {
{ command: toggleMark(schema.marks.superscript), dom: this.icon("s", "superscript") },
{ command: toggleMark(schema.marks.subscript), dom: this.icon("s", "subscript") },
{ command: wrapInList(schema.nodes.bullet_list), dom: this.icon(":", "bullets") },
- //{ command: lift, dom: this.icon("<", "unindent") },
-
- { command: lift, dom: this.unorderedListIcon() },
+ { command: toggleMark(schema.marks.timesNewRoman), dom: this.icon("x", "TNR") },
+ { command: lift, dom: this.icon("<", "lift") },
]
//add menu items
items.forEach(({ dom, command }) => {
this.tooltip.appendChild(dom);
});
+ //add dropdowns
+
//pointer down handler to activate button effects
this.tooltip.addEventListener("pointerdown", e => {
e.preventDefault();