feat(text-editor): add highlight, subscript, superscript and mathematics toolbar actions (#10627)

* feat(text-editor): add highlight action

Signed-off-by: ComputerCrack <github.compacter838@simplelogin.com>

* feat(text-editor): add subscript and superscript actions

Signed-off-by: ComputerCrack <github.compacter838@simplelogin.com>

* feat(text-editor): add mathematics inline and block actions

Signed-off-by: ComputerCrack <github.compacter838@simplelogin.com>

* chore(text-editor): add mathematics and katex dependencies

Signed-off-by: ComputerCrack <github.compacter838@simplelogin.com>

* fix(text-editor): fix eslint strict-boolean-expressions in mathematics extension

Signed-off-by: ComputerCrack <github.compacter838@simplelogin.com>

* fix(text-editor): change max-width of toolbar to display all icons correctly

Signed-off-by: ComputerCrack <github.compacter838@simplelogin.com>

* chore(text-editor): add subscript and superscript as direct dependencies

Signed-off-by: ComputerCrack <github.compacter838@simplelogin.com>

* chore(text-editor): add missing locale keys for new text editor actions [temp, AI-generated]

Adds placeholder translations (English fallback) for Highlight, Subscript,  Superscript, Mathematics, and MathematicsBlock to all non-English locale files. Translations are not reviewed and should be replaced by a native speaker.

Signed-off-by: ComputerCrack <github.compacter838@simplelogin.com>

* fix(text-editor): fix subscript/superscript serialization and extension placement

Signed-off-by: ComputerCrack <github.compacter838@simplelogin.com>

---------

Signed-off-by: ComputerCrack <github.compacter838@simplelogin.com>
Co-authored-by: ComputerCrack <github.compacter838@simplelogin.com>
This commit is contained in:
ComputerCrack
2026-03-19 09:51:24 +07:00
committed by GitHub
co-authored by ComputerCrack
parent 83fdb49d23
commit 2d26c74874
28 changed files with 590 additions and 27 deletions
+64 -1
View File
@@ -4122,6 +4122,12 @@ importers:
'@tiptap/extension-strike':
specifier: ^2.11.7
version: 2.27.1(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))
'@tiptap/extension-subscript':
specifier: ^2.11.7
version: 2.27.2(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))
'@tiptap/extension-superscript':
specifier: ^2.11.7
version: 2.27.2(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))
'@tiptap/extension-table':
specifier: ^2.11.7
version: 2.27.1(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))(@tiptap/pm@2.27.1)
@@ -28387,12 +28393,21 @@ importers:
'@tiptap/extension-list-keymap':
specifier: ^2.11.7
version: 2.27.1(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))
'@tiptap/extension-mathematics':
specifier: ^2.11.7
version: 2.27.2(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))(@tiptap/pm@2.27.1)(katex@0.16.25)
'@tiptap/extension-ordered-list':
specifier: ^2.11.7
version: 2.27.1(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))
'@tiptap/extension-placeholder':
specifier: ^2.11.7
version: 2.27.1(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))(@tiptap/pm@2.27.1)
'@tiptap/extension-subscript':
specifier: ^2.11.7
version: 2.27.2(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))
'@tiptap/extension-superscript':
specifier: ^2.11.7
version: 2.27.2(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))
'@tiptap/extension-table':
specifier: ^2.11.7
version: 2.27.1(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))(@tiptap/pm@2.27.1)
@@ -28432,6 +28447,9 @@ importers:
fast-equals:
specifier: ^5.2.2
version: 5.3.2
katex:
specifier: ^0.16.0
version: 0.16.25
lib0:
specifier: ^0.2.109
version: 0.2.114
@@ -28475,6 +28493,9 @@ importers:
'@types/jest':
specifier: ^29.5.5
version: 29.5.14
'@types/katex':
specifier: ^0.16.0
version: 0.16.8
'@typescript-eslint/eslint-plugin':
specifier: ^6.21.0
version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.3))(eslint@8.57.1)(typescript@5.9.3)
@@ -39062,6 +39083,12 @@ importers:
'@tiptap/extension-placeholder':
specifier: ^2.11.7
version: 2.27.1(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))(@tiptap/pm@2.27.1)
'@tiptap/extension-subscript':
specifier: ^2.11.7
version: 2.27.2(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))
'@tiptap/extension-superscript':
specifier: ^2.11.7
version: 2.27.2(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))
'@tiptap/extension-table':
specifier: ^2.11.7
version: 2.27.1(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))(@tiptap/pm@2.27.1)
@@ -44385,6 +44412,13 @@ packages:
peerDependencies:
'@tiptap/core': ^2.7.0
'@tiptap/extension-mathematics@2.27.2':
resolution: {integrity: sha512-ouEMrA7we5p1v7SbHFSrrVQBAUb1moiUOwo0BqdCJXV79YOxdURn+8vlA2rIItO0E3Ya1UFoA1LW+AE0cYn4RQ==}
peerDependencies:
'@tiptap/core': ^2.7.0
'@tiptap/pm': ^2.7.0
katex: ^0.16.4
'@tiptap/extension-mention@2.27.1':
resolution: {integrity: sha512-8qwPIum0rMK/7BaHEN0+M/VkUn00LqhqyRO8JdC/EBVrUBgxKTQsUhIhSstgVAYzD1w7cCUfTFX4bYu9lcFMEQ==}
peerDependencies:
@@ -44413,6 +44447,16 @@ packages:
peerDependencies:
'@tiptap/core': ^2.7.0
'@tiptap/extension-subscript@2.27.2':
resolution: {integrity: sha512-x2Oz7hrI4KvzzB9pWChFRm6JnKdYAUQDyrlSROngtzXT7VpNQNoD5s8OlICzDeNsaRKzhR8omIz2z17S1VB48g==}
peerDependencies:
'@tiptap/core': ^2.7.0
'@tiptap/extension-superscript@2.27.2':
resolution: {integrity: sha512-VTGJDuNqdesibSVW94Q71VaGVGr/bwBppdaNLn7k6beOegALfIH7ncArlkD/eihOlJ2qaWiT7FoWNLTb/Fdv1w==}
peerDependencies:
'@tiptap/core': ^2.7.0
'@tiptap/extension-table-cell@2.27.1':
resolution: {integrity: sha512-VowNmz1kub2qfntWkU8jGA6DoCl9xjJBWSypuQIeiN/IRId3BMrJodT26pTNJ3ChDMtYaanWaUvYqckRxgTC2A==}
peerDependencies:
@@ -44792,6 +44836,9 @@ packages:
'@types/jsonwebtoken@9.0.10':
resolution: {integrity: sha512-asx5hIG9Qmf/1oStypjanR7iKTv0gXQ1Ov/jfrX6kS/EO0OFni8orbmGCn0672NHR3kXHwpAwR+B368ZGN/2rA==}
'@types/katex@0.16.8':
resolution: {integrity: sha512-trgaNyfU+Xh2Tc+ABIb44a5AYUpicB3uwirOioeOkNPPbmgRNtcWyDeeFRzjPZENO9Vq8gvVqfhaaXWLlevVwg==}
'@types/keygrip@1.0.6':
resolution: {integrity: sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==}
@@ -55388,6 +55435,12 @@ snapshots:
dependencies:
'@tiptap/core': 2.27.1(@tiptap/pm@2.27.1)
'@tiptap/extension-mathematics@2.27.2(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))(@tiptap/pm@2.27.1)(katex@0.16.25)':
dependencies:
'@tiptap/core': 2.27.1(@tiptap/pm@2.27.1)
'@tiptap/pm': 2.27.1
katex: 0.16.25
'@tiptap/extension-mention@2.27.1(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))(@tiptap/pm@2.27.1)(@tiptap/suggestion@2.27.1(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))(@tiptap/pm@2.27.1))':
dependencies:
'@tiptap/core': 2.27.1(@tiptap/pm@2.27.1)
@@ -55411,6 +55464,14 @@ snapshots:
dependencies:
'@tiptap/core': 2.27.1(@tiptap/pm@2.27.1)
'@tiptap/extension-subscript@2.27.2(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))':
dependencies:
'@tiptap/core': 2.27.1(@tiptap/pm@2.27.1)
'@tiptap/extension-superscript@2.27.2(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))':
dependencies:
'@tiptap/core': 2.27.1(@tiptap/pm@2.27.1)
'@tiptap/extension-table-cell@2.27.1(@tiptap/core@2.27.1(@tiptap/pm@2.27.1))':
dependencies:
'@tiptap/core': 2.27.1(@tiptap/pm@2.27.1)
@@ -55880,6 +55941,8 @@ snapshots:
'@types/ms': 2.1.0
'@types/node': 22.19.0
'@types/katex@0.16.8': {}
'@types/keygrip@1.0.6': {}
'@types/keyv@3.1.4':
@@ -61383,7 +61446,7 @@ snapshots:
node-loader@2.0.0(webpack@5.102.1):
dependencies:
loader-utils: 2.0.4
webpack: 5.102.1
webpack: 5.102.1(esbuild@0.25.12)(webpack-cli@5.1.4)
node-localstorage@2.2.1:
dependencies: