mirror of
https://github.com/enso-org/enso.git
synced 2024-11-22 11:52:59 +03:00
Fix doc panel images (#10673)
Transformers from our custom plugins were ignored because of misconfiguration of lexical markdown plugin. Part of #10435 https://github.com/user-attachments/assets/48b22546-9893-42f8-9a3b-5ed6070c4eaf
This commit is contained in:
parent
8a3180eb89
commit
5366dd384f
@ -30,6 +30,8 @@ const title = computed(() =>
|
||||
: '',
|
||||
)
|
||||
|
||||
const alt = props.alt ? props.alt : DEFAULT_ALT_TEXT
|
||||
|
||||
onUnmounted(() => {
|
||||
if (data.value?.ok) data.value.value.dispose?.()
|
||||
})
|
||||
|
@ -28,10 +28,11 @@ export function markdownPlugin(
|
||||
if (extension?.transformers) transformers.push(...extension.transformers)
|
||||
}
|
||||
transformers.push(...TRANSFORMERS)
|
||||
return [...extensions, baseMarkdownPlugin, markdownSyncPlugin(model, transformers)]
|
||||
return [...extensions, baseMarkdownPlugin(transformers), markdownSyncPlugin(model, transformers)]
|
||||
}
|
||||
|
||||
const baseMarkdownPlugin: LexicalPlugin = {
|
||||
function baseMarkdownPlugin(transformers: Transformer[]): LexicalPlugin {
|
||||
return {
|
||||
nodes: [
|
||||
HeadingNode,
|
||||
QuoteNode,
|
||||
@ -47,8 +48,9 @@ const baseMarkdownPlugin: LexicalPlugin = {
|
||||
],
|
||||
register: (editor) => {
|
||||
registerRichText(editor)
|
||||
registerMarkdownShortcuts(editor, TRANSFORMERS)
|
||||
registerMarkdownShortcuts(editor, transformers)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
const markdownSyncPlugin = (model: Ref<string>, transformers: Transformer[]): LexicalPlugin => ({
|
||||
|
Loading…
Reference in New Issue
Block a user