implement font-family module
This commit is contained in:
parent
6f5efb6fbc
commit
cb9fd93e51
137 changed files with 1177 additions and 21 deletions
|
|
@ -10,6 +10,7 @@ export const useStylesheetStore = defineStore('stylesheet', () => {
|
|||
// Base state
|
||||
const baseCss = ref('');
|
||||
const customCss = ref('');
|
||||
const fontFaceCss = ref('');
|
||||
const isEditing = ref(false);
|
||||
let formatTimer = null;
|
||||
let isFormatting = false;
|
||||
|
|
@ -23,7 +24,11 @@ export const useStylesheetStore = defineStore('stylesheet', () => {
|
|||
const saveError = ref(null);
|
||||
const narrativeId = ref(null);
|
||||
|
||||
// Computed: combined CSS for preview
|
||||
const setFontFaceCss = (css) => {
|
||||
fontFaceCss.value = css;
|
||||
};
|
||||
|
||||
// Computed: combined CSS for preview (font-face excluded — injected separately in iframe)
|
||||
const content = computed(() => {
|
||||
if (!baseCss.value) return customCss.value;
|
||||
if (!customCss.value) return baseCss.value;
|
||||
|
|
@ -253,12 +258,14 @@ export const useStylesheetStore = defineStore('stylesheet', () => {
|
|||
|
||||
return {
|
||||
// Core state
|
||||
content, // computed: baseCss + customCss
|
||||
content, // computed: fontFaceCss + baseCss + customCss
|
||||
baseCss,
|
||||
customCss,
|
||||
fontFaceCss,
|
||||
isEditing,
|
||||
|
||||
// Methods
|
||||
setFontFaceCss,
|
||||
loadStylesheet,
|
||||
updateProperty,
|
||||
extractValue,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue