mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-01 12:42:28 +08:00
Fixed conversion to work properly with v32.0.0 release.
This commit is contained in:
parent
302a0dc2ef
commit
203ee28f70
@ -104,11 +104,14 @@ export default class MermaidEditing extends Plugin {
|
||||
// multiple markdown converters that we have seen are using only `language-mermaid` class and not `mermaid` alone.
|
||||
const code = writer.createContainerElement( 'code', {
|
||||
class: 'language-mermaid'
|
||||
}, writer.createText( data.item.getAttribute( 'source' ) ) );
|
||||
} );
|
||||
const pre = writer.createContainerElement( 'pre', {
|
||||
spellcheck: 'false'
|
||||
}, code );
|
||||
} );
|
||||
const sourceTextNode = writer.createText( data.item.getAttribute( 'source' ) );
|
||||
|
||||
writer.insert( model.createPositionAt( code, 'end' ), sourceTextNode );
|
||||
writer.insert( model.createPositionAt( pre, 'end' ), code );
|
||||
writer.insert( targetViewPosition, pre );
|
||||
mapper.bindElements( data.item, code );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user