aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-03-07 22:18:47 -0500
committeryipstanley <stanley_yip@brown.edu>2019-03-07 22:18:47 -0500
commitc469ece08b8df888395b6c1ab8205d3a027853fa (patch)
treeb81e2d92ac2fd71a56032aa98621ba192bcd5742 /src/client/views/nodes
parent59cc888c8bf0559c50e12fd2774ea5ac4ebb3059 (diff)
changing branches
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx4
-rw-r--r--src/client/views/nodes/ImageBox.tsx1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index 57ac880df..727645934 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -48,8 +48,8 @@ export class FormattedTextBox extends React.Component<FieldViewProps> {
const state = this._editorView.state.apply(tx);
this._editorView.updateState(state);
const { doc, fieldKey } = this.props;
- // doc.SetOnPrototype(fieldKey, new RichTextField(JSON.stringify(state.toJSON())))
- doc.SetData(fieldKey, JSON.stringify(state.toJSON()), RichTextField);
+ doc.SetOnPrototype(fieldKey, new RichTextField(JSON.stringify(state.toJSON())))
+ // doc.SetData(fieldKey, JSON.stringify(state.toJSON()), RichTextField);
}
}
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index b5ce8b28c..f3c1d3f4e 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -81,6 +81,7 @@ export class ImageBox extends React.Component<FieldViewProps> {
render() {
let field = this.props.doc.Get(this.props.fieldKey);
+ console.log(field)
let path = field == FieldWaiting ? "https://image.flaticon.com/icons/svg/66/66163.svg" :
field instanceof ImageField ? field.Data.href : "http://www.cs.brown.edu/~bcz/face.gif";
let nativeWidth = this.props.doc.GetNumber(KeyStore.NativeWidth, 1);