diff --git a/packages/super-editor/src/components/SuperEditor.vue b/packages/super-editor/src/components/SuperEditor.vue index ee70752440..a5abebabca 100644 --- a/packages/super-editor/src/components/SuperEditor.vue +++ b/packages/super-editor/src/components/SuperEditor.vue @@ -60,6 +60,14 @@ const contextMenuDisabled = computed(() => { return active?.options ? Boolean(active.options.disableContextMenu) : Boolean(props.options.disableContextMenu); }); +/** + * Computed property that determines if web layout mode is active (OOXML ST_View 'web'). + * @returns {boolean} True if viewOptions.layout is 'web' + */ +const isWebLayout = computed(() => { + return props.options.viewOptions?.layout === 'web'; +}); + /** * Reactive ruler visibility state. * Uses a ref with a deep watcher to ensure proper reactivity when options.rulers changes. @@ -126,6 +134,12 @@ watch( * falling back to 8.5in (letter size). */ const containerStyle = computed(() => { + // Web layout mode: no min-width, let CSS handle responsive width + if (isWebLayout.value) { + return {}; + } + + // Print layout mode: use fixed page dimensions // Default: 8.5 inches at 96 DPI = 816px (letter size) let maxWidth = 8.5 * 96; @@ -1040,7 +1054,7 @@ onBeforeUnmount(() => {