feat(BlockEditor): add rich paste support with html-to-blocks parsing
- add clipboard.js with htmlToBlocks, blocksToHtml, and blocksToPlainText helpers - handle single-paragraph html paste as inline splice preserving block type - handle multi-block html paste by splitting current block and merging head/tail paragraphs - add onPasteInline and onPasteBlocks props to Block component - implement handlePasteInline and handlePasteBlocks in BlockEditor - fallback to plain text insertion when html is absent or yields no blocks - update README to document clipboard behaviour and new paste handlers
This commit is contained in:
@@ -37,3 +37,4 @@ export {
|
||||
normalize as normalizeInline,
|
||||
} from './inline/types.js';
|
||||
export { inlineToDom, domToInline } from './inline/serialize.js';
|
||||
export { blocksToHtml, blocksToPlainText, htmlToBlocks } from './inline/clipboard.js';
|
||||
|
||||
Reference in New Issue
Block a user