chore: fix remote image export in markdown

This commit is contained in:
Aman Harwara
2023-10-23 21:09:48 +05:30
parent 5a0f9d49df
commit 40ec5ac2dc
2 changed files with 5 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ const MenuSection = ({
return ( return (
<div <div
className={classNames( className={classNames(
'my-4 md:my-2 md:border-b md:border-border md:pb-2 md:last:mb-0 md:last:border-b-0 md:last:pb-0 md:translucent-ui:border-[--popover-border-color]', 'my-4 md:my-2 md:border-b md:border-border md:pb-2 md:last:mb-0 md:last:border-b-0 md:last:pb-0 md:first:last:mt-0 md:translucent-ui:border-[--popover-border-color]',
className, className,
)} )}
> >

View File

@@ -75,6 +75,10 @@ export class RemoteImageNode extends DecoratorBlockNode {
return { element } return { element }
} }
override getTextContent(): string {
return `![${this.__alt || 'image'}](${this.__src})`
}
decorate(_editor: LexicalEditor, config: EditorConfig): JSX.Element { decorate(_editor: LexicalEditor, config: EditorConfig): JSX.Element {
const embedBlockTheme = config.theme.embedBlock || {} const embedBlockTheme = config.theme.embedBlock || {}
const className = { const className = {