aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FormattedTextBox.tsx
diff options
context:
space:
mode:
authorEleanor Eng <eleanoreng@eleanors-mbp.devices.brown.edu>2019-02-19 18:24:41 -0500
committerEleanor Eng <eleanoreng@eleanors-mbp.devices.brown.edu>2019-02-19 18:24:41 -0500
commite5a14d6dddccc922bb253323b461ac2500c33b7c (patch)
treed3078b7edf89659bbf689c1a346e09a14575bfd2 /src/client/views/nodes/FormattedTextBox.tsx
parent9596bd5b6505fa6e9d32630ed7d824d263cd1e63 (diff)
Different options based on selection
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 8f959762a..0fe6befda 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -13,6 +13,7 @@ import { RichTextField } from "../../../fields/RichTextField";
import { FieldViewProps, FieldView } from "./FieldView";
import { CollectionFreeFormDocumentView } from "./CollectionFreeFormDocumentView";
import { observer } from "mobx-react";
+import { ContextMenu } from "../../views/ContextMenu";
// FormattedTextBox: Displays an editable plain text node that maps to a specified Key of a Document
@@ -114,6 +115,15 @@ export class FormattedTextBox extends React.Component<FieldViewProps> {
e.stopPropagation();
}
}
+
+ //REPLACE THIS WITH CAPABILITIES SPECIFC TO THIS TYPE OF NODE
+ textCapability = (e: React.MouseEvent): void => {
+ }
+
+ specificContextMenu = (e: React.MouseEvent): void => {
+ ContextMenu.Instance.addItem({ description: "Text Capability", event: this.textCapability });
+ }
+
render() {
return (<div className="formattedTextBox-cont"
style={{
@@ -121,6 +131,6 @@ export class FormattedTextBox extends React.Component<FieldViewProps> {
whiteSpace: "initial"
}}
onPointerDown={this.onPointerDown}
- ref={this._ref} />)
+ ref={this._ref} onContextMenu={this.specificContextMenu} />)
}
} \ No newline at end of file