diff options
| author | yipstanley <stanley_yip@brown.edu> | 2019-03-17 14:23:00 -0400 | 
|---|---|---|
| committer | yipstanley <stanley_yip@brown.edu> | 2019-03-17 14:23:00 -0400 | 
| commit | 3d337129f112425345436aa69a95fcf03ad830d7 (patch) | |
| tree | f156445b8f5afad577e4038a849290d755a8d552 /src/client/util/RichTextSchema.tsx | |
| parent | b4dc598ff08c7c684daa4b75508e17213d29d8e5 (diff) | |
| parent | 47da497aded0bafdc5c85c8a79a9a06d0d401e92 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into view_doc_impl
Diffstat (limited to 'src/client/util/RichTextSchema.tsx')
| -rw-r--r-- | src/client/util/RichTextSchema.tsx | 23 | 
1 files changed, 18 insertions, 5 deletions
diff --git a/src/client/util/RichTextSchema.tsx b/src/client/util/RichTextSchema.tsx index abf448c9f..2a3c1da6e 100644 --- a/src/client/util/RichTextSchema.tsx +++ b/src/client/util/RichTextSchema.tsx @@ -1,12 +1,15 @@  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Schema, NodeSpec, MarkSpec, DOMOutputSpecArray } from "prosemirror-model" +import { Schema, NodeSpec, MarkSpec, DOMOutputSpecArray, NodeType } from "prosemirror-model"  import { joinUp, lift, setBlockType, toggleMark, wrapIn } from 'prosemirror-commands'  import { redo, undo } from 'prosemirror-history' -import { orderedList, bulletList, listItem } from 'prosemirror-schema-list' +import { orderedList, bulletList, listItem, } from 'prosemirror-schema-list' +import { EditorState, Transaction, NodeSelection, } from "prosemirror-state"; +import { EditorView, } from "prosemirror-view";  const pDOM: DOMOutputSpecArray = ["p", 0], blockquoteDOM: DOMOutputSpecArray = ["blockquote", 0], hrDOM: DOMOutputSpecArray = ["hr"],    preDOM: DOMOutputSpecArray = ["pre", ["code", 0]], brDOM: DOMOutputSpecArray = ["br"], ulDOM: DOMOutputSpecArray = ["ul", 0] +  // :: Object  // [Specs](#model.NodeSpec) for the nodes defined in this schema.  export const nodes: { [index: string]: NodeSpec } = { @@ -113,12 +116,22 @@ export const nodes: { [index: string]: NodeSpec } = {      content: 'list_item+',      group: 'block'    }, +  //this doesn't currently work for some reason    bullet_list: { +    ...bulletList,      content: 'list_item+',      group: 'block', -    parseDOM: [{ tag: "ul" }, { style: "list-style-type=disc;" }], -    toDOM() { return ulDOM } -  }, +    // parseDOM: [{ tag: "ul" }, { style: 'list-style-type=disc' }], +    // toDOM() { return ulDOM } +  }, +  //bullet_list: { +  //  content: 'list_item+', +  // group: 'block', +  //active: blockActive(schema.nodes.bullet_list), +  //enable: wrapInList(schema.nodes.bullet_list), +  //run: wrapInList(schema.nodes.bullet_list), +  //select: state => true, +  // },    list_item: {      ...listItem,      content: 'paragraph block*'  | 
