diff --git a/src/components/editor/schema.ts b/src/components/editor/schema.ts index f812f6d..8c3f695 100644 --- a/src/components/editor/schema.ts +++ b/src/components/editor/schema.ts @@ -73,7 +73,7 @@ export const schema = new Schema({ }, }, blockquote: { - content: "inline*", + content: "paragraph+", group: "block", defining: true, parseDOM: [{ tag: "blockquote" }], diff --git a/src/components/editor/toolbar.ts b/src/components/editor/toolbar.ts index dbae2a9..90497b2 100644 --- a/src/components/editor/toolbar.ts +++ b/src/components/editor/toolbar.ts @@ -75,7 +75,7 @@ class ToolbarView { } const activeNode = getActiveNodeName(view); - if (activeNode) { + if (activeNode && activeNode in this.buttons.lineFormat) { setActive(this.buttons.lineFormat[activeNode], true); this.lastActiveLineFormat = activeNode; } diff --git a/src/components/editor/tools.ts b/src/components/editor/tools.ts index c3cc8a2..21c0f88 100644 --- a/src/components/editor/tools.ts +++ b/src/components/editor/tools.ts @@ -121,11 +121,11 @@ export const toolsRaw = [ type: "lineFormat", }, { - command: setBlockType(schema.nodes.blockquote), + command: wrapIn(schema.nodes.blockquote), name: "blockquote", key: "Mod-q", icon: "i-quote", - type: "lineFormat", + type: "node", }, { command: insertImage(), name: "image", icon: "i-image", type: "node" }, { diff --git a/src/styles/Default.css b/src/styles/Default.css index 5b9a7ad..6c6a159 100644 --- a/src/styles/Default.css +++ b/src/styles/Default.css @@ -424,10 +424,9 @@ code { blockquote { margin: 1rem 0px; - color: var(--p-text-muted-color); border-left: 4px solid var(--p-primary-color); background-color: var(--p-content-background); - padding: 8px 16px; + padding: 1px 16px; } figure {