Add decorations for textmd and textsf (#13716)
GitOrigin-RevId: c5bedf2260c4e075e458ac38f90e5746dccdde81
This commit is contained in:
+8
-3
@@ -849,9 +849,14 @@ export const atomicDecorations = (options: Options) => {
|
||||
)
|
||||
} else if (
|
||||
// markup that can't be toggled using toolbar buttons/keyboard shortcuts
|
||||
['\\textsc', '\\texttt', '\\sout', '\\emph'].includes(
|
||||
commandName
|
||||
)
|
||||
[
|
||||
'\\textsc',
|
||||
'\\texttt',
|
||||
'\\textmd',
|
||||
'\\textsf',
|
||||
'\\sout',
|
||||
'\\emph',
|
||||
].includes(commandName)
|
||||
) {
|
||||
if (shouldDecorate(state, nodeRef)) {
|
||||
decorations.push(
|
||||
|
||||
@@ -220,6 +220,12 @@ export const visualTheme = EditorView.theme({
|
||||
'.ol-cm-command-texttt': {
|
||||
fontFamily: 'monospace',
|
||||
},
|
||||
'.ol-cm-command-textmd, .ol-cm-command-textmd > .ol-cm-command-textbf': {
|
||||
fontWeight: 'normal',
|
||||
},
|
||||
'.ol-cm-command-textsf': {
|
||||
fontFamily: 'var(--source-font-family)',
|
||||
},
|
||||
'.ol-cm-command-underline': {
|
||||
textDecoration: 'underline',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user