Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(code):better experience

tzhangchi917b4b64f4f8
diff --git a/libs/components/editor-blocks/src/blocks/code/index.ts b/libs/components/editor-blocks/src/blocks/code/index.ts
index 4239add745..e7d06cb00a 100644
--- a/libs/components/editor-blocks/src/blocks/code/index.ts
+++ b/libs/components/editor-blocks/src/blocks/code/index.ts
@@ -1,21 +1,21 @@
+import { Protocol } from '@toeverything/datasource/db-service';
import {
- BaseView,
AsyncBlock,
+ BaseView,
BlockEditor,
HTML2BlockResult,
} from '@toeverything/framework/virgo';
-import { Protocol } from '@toeverything/datasource/db-service';
-import { CodeView } from './CodeView';
import {
Block2HtmlProps,
commonBlock2HtmlContent,
commonHTML2block,
} from '../../utils/commonBlockClip';
+import { CodeView } from './CodeView';
export class CodeBlock extends BaseView {
type = Protocol.Block.Type.code;
public override selectable = true;
- public override editable = false;
+ public override editable = true;
// View = CodeView;
View = CodeView;
override async onCreate(block: AsyncBlock): Promise<AsyncBlock> {