mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Copied in default node types for control and future editing
This commit is contained in:
@ -5,7 +5,7 @@ import {
|
||||
|
||||
import {toggleMark} from "prosemirror-commands";
|
||||
import {menuBar} from "./menubar"
|
||||
import index from "../schema/schema";
|
||||
import schema from "../schema";
|
||||
|
||||
|
||||
function cmdItem(cmd, options) {
|
||||
@ -53,49 +53,49 @@ function markItem(markType, options) {
|
||||
}
|
||||
|
||||
const inlineStyles = [
|
||||
markItem(index.marks.strong, {title: "Bold", icon: icons.strong}),
|
||||
markItem(index.marks.em, {title: "Italic", icon: icons.em}),
|
||||
markItem(index.marks.underline, {title: "Underline", label: 'U'}),
|
||||
markItem(index.marks.strike, {title: "Strikethrough", label: '-S-'}),
|
||||
markItem(index.marks.superscript, {title: "Superscript", label: 'sup'}),
|
||||
markItem(index.marks.subscript, {title: "Subscript", label: 'sub'}),
|
||||
markItem(schema.marks.strong, {title: "Bold", icon: icons.strong}),
|
||||
markItem(schema.marks.em, {title: "Italic", icon: icons.em}),
|
||||
markItem(schema.marks.underline, {title: "Underline", label: 'U'}),
|
||||
markItem(schema.marks.strike, {title: "Strikethrough", label: '-S-'}),
|
||||
markItem(schema.marks.superscript, {title: "Superscript", label: 'sup'}),
|
||||
markItem(schema.marks.subscript, {title: "Subscript", label: 'sub'}),
|
||||
];
|
||||
|
||||
const formats = [
|
||||
blockTypeItem(index.nodes.heading, {
|
||||
blockTypeItem(schema.nodes.heading, {
|
||||
label: "Header Large",
|
||||
attrs: {level: 2}
|
||||
}),
|
||||
blockTypeItem(index.nodes.heading, {
|
||||
blockTypeItem(schema.nodes.heading, {
|
||||
label: "Header Medium",
|
||||
attrs: {level: 3}
|
||||
}),
|
||||
blockTypeItem(index.nodes.heading, {
|
||||
blockTypeItem(schema.nodes.heading, {
|
||||
label: "Header Small",
|
||||
attrs: {level: 4}
|
||||
}),
|
||||
blockTypeItem(index.nodes.heading, {
|
||||
blockTypeItem(schema.nodes.heading, {
|
||||
label: "Header Tiny",
|
||||
attrs: {level: 5}
|
||||
}),
|
||||
blockTypeItem(index.nodes.paragraph, {
|
||||
blockTypeItem(schema.nodes.paragraph, {
|
||||
label: "Paragraph",
|
||||
attrs: {}
|
||||
}),
|
||||
new DropdownSubmenu([
|
||||
blockTypeItem(index.nodes.callout, {
|
||||
blockTypeItem(schema.nodes.callout, {
|
||||
label: "Info Callout",
|
||||
attrs: {type: 'info'}
|
||||
}),
|
||||
blockTypeItem(index.nodes.callout, {
|
||||
blockTypeItem(schema.nodes.callout, {
|
||||
label: "Danger Callout",
|
||||
attrs: {type: 'danger'}
|
||||
}),
|
||||
blockTypeItem(index.nodes.callout, {
|
||||
blockTypeItem(schema.nodes.callout, {
|
||||
label: "Success Callout",
|
||||
attrs: {type: 'success'}
|
||||
}),
|
||||
blockTypeItem(index.nodes.callout, {
|
||||
blockTypeItem(schema.nodes.callout, {
|
||||
label: "Warning Callout",
|
||||
attrs: {type: 'warning'}
|
||||
})
|
||||
|
Reference in New Issue
Block a user