mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
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:
@@ -450,7 +450,7 @@ export class CodeBlockComponent extends CaptionedBlockComponent<CodeBlockModel>
|
||||
contenteditable="false"
|
||||
class="affine-code-block-preview"
|
||||
>
|
||||
${previewContext?.renderer(this.model)}
|
||||
${shouldRenderPreview && previewContext?.renderer(this.model)}
|
||||
</div>
|
||||
${this.renderChildren(this.model)} ${Object.values(this.widgets)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user