修复一开始字幕为空设置默认字体无效的BUG

This commit is contained in:
fangxiang 2022-08-30 20:07:27 +08:00
parent d68a776a36
commit aae5ae9a1d
1 changed files with 4 additions and 1 deletions

View File

@ -130,6 +130,7 @@
tinymce-script-src="tinymce/tinymce.min.js" tinymce-script-src="tinymce/tinymce.min.js"
:init="editor_config" :init="editor_config"
v-model="subtitle.text" v-model="subtitle.text"
@init="(event, editor) => editorInited(event, editor)"
/> />
<q-spinner v-else color="primary" size="5em" :thickness="2" /> <q-spinner v-else color="primary" size="5em" :thickness="2" />
</q-item-section> </q-item-section>
@ -220,7 +221,6 @@ export default defineComponent({
menubar: true, menubar: true,
}, },
font_size_formats: get_font_size_formarts(), font_size_formats: get_font_size_formarts(),
content_style: ".mce-content-body {font-size:60pt;}",
skin: "tinymce-5", skin: "tinymce-5",
language: i18n.locale.value == "zh-CN" ? "zh_CN" : "en_US", language: i18n.locale.value == "zh-CN" ? "zh_CN" : "en_US",
menubar: false, menubar: false,
@ -262,6 +262,9 @@ export default defineComponent({
} }
loading.value = false; loading.value = false;
}, },
editorInited(event: any, editor: any) {
editor.execCommand("FontSize", false, "60pt");
},
onShow() { onShow() {
let success = false; let success = false;
const checkZIndex = () => { const checkZIndex = () => {