fix(code):better experience

This commit is contained in:
tzhangchi
2022-09-08 14:10:03 +08:00
parent dfb7d8571f
commit 917b4b64f4

View File

@@ -1,21 +1,21 @@
import { Protocol } from '@toeverything/datasource/db-service';
import { import {
BaseView,
AsyncBlock, AsyncBlock,
BaseView,
BlockEditor, BlockEditor,
HTML2BlockResult, HTML2BlockResult,
} from '@toeverything/framework/virgo'; } from '@toeverything/framework/virgo';
import { Protocol } from '@toeverything/datasource/db-service';
import { CodeView } from './CodeView';
import { import {
Block2HtmlProps, Block2HtmlProps,
commonBlock2HtmlContent, commonBlock2HtmlContent,
commonHTML2block, commonHTML2block,
} from '../../utils/commonBlockClip'; } from '../../utils/commonBlockClip';
import { CodeView } from './CodeView';
export class CodeBlock extends BaseView { export class CodeBlock extends BaseView {
type = Protocol.Block.Type.code; type = Protocol.Block.Type.code;
public override selectable = true; public override selectable = true;
public override editable = false; public override editable = true;
// View = CodeView; // View = CodeView;
View = CodeView; View = CodeView;
override async onCreate(block: AsyncBlock): Promise<AsyncBlock> { override async onCreate(block: AsyncBlock): Promise<AsyncBlock> {