mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 03:26:47 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user