aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/TooltipTextMenu.tsx
diff options
context:
space:
mode:
authormonikahedman <monika_hedman@brown.edu>2019-08-15 16:27:06 -0400
committermonikahedman <monika_hedman@brown.edu>2019-08-15 16:27:06 -0400
commitb9f0c3d05eab364911007beb3c85d6d942097dab (patch)
tree0edb9c9e7d67cc829629e4e402ed4cd6f017c2cd /src/client/util/TooltipTextMenu.tsx
parent1c1d4d4865b5dd90489cdde4c8f3dfceba60496b (diff)
getting rid of checkbox
Diffstat (limited to 'src/client/util/TooltipTextMenu.tsx')
-rw-r--r--src/client/util/TooltipTextMenu.tsx29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/client/util/TooltipTextMenu.tsx b/src/client/util/TooltipTextMenu.tsx
index 389d96636..3cc70382c 100644
--- a/src/client/util/TooltipTextMenu.tsx
+++ b/src/client/util/TooltipTextMenu.tsx
@@ -187,7 +187,6 @@ export class TooltipTextMenu {
this.tooltip.appendChild(this._brushdom);
this.tooltip.appendChild(this.createLink().render(this.view).dom);
this.tooltip.appendChild(this.createStar().render(this.view).dom);
- this.tooltip.appendChild(this.createCheckbox().render(this.view).dom);
this.updateListItemDropdown(":", this.listTypeBtnDom);
@@ -435,14 +434,6 @@ export class TooltipTextMenu {
return true;
}
- public static insertCheckbox(state: EditorState<any>, dispatch: any) {
- let newNode = schema.nodes.checkbox.create({ visibility: false });
- if (dispatch) {
- dispatch(state.tr.replaceSelectionWith(newNode));
- }
- return true;
- }
-
//will display a remove-list-type button if selection is in list, otherwise will show list type dropdown
updateListItemDropdown(label: string, listTypeBtn: any) {
//remove old btn
@@ -455,7 +446,6 @@ export class TooltipTextMenu {
});
//option to remove the list formatting
toAdd.push(this.dropdownNodeBtn("X", "color: black; width: 40px;", undefined, this.view, this.listTypes, this.changeToNodeType));
- toAdd.push(this.dropdownNodeBtn("⬜", "color:black; width:40px;", schema.nodes.checkbox_list, this.view, this.listTypes, this.changeToNodeType))
listTypeBtn = (new Dropdown(toAdd, {
label: label,
@@ -519,11 +509,6 @@ export class TooltipTextMenu {
liftListItem(schema.nodes.list_item)(view.state, view.dispatch);
if (nodeType) { //add new
wrapInList(nodeType)(view.state, view.dispatch);
- // console.log(nodeType === schema.nodes.checkbox_list)
- // if (nodeType === schema.nodes.checkbox_list) {
- // TooltipTextMenu.insertCheckbox(view.state, view.dispatch)
- // }
-
}
}
@@ -558,20 +543,6 @@ export class TooltipTextMenu {
});
}
- createCheckbox() {
- return new MenuItem({
- title: "Checkbox",
- label: "Checkbox",
- icon: icons.code,
- css: "color:white",
- class: "checkbox",
- execEvent: "",
- run: (state, dispatch) => {
- TooltipTextMenu.insertCheckbox(state, dispatch);
- }
- })
- }
-
deleteLinkItem() {
const icon = {
height: 16, width: 16,