fix(editor): clear selection after toggle latex editor (#12637)

- **fix(editor): clear selection after toggle latex editor**
- **chore: remove useless test**

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - LaTeX rendering now outputs MathML format for improved accessibility and compatibility.
  - Added support for KaTeX styling to enhance LaTeX display in the playground.

- **Bug Fixes**
  - Improved editor behavior by resetting the selection group before opening the LaTeX editor.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Flrande
2025-05-29 14:37:41 +00:00
parent 517aec79ba
commit 9c81c24fbe
4 changed files with 6 additions and 0 deletions

View File

@@ -188,6 +188,8 @@ export class AffineLatexNode extends SignalWatcher(
this._editorAbortController?.abort();
this._editorAbortController = new AbortController();
blockComponent.selection.setGroup('note', []);
const portal = createLitPortal({
template: html`<latex-editor-menu
.std=${this.std}

View File

@@ -24,6 +24,7 @@
"@types/katex": "^0.16.7",
"browser-fs-access": "^0.37.0",
"jszip": "^3.10.1",
"katex": "^0.16.11",
"lit": "^3.2.0",
"lz-string": "^1.5.0",
"rxjs": "^7.8.1",

View File

@@ -1,6 +1,8 @@
@import '@toeverything/theme/style.css';
@import '@toeverything/theme/fonts.css';
@import 'katex/dist/katex.min.css';
@font-face {
font-family: 'color-emoji';
src: