Skip to content

Commit 6f94429

Browse files
committed
feat(cut): added open attr
1 parent 0118bd7 commit 6f94429

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/extensions/yfm/YfmCut/YfmCutSpecs/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const getSchemaSpecs = (
1515
placeholder?: PlaceholderOptions,
1616
): Record<CutNode, NodeSpec> => ({
1717
[CutNode.Cut]: {
18-
attrs: {class: {default: 'yfm-cut'}},
18+
attrs: {class: {default: 'yfm-cut'}, open: {default: null}},
1919
content: `${CutNode.CutTitle} ${CutNode.CutContent}`,
2020
group: 'block yfm-cut',
2121
parseDOM: [{tag: '.yfm-cut'}],

src/extensions/yfm/YfmCut/actions/toYfmCut.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {ActionSpec} from '../../../../core';
66
import {cutContentType, cutTitleType, cutType} from '../const';
77

88
const createYfmCutNode = (schema: Schema) => (content?: Node | Node[] | Fragment) => {
9-
return cutType(schema).create({class: 'yfm-cut open'}, [
9+
return cutType(schema).create({class: 'yfm-cut open', open: true}, [
1010
cutTitleType(schema).create(null),
1111
cutContentType(schema).create(null, content),
1212
]);

0 commit comments

Comments
 (0)