mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 20:16:26 +08:00
fix: can't add image and delete more action button (#430)
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { useState } from 'react';
|
||||
|
||||
import { CustomText, TextProps } from '@toeverything/components/common';
|
||||
import {
|
||||
BlockPendantProvider,
|
||||
@@ -11,9 +9,11 @@ import {
|
||||
import { styled } from '@toeverything/components/ui';
|
||||
import { Protocol } from '@toeverything/datasource/db-service';
|
||||
import { CreateView } from '@toeverything/framework/virgo';
|
||||
import { useState } from 'react';
|
||||
import { BlockContainer } from '../../components/BlockContainer';
|
||||
import { TextManage } from '../../components/text-manage';
|
||||
import { dedentBlock, tabBlock } from '../../utils/indent';
|
||||
|
||||
interface CreateTextView extends CreateView {
|
||||
// TODO: need to optimize
|
||||
containerClassName?: string;
|
||||
@@ -247,6 +247,9 @@ export const TextView = ({
|
||||
await block.setProperty('text', {
|
||||
value: options?.['text'] as CustomText[],
|
||||
});
|
||||
setTimeout(async () => {
|
||||
await editor.selectionManager.activeNodeByNodeId(block.id);
|
||||
}, 100);
|
||||
block.firstCreateFlag = true;
|
||||
};
|
||||
const onTab: TextProps['handleTab'] = async ({ isShiftKey }) => {
|
||||
|
||||
Reference in New Issue
Block a user