mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 07:08:55 +02:00
fix(ckeditor5-math): equation not maintaining styles (closes #7211)
This commit is contained in:
parent
26e14aff7b
commit
d6e9acc149
@ -30,7 +30,12 @@ export default class MathCommand extends Command {
|
|||||||
|
|
||||||
mathtex = writer.createElement(
|
mathtex = writer.createElement(
|
||||||
display ? 'mathtex-display' : 'mathtex-inline',
|
display ? 'mathtex-display' : 'mathtex-inline',
|
||||||
{ equation, type, display }
|
{
|
||||||
|
...Object.fromEntries(selection.getAttributes()),
|
||||||
|
equation,
|
||||||
|
type,
|
||||||
|
display
|
||||||
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
const selection = this.editor.model.document.selection;
|
const selection = this.editor.model.document.selection;
|
||||||
@ -40,7 +45,7 @@ export default class MathCommand extends Command {
|
|||||||
display ? 'mathtex-display' : 'mathtex-inline',
|
display ? 'mathtex-display' : 'mathtex-inline',
|
||||||
{
|
{
|
||||||
// Inherit all attributes from selection (e.g. color, background color, size).
|
// Inherit all attributes from selection (e.g. color, background color, size).
|
||||||
...Object.fromEntries( selection.getAttributes() ),
|
...Object.fromEntries(selection.getAttributes()),
|
||||||
equation,
|
equation,
|
||||||
type: outputType,
|
type: outputType,
|
||||||
display,
|
display,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user