aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/RichTextSchema.tsx
diff options
context:
space:
mode:
authorab <abdullah_ahmed@brown.edu>2019-06-11 12:02:00 -0400
committerab <abdullah_ahmed@brown.edu>2019-06-11 12:02:00 -0400
commitbf73b629c78d0db0b8d4bcf6aadd6609b3fe1689 (patch)
treebfb3aeaf6eecb7abb90b2213f2f5bce80dcdc2fe /src/client/util/RichTextSchema.tsx
parentef24cc445aa466cae3b6c40029f7d7bc9baa81b7 (diff)
star node, trying to set selection as its attribute for copy/paste like behavior
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r--src/client/util/RichTextSchema.tsx13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx
index 8fae821a5..a29036f19 100644
--- a/src/client/util/RichTextSchema.tsx
+++ b/src/client/util/RichTextSchema.tsx
@@ -28,6 +28,7 @@ export const nodes: { [index: string]: NodeSpec } = {
star: {
inline: true,
+ attrs: { oldtext: { default: "suhhhh" } },
group: "inline",
toDOM() { return ["star", "🟊"]; },
parseDOM: [{ tag: "star" }]
@@ -424,6 +425,18 @@ export class ImageResizeView {
this._handle.style.display = "none";
}
}
+
+export class SummarizedView {
+ _collapsed: HTMLElement;
+ _selection: any;
+ constructor(node: any) {
+ this._collapsed = document.createElement("star");
+ this._collapsed.onpointerdown = function (e: any) {
+ console.log("star pressed!");
+ };
+
+ }
+}
// :: Schema
// This schema rougly corresponds to the document schema used by
// [CommonMark](http://commonmark.org/), minus the list elements,