chore(editor): add event track for html preview (#12592)

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

- **New Features**
  - Enhanced tracking for code block interactions, including language selection and preview toggling.
  - Improved error reporting for HTML block preview failures, providing better visibility into issues.
- **Bug Fixes**
  - Added explicit feedback and tracking when cross-origin isolation is not supported during code block preview setup.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Flrande
2025-05-28 10:08:19 +00:00
parent 9e5d132bd0
commit f610d7b8af
7 changed files with 63 additions and 3 deletions

View File

@@ -57,7 +57,8 @@ type DocEvents =
| 'addProperty'
| 'editDisplayMenu'
| 'navigateAllDocsRouter'
| 'navigatePinedCollectionRouter';
| 'navigatePinedCollectionRouter'
| 'htmlBlockPreviewFailed';
type EditorEvents =
| 'bold'
| 'italic'
@@ -463,6 +464,7 @@ interface PageEvents extends PageDivision {
aiActions: ['requestSignIn'];
starterBar: ['quickStart', 'openTemplateListMenu'];
audioBlock: ['transcribeRecording', 'openTranscribeNotes'];
codeBlock: ['htmlBlockPreviewFailed'];
};
inlineDocInfo: {
$: ['toggle'];
@@ -765,6 +767,9 @@ export type EventArgs = {
mentionMember: {
type: 'member' | 'invite' | 'more';
};
htmlBlockPreviewFailed: {
type: string;
};
noAccessPrompted: {};
loadDoc: {
workspaceId: string;