Skip to content

Commit

Permalink
fix(editor): prefereces font reset in a down google fonts toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Sep 25, 2022
1 parent 9fcc89c commit 0276dae
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
import { Themes } from 'better-write-plugin-theme'
import { BetterWriteThemes } from 'better-write-types'
import { useEditorStore } from '@/store/editor'
import { nextTick, computed } from 'vue'
import { nextTick, computed, watch } from 'vue'
import { usePlugin } from 'better-write-plugin-core'
import { useStorage } from '@/use/storage/storage'
import { useNProgress } from '@vueuse/integrations/useNProgress'
Expand Down Expand Up @@ -148,4 +148,14 @@
isLoading.value = false
}
watch(
computed(() => EDITOR.styles.googleFontsInjection),
(b) => {
if (!b) {
EDITOR.styles.heading.fontFamily = 'Poppins'
EDITOR.styles.text.fontFamily = 'Raleway'
}
}
)
</script>

0 comments on commit 0276dae

Please sign in to comment.