mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
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:
@@ -188,6 +188,8 @@ export class AffineLatexNode extends SignalWatcher(
|
|||||||
this._editorAbortController?.abort();
|
this._editorAbortController?.abort();
|
||||||
this._editorAbortController = new AbortController();
|
this._editorAbortController = new AbortController();
|
||||||
|
|
||||||
|
blockComponent.selection.setGroup('note', []);
|
||||||
|
|
||||||
const portal = createLitPortal({
|
const portal = createLitPortal({
|
||||||
template: html`<latex-editor-menu
|
template: html`<latex-editor-menu
|
||||||
.std=${this.std}
|
.std=${this.std}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
"@types/katex": "^0.16.7",
|
"@types/katex": "^0.16.7",
|
||||||
"browser-fs-access": "^0.37.0",
|
"browser-fs-access": "^0.37.0",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
|
"katex": "^0.16.11",
|
||||||
"lit": "^3.2.0",
|
"lit": "^3.2.0",
|
||||||
"lz-string": "^1.5.0",
|
"lz-string": "^1.5.0",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
@import '@toeverything/theme/style.css';
|
@import '@toeverything/theme/style.css';
|
||||||
@import '@toeverything/theme/fonts.css';
|
@import '@toeverything/theme/fonts.css';
|
||||||
|
|
||||||
|
@import 'katex/dist/katex.min.css';
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'color-emoji';
|
font-family: 'color-emoji';
|
||||||
src:
|
src:
|
||||||
|
|||||||
@@ -4355,6 +4355,7 @@ __metadata:
|
|||||||
browser-fs-access: "npm:^0.37.0"
|
browser-fs-access: "npm:^0.37.0"
|
||||||
graphql: "npm:^16.9.0"
|
graphql: "npm:^16.9.0"
|
||||||
jszip: "npm:^3.10.1"
|
jszip: "npm:^3.10.1"
|
||||||
|
katex: "npm:^0.16.11"
|
||||||
lit: "npm:^3.2.0"
|
lit: "npm:^3.2.0"
|
||||||
lz-string: "npm:^1.5.0"
|
lz-string: "npm:^1.5.0"
|
||||||
magic-string: "npm:^0.30.11"
|
magic-string: "npm:^0.30.11"
|
||||||
|
|||||||
Reference in New Issue
Block a user