diff options
author | Sam Wilkins <abdullah_ahmed@brown.edu> | 2019-06-06 17:45:26 -0400 |
---|---|---|
committer | Sam Wilkins <abdullah_ahmed@brown.edu> | 2019-06-06 17:45:26 -0400 |
commit | 972f76a34e3c1a1aa5f0be59639fbd5763c9c16f (patch) | |
tree | 686b83e841b9530e923de72ba4526123bd1d7732 /src/client/views/nodes/DocumentView.tsx | |
parent | 7d3ef1c914cc1cc0b6c05b14773a8b83e1b95c96 (diff) |
links get saved to global table
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 7750b9173..0baa061ab 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -5,7 +5,7 @@ import { observer } from "mobx-react"; import { Doc, DocListCast, HeightSym, Opt, WidthSym, DocListCastAsync } from "../../../new_fields/Doc"; import { List } from "../../../new_fields/List"; import { ObjectField } from "../../../new_fields/ObjectField"; -import { createSchema, makeInterface } from "../../../new_fields/Schema"; +import { createSchema, makeInterface, listSpec } from "../../../new_fields/Schema"; import { BoolCast, Cast, FieldValue, StrCast, NumCast } from "../../../new_fields/Types"; import { CurrentUserUtils } from "../../../server/authentication/models/current_user_utils"; import { emptyFunction, Utils } from "../../../Utils"; @@ -30,6 +30,7 @@ import "./DocumentView.scss"; import React = require("react"); import { Id, Copy } from '../../../new_fields/FieldSymbols'; import { ContextMenuProps } from '../ContextMenuItem'; +import { list, object, createSimpleSchema } from 'serializr'; const JsxParser = require('react-jsx-parser').default; //TODO Why does this need to be imported like this? library.add(faTrash); @@ -47,10 +48,11 @@ library.add(faFingerprint); library.add(faCrosshairs); library.add(faDesktop); + const linkSchema = createSchema({ title: "string", linkDescription: "string", - linkTags: "string", + linkTags: listSpec("string"), linkedTo: Doc, linkedFrom: Doc }); |