feat(editor): add feature flag for code block html preview (#12397)

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

- **New Features**
  - Introduced an experimental "Code block HTML preview" feature, allowing users to preview HTML within code blocks when enabled.
- **Settings**
  - Added a toggle in experimental features to enable or disable the code block HTML preview.
- **Localization**
  - Added English translations for the new code block HTML preview feature and its description in workspace settings.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Flrande
2025-05-21 07:52:24 +00:00
parent 20e93543e2
commit 2de15e2677
8 changed files with 56 additions and 6 deletions
@@ -325,6 +325,15 @@ export const AFFINE_FLAGS = {
configurable: isBetaBuild || isCanaryBuild,
defaultState: false,
},
enable_code_block_html_preview: {
category: 'affine',
displayName:
'com.affine.settings.workspace.experimental-features.enable-code-block-html-preview.name',
description:
'com.affine.settings.workspace.experimental-features.enable-code-block-html-preview.description',
configurable: isCanaryBuild,
defaultState: true,
},
} satisfies { [key in string]: FlagInfo };
// oxlint-disable-next-line no-redeclare