Commit 282b602b authored by chris's avatar chris

add list nodes to Editoria

parent 82b4529f
......@@ -10,7 +10,9 @@
"wax-prosemirror-schema": "0.0.1",
"wax-prosemirror-themes": "0.0.1",
"wax-prosemirror-layouts": "0.0.1",
"wax-prosemirror-components": "0.0.1"
"wax-prosemirror-components": "0.0.1",
"prosemirror-tables": "^0.7.10",
"prosemirror-schema-list": "^1.0.0"
},
"scripts": {
"start": "react-app-rewired start",
......
......@@ -2,6 +2,7 @@ import React, { Component } from "react";
import styled, { createGlobalStyle } from "styled-components";
import { Wax, CreateSchema } from "wax-prosemirror-core";
import { EditoriaSchema } from "wax-prosemirror-schema";
import { orderedList, bulletList, listItem } from "prosemirror-schema-list";
import { MainMenuBar, SideMenuBar } from "wax-prosemirror-components";
import "wax-prosemirror-layouts/layouts/editoria-layout.css";
import "wax-prosemirror-themes/themes/editoria-theme.css";
......@@ -9,6 +10,26 @@ import "wax-prosemirror-themes/themes/editoria-theme.css";
const plugins = [];
const keys = {};
const extraNodes = {
ordered_list: {
...orderedList,
content: "list_item+",
group: "block"
},
bullet_list: {
...bulletList,
content: "list_item+",
group: "block"
},
list_item: {
...listItem,
content: "paragraph block*",
group: "block"
}
};
EditoriaSchema.nodes = { ...EditoriaSchema.nodes, ...extraNodes };
const options = {
schema: new CreateSchema(EditoriaSchema)
};
......@@ -41,6 +62,7 @@ class Editoria extends Component {
placeholder="Type Something..."
theme="editoria"
layout="editoria"
debug
renderLayout={({ editor, ...props }) => (
<React.Fragment>
<MainMenuBar {...props} />
......
......@@ -226,7 +226,6 @@ export default {
select: state => true,
menu: props => <Button key={uuid()} {...props} />
},
blockquote: {
title: "Wrap in block quote",
content: icons.blockquote,
......
......@@ -21,10 +21,8 @@
"prosemirror-inputrules": "^1.0.1",
"prosemirror-keymap": "^1.0.1",
"prosemirror-model": "^1.7.0",
"prosemirror-schema-list": "^1.0.0",
"prosemirror-transform": "^1.1.3",
"prosemirror-state": "^1.2.2",
"prosemirror-tables": "^0.7.10",
"prosemirror-view": "^1.8.9",
"prosemirror-dev-tools": "^2.1.1"
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment