diff --git a/packages/blocky-core/src/block/textBlock.ts b/packages/blocky-core/src/block/textBlock.ts index 3a1f180..f19ee00 100644 --- a/packages/blocky-core/src/block/textBlock.ts +++ b/packages/blocky-core/src/block/textBlock.ts @@ -110,6 +110,13 @@ export class TextBlock extends ContentBlock { delta.insert(removeLineBreaks(childPtr.textContent), { italic: true, }); + } else if (tagName === "A") { + const href = childPtr.getAttribute("href"); + if (isString(href)) { + delta.insert(removeLineBreaks(childPtr.textContent), { + href, + }); + } } else if (converter.isContainerElement(childPtr)) { const childElements = converter.parseContainerElement(childPtr); childrenContainer.push(...childElements); diff --git a/packages/blocky-example/app/loro/loroBlock.module.scss b/packages/blocky-example/app/loro/loroBlock.module.scss index ec2eccf..eb0991a 100644 --- a/packages/blocky-example/app/loro/loroBlock.module.scss +++ b/packages/blocky-example/app/loro/loroBlock.module.scss @@ -12,6 +12,7 @@ width: 64px; height: 64px; margin-bottom: 16px; + cursor: pointer; } .buttons { diff --git a/packages/blocky-example/app/loro/loroBlock.tsx b/packages/blocky-example/app/loro/loroBlock.tsx index a56d5d0..f8ed2cf 100644 --- a/packages/blocky-example/app/loro/loroBlock.tsx +++ b/packages/blocky-example/app/loro/loroBlock.tsx @@ -20,9 +20,9 @@ function LoroBlock(props: LoroBlockProps) { }, []); return (