feat(editor): use affine container url in preview (#12919)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved code block preview rendering to only display the preview when
appropriate, preventing unwanted previews.

- **Refactor**
- Simplified the HTML preview system by always using a secure
iframe-based approach and removing the WebContainer integration.
- Updated iframe permissions and content delivery for enhanced security
and compatibility.

- **Chores**
- Removed the "Enable Web Container" feature flag and all related
internal logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
EYHN
2025-06-26 10:50:38 +08:00
committed by GitHub
parent ea7678f17e
commit 320d2f5bdf
6 changed files with 22 additions and 154 deletions

View File

@@ -274,14 +274,6 @@ export const AFFINE_FLAGS = {
configurable: isCanaryBuild,
defaultState: false,
},
enable_web_container: {
category: 'blocksuite',
bsFlag: 'enable_web_container',
displayName: 'Enable Web Container',
description: 'Enable web container for code block preview',
defaultState: false,
configurable: true,
},
} satisfies { [key in string]: FlagInfo };
// oxlint-disable-next-line no-redeclare