diff options
author | Sam Wilkins <35748010+samwilkins333@users.noreply.github.com> | 2019-09-29 19:04:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-29 19:04:29 -0400 |
commit | 89fd714207dbd965dc4b566202ec85bbd7998adf (patch) | |
tree | 4b6279f1fe0157eb79fabd000a55754c33253506 /src/client/util/RichTextSchema.tsx | |
parent | c40480ec1a2da84b4223b0605bea2fe19df1104c (diff) | |
parent | 5bd6158a1f839d19f8965bff97a908c89271437d (diff) |
Merge pull request #289 from browngraphicslab/googlephotos_sharing_master
Googlephotos sharing master
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
-rw-r--r-- | src/client/util/RichTextSchema.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx index 710d55605..64821d8db 100644 --- a/src/client/util/RichTextSchema.tsx +++ b/src/client/util/RichTextSchema.tsx @@ -135,6 +135,7 @@ export const nodes: { [index: string]: NodeSpec } = { alt: { default: null }, title: { default: null }, float: { default: "left" }, + location: { default: "onRight" }, docid: { default: "" } }, group: "inline", @@ -619,6 +620,7 @@ export class ImageResizeView { e.preventDefault(); e.stopPropagation(); DocServer.GetRefField(node.attrs.docid).then(async linkDoc => { + const location = node.attrs.location; if (linkDoc instanceof Doc) { let proto = Doc.GetProto(linkDoc); let targetContext = await Cast(proto.targetContext, Doc); @@ -780,10 +782,10 @@ export class FootnoteView { if (!tr.getMeta("fromOutside")) { let outerTr = this.outerView.state.tr, offsetMap = StepMap.offset(this.getPos() + 1); - for (let i = 0; i < transactions.length; i++) { - let steps = transactions[i].steps; - for (let j = 0; j < steps.length; j++) { - outerTr.step(steps[j].map(offsetMap)); + for (let transaction of transactions) { + let steps = transaction.steps; + for (let step of steps) { + outerTr.step(step.map(offsetMap)); } } if (outerTr.docChanged) this.outerView.dispatch(outerTr); |