Add fallback editor font family (#209)

This commit is contained in:
Felix Häusler 2018-04-26 04:19:39 +02:00 committed by 冉四夕
parent b8f33f9e6f
commit 68b0594597
2 changed files with 4 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "marktext",
"version": "0.9.25",
"version": "0.10.21",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -2,8 +2,8 @@
<div
class="editor-wrapper"
:class="[{ 'typewriter': typewriter, 'focus': focus, 'source': sourceCode }, theme]"
:style="{ 'color': theme === 'dark' ? darkColor : lightColor, 'lineHeight': lineHeight, 'fontSize': fontSize,
'font-family': editorFontFamily ? `${editorFontFamily}, sans-serif`:'sans-serif'}"
:style="{ 'color': theme === 'dark' ? darkColor : lightColor, 'lineHeight': lineHeight, 'fontSize': fontSize,
'font-family': editorFontFamily ? `${editorFontFamily}, ${defaultFontFamily}` : `${defaultFontFamily}`}"
>
<div
ref="editor"
@ -104,6 +104,7 @@
])
},
data () {
this.defaultFontFamily = '"Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif'
return {
selectionChange: null,
editor: null,