aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FormattedTextBox.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-04-13 17:46:14 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-04-13 17:46:14 -0400
commit22888445b70e374cec082933505017c66bf1fba6 (patch)
tree6c2e54748174f02d9edc8e479c8da345dde59213 /src/client/views/nodes/FormattedTextBox.tsx
parenta23b160d19beff9163f970f7ae678c2aed9ce14e (diff)
Re-fixed database stuff and added DocumentText to formatted text
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 8ea747b1c..3a2a8a554 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -14,6 +14,8 @@ import { Main } from "../Main";
import { FieldView, FieldViewProps } from "./FieldView";
import "./FormattedTextBox.scss";
import React = require("react");
+import { TextField } from "../../../fields/TextField";
+import { KeyStore } from "../../../fields/KeyStore";
const { buildMenuItems } = require("prosemirror-example-setup");
const { menuBar } = require("prosemirror-menu");
@@ -64,6 +66,7 @@ export class FormattedTextBox extends React.Component<(FieldViewProps & Formatte
JSON.stringify(state.toJSON()),
RichTextField
);
+ this.props.Document.SetDataOnPrototype(KeyStore.DocumentText, state.doc.textBetween(0, state.doc.content.size, "\n\n"), TextField);
// doc.SetData(fieldKey, JSON.stringify(state.toJSON()), RichTextField);
}
}