@blocksuite/editor
Advanced tools
Comparing version 0.3.0-alpha.5 to 0.3.0-alpha.6
@@ -94,2 +94,8 @@ // There are these uncommon in-line tags that have not been added | ||
break; | ||
case 'HR': | ||
result = this._contentParser.getParserHtmlText2Block('commonParser')?.({ | ||
element: node, | ||
flavour: 'affine:divider', | ||
}); | ||
break; | ||
default: | ||
@@ -96,0 +102,0 @@ break; |
@@ -149,3 +149,11 @@ import { MarkdownUtils } from './markdown-utils'; | ||
this._addBlocks(blocks[0].children, selectedBlock, 0, addBlockIds); | ||
parent && this._addBlocks(blocks.slice(1), parent, index, addBlockIds); | ||
//This is a temporary processing of the divider block, subsequent refactoring of the divider will remove it | ||
if (blocks[0].flavour === 'affine:divider') { | ||
parent && | ||
this._addBlocks(blocks.slice(0), parent, index, addBlockIds); | ||
} | ||
else { | ||
parent && | ||
this._addBlocks(blocks.slice(1), parent, index, addBlockIds); | ||
} | ||
let lastId = selectedBlock?.id; | ||
@@ -152,0 +160,0 @@ let position = endIndex + insertLen; |
{ | ||
"name": "@blocksuite/editor", | ||
"version": "0.3.0-alpha.5", | ||
"version": "0.3.0-alpha.6", | ||
"description": "Default BlockSuite-based editor built for AFFiNE.", | ||
@@ -10,4 +10,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@blocksuite/blocks": "0.3.0-alpha.5", | ||
"@blocksuite/store": "0.3.0-alpha.5", | ||
"@blocksuite/blocks": "0.3.0-alpha.6", | ||
"@blocksuite/store": "0.3.0-alpha.6", | ||
"lit": "^2.3.1", | ||
@@ -14,0 +14,0 @@ "marked": "^4.1.0", |
@@ -125,2 +125,10 @@ import type { ContentParser } from '.'; | ||
break; | ||
case 'HR': | ||
result = this._contentParser.getParserHtmlText2Block( | ||
'commonParser' | ||
)?.({ | ||
element: node, | ||
flavour: 'affine:divider', | ||
}); | ||
break; | ||
default: | ||
@@ -127,0 +135,0 @@ break; |
@@ -200,4 +200,10 @@ import type { BaseBlockModel } from '@blocksuite/store'; | ||
this._addBlocks(blocks[0].children, selectedBlock, 0, addBlockIds); | ||
parent && this._addBlocks(blocks.slice(1), parent, index, addBlockIds); | ||
//This is a temporary processing of the divider block, subsequent refactoring of the divider will remove it | ||
if (blocks[0].flavour === 'affine:divider') { | ||
parent && | ||
this._addBlocks(blocks.slice(0), parent, index, addBlockIds); | ||
} else { | ||
parent && | ||
this._addBlocks(blocks.slice(1), parent, index, addBlockIds); | ||
} | ||
let lastId = selectedBlock?.id; | ||
@@ -204,0 +210,0 @@ let position = endIndex + insertLen; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
212566
3836
+ Added@blocksuite/blocks@0.3.0-alpha.6(transitive)
+ Added@blocksuite/store@0.3.0-alpha.6(transitive)
- Removed@blocksuite/blocks@0.3.0-alpha.5(transitive)
- Removed@blocksuite/store@0.3.0-alpha.5(transitive)