aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextSchema.tsx
diff options
context:
space:
mode:
authormonikahedman <monika_hedman@brown.edu>2019-08-15 16:44:57 -0400
committermonikahedman <monika_hedman@brown.edu>2019-08-15 16:44:57 -0400
commit7e4aacb09e8c80a3452ca24145b1f094170a897b (patch)
tree98e80a42185c90f00155c6246aea1cedbde7515e /src/client/util/RichTextSchema.tsx
parentc03db1feedd7fac944985894aa17709c4d7e3f5b (diff)
cleaning up
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r--src/client/util/RichTextSchema.tsx43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index a581b7578..8a15c212d 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -526,49 +526,6 @@ export class ImageResizeView {
}
}
-export class CheckboxView {
- _view: any;
- _collapsed: HTMLElement;
-
- constructor(node: any, view: any, getPos: any) {
- this._collapsed = document.createElement("span");
- this._collapsed.textContent = node.attrs.visibility ? "⬛" : "⬜";
- this._collapsed.style.position = "relative";
- // this._collapsed.style.width = "80px";
- this._collapsed.style.height = "20px";
- let self = this;
- this._view = view;
- const js = node.toJSON;
- node.toJSON = function () {
-
- return js.apply(this, arguments);
- };
- this._collapsed.onpointerdown = function (e: any) {
- console.log(node.attrs.visibility)
- if (node.attrs.visibility) {
- let y = getPos();
- const attrs = { ...node.attrs };
- attrs.visibility = !attrs.visibility;
- view.dispatch(view.state.tr.setNodeMarkup(y, undefined, attrs));
- self._collapsed.textContent = "⬜";
- } else {
- let y = getPos();
- const attrs = { ...node.attrs };
- attrs.visibility = !attrs.visibility;
- console.log(attrs.visibility)
- view.dispatch(view.state.tr.setNodeMarkup(y, undefined, attrs));
- self._collapsed.textContent = "⬛";
- }
- e.preventDefault();
- e.stopPropagation();
- console.log(node.attrs.visibility)
-
- };
- (this as any).dom = this._collapsed;
- }
-
-}
-
export class SummarizedView {
// TODO: highlight text that is summarized. to find end of region, walk along mark
_collapsed: HTMLElement;