mirror of
https://github.com/writefreely/writefreely
synced 2024-11-10 03:24:11 +00:00
Support blockquotes in Classic editor
Ref T727
This commit is contained in:
parent
c01fb585ba
commit
5a4ff2a9de
4 changed files with 6 additions and 6 deletions
|
@ -293,7 +293,8 @@ li.ProseMirror-selectednode:after {
|
|||
|
||||
.ProseMirror blockquote {
|
||||
padding-left: 1em;
|
||||
border-left: 3px solid #eee;
|
||||
border-left: 4px solid #ddd;
|
||||
color: #767676;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ export const writeFreelyMarkdownParser = new MarkdownParser(
|
|||
writeFreelySchema,
|
||||
markdownit("commonmark", { html: true }),
|
||||
{
|
||||
// blockquote: { block: "blockquote" },
|
||||
blockquote: { block: "blockquote" },
|
||||
paragraph: { block: "paragraph" },
|
||||
list_item: { block: "list_item" },
|
||||
bullet_list: { block: "bullet_list" },
|
||||
|
|
|
@ -32,9 +32,9 @@ export const writeFreelyMarkdownSerializer = new MarkdownSerializer(
|
|||
state.write("<!--more-->\n");
|
||||
state.closeBlock(node);
|
||||
},
|
||||
// blockquote(state, node) {
|
||||
// state.wrapBlock("> ", undefined, node, () => state.renderContent(node));
|
||||
// },
|
||||
blockquote(state, node) {
|
||||
state.wrapBlock("> ", null, node, () => state.renderContent(node));
|
||||
},
|
||||
code_block(state, node) {
|
||||
state.write(`\`\`\`${node.attrs.params || ""}\n`);
|
||||
state.text(node.textContent, false);
|
||||
|
|
|
@ -3,7 +3,6 @@ import { Schema } from "prosemirror-model";
|
|||
|
||||
export const writeFreelySchema = new Schema({
|
||||
nodes: schema.spec.nodes
|
||||
.remove("blockquote")
|
||||
.addToEnd("readmore", {
|
||||
inline: false,
|
||||
content: "",
|
||||
|
|
Loading…
Reference in a new issue