mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-04 14:41:42 +08:00
fix(admonition): inserting new admonitions of given type not working
This commit is contained in:
parent
80de28c617
commit
c3a9582208
@ -199,7 +199,9 @@ export default class AdmonitionCommand extends Command {
|
|||||||
let quote = findQuote( groupRange.start );
|
let quote = findQuote( groupRange.start );
|
||||||
|
|
||||||
if ( !quote ) {
|
if ( !quote ) {
|
||||||
quote = writer.createElement( 'aside', { type });
|
const attributes: Record<string, unknown> = {};
|
||||||
|
attributes[ADMONITION_TYPE_ATTRIBUTE] = type;
|
||||||
|
quote = writer.createElement( 'aside', attributes);
|
||||||
|
|
||||||
writer.wrap( groupRange, quote );
|
writer.wrap( groupRange, quote );
|
||||||
} else if (quote.is("element")) {
|
} else if (quote.is("element")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user