mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-22 02:04:31 +00:00
[visual] Add decorations for \textsuperscript
and \textsubscript
(#14153)
GitOrigin-RevId: 7a5bfc7077131dab7ba9569b7edc0d5daad65347
This commit is contained in:
parent
32d5c99cdc
commit
971e0f0e84
3 changed files with 14 additions and 0 deletions
|
@ -936,6 +936,8 @@ export const atomicDecorations = (options: Options) => {
|
|||
'\\texttt',
|
||||
'\\textmd',
|
||||
'\\textsf',
|
||||
'\\textsuperscript',
|
||||
'\\textsubscript',
|
||||
'\\sout',
|
||||
'\\emph',
|
||||
].includes(commandName)
|
||||
|
|
|
@ -248,6 +248,16 @@ export const visualTheme = EditorView.theme({
|
|||
'.ol-cm-command-textsf': {
|
||||
fontFamily: 'var(--source-font-family)',
|
||||
},
|
||||
'.ol-cm-command-textsuperscript': {
|
||||
verticalAlign: 'super',
|
||||
fontSize: 'smaller',
|
||||
lineHeight: 'calc(var(--line-height) / 2)',
|
||||
},
|
||||
'.ol-cm-command-textsubscript': {
|
||||
verticalAlign: 'sub',
|
||||
fontSize: 'smaller',
|
||||
lineHeight: 'calc(var(--line-height) / 2)',
|
||||
},
|
||||
'.ol-cm-command-underline': {
|
||||
textDecoration: 'underline',
|
||||
},
|
||||
|
|
|
@ -154,6 +154,8 @@ describe('<CodeMirrorEditor/> in Visual mode', function () {
|
|||
'texttt',
|
||||
'textmd',
|
||||
'textsf',
|
||||
'textsubscript',
|
||||
'textsuperscript',
|
||||
'sout',
|
||||
'emph',
|
||||
'url',
|
||||
|
|
Loading…
Reference in a new issue