diff options
author | laurawilsonri <laura_wilson@brown.edu> | 2019-04-08 18:56:40 -0400 |
---|---|---|
committer | laurawilsonri <laura_wilson@brown.edu> | 2019-04-08 18:56:40 -0400 |
commit | 218a3bdff2f7c4888b5f21466dee65c36a76ea00 (patch) | |
tree | 757e03db775a06ed06a75b912d94e5e09a20bd3f | |
parent | b3246c495a1e116abe7ab7abea347126eead4e0d (diff) |
work on dropdown
-rw-r--r-- | src/client/util/TooltipTextMenu.tsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/util/TooltipTextMenu.tsx b/src/client/util/TooltipTextMenu.tsx index 3f37d5fb8..8c4470f23 100644 --- a/src/client/util/TooltipTextMenu.tsx +++ b/src/client/util/TooltipTextMenu.tsx @@ -53,6 +53,18 @@ export class TooltipTextMenu { }); //add dropdowns + let cut = arr => arr.filter(x => x); + let config = { + + } + let tnr = new MenuItem({ + title: "tnr", + label: "Times New Roman", + css: "font-family: Times New Roman, Times, serif; ", + enable(state) { return canInsert(state, hr) }, + run(state, dispatch) { dispatch(state.tr.replaceSelectionWith(hr.create())) } + }) + new Dropdown(cut([schema.marks.timesNewRoman, r.insertHorizontalRule]), { label: "Insert" }) //pointer down handler to activate button effects this.tooltip.addEventListener("pointerdown", e => { |