mirror of https://github.com/fantasticit/think.git
tiptap: remove flow default data
This commit is contained in:
parent
157a61ba8c
commit
28fe0c361a
|
@ -20,9 +20,6 @@ declare module '@tiptap/core' {
|
|||
}
|
||||
}
|
||||
|
||||
const DEFAULT_XML =
|
||||
'<mxGraphModel dx="605" dy="327" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="4" value="开始节点" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1"><mxGeometry x="260" y="140" width="120" height="60" as="geometry"/></mxCell></root></mxGraphModel>';
|
||||
|
||||
export const Flow = Node.create({
|
||||
name: 'flow',
|
||||
group: 'block',
|
||||
|
@ -40,7 +37,7 @@ export const Flow = Node.create({
|
|||
parseHTML: getDatasetAttribute('height'),
|
||||
},
|
||||
data: {
|
||||
default: DEFAULT_XML,
|
||||
default: '',
|
||||
parseHTML: getDatasetAttribute('data'),
|
||||
},
|
||||
defaultShowPicker: {
|
||||
|
@ -78,7 +75,7 @@ export const Flow = Node.create({
|
|||
(options) =>
|
||||
({ tr, commands, chain, editor }) => {
|
||||
options = options || {};
|
||||
options.data = options.data || DEFAULT_XML;
|
||||
options.data = options.data || '';
|
||||
|
||||
// @ts-ignore
|
||||
if (tr.selection?.node?.type?.name == this.name) {
|
||||
|
|
Loading…
Reference in New Issue