aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/WebView.tsx
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-02-25 01:31:27 -0500
committerSam Wilkins <samwilkins333@gmail.com>2019-02-25 01:31:27 -0500
commit1a32bdca177faf5a3d99bcb45aaf596ba8c706a8 (patch)
tree1f7531be1ae4032cbb5de0e54a9ae48fda9657cc /src/client/views/nodes/WebView.tsx
parentb418a6ed64e50700e2935963f01e392cbd81099d (diff)
parentdb7aa80be56e2d91acf224013b24ab73385f836c (diff)
Merge branch 'authentication' of https://github.com/browngraphicslab/Dash-Web into authentication
Diffstat (limited to 'src/client/views/nodes/WebView.tsx')
-rw-r--r--src/client/views/nodes/WebView.tsx22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/client/views/nodes/WebView.tsx b/src/client/views/nodes/WebView.tsx
new file mode 100644
index 000000000..717aa8bf5
--- /dev/null
+++ b/src/client/views/nodes/WebView.tsx
@@ -0,0 +1,22 @@
+import { FieldViewProps, FieldView } from "./FieldView";
+import { computed } from "mobx";
+import { observer } from "mobx-react";
+import { KeyStore } from "../../../fields/KeyStore";
+import React = require('react')
+import { TextField } from "../../../fields/TextField";
+import { HtmlField } from "../../../fields/HtmlField";
+import { RichTextField } from "../../../fields/RichTextField";
+
+@observer
+export class WebView extends React.Component<FieldViewProps> {
+ public static LayoutString(fieldStr: string = "DataKey") { return FieldView.LayoutString(WebView, fieldStr) }
+
+ @computed
+ get html(): string {
+ return this.props.doc.GetData(KeyStore.Data, HtmlField, "" as string);
+ }
+
+ render() {
+ return <span dangerouslySetInnerHTML={{ __html: this.html }}></span>
+ }
+} \ No newline at end of file