File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
common/changes/@coze-editor/react-components
packages/text-editor/react-components/src/placeholder Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "changes" : [
3
+ {
4
+ "packageName" : " @coze-editor/react-components" ,
5
+ "comment" : " fix TypeScript type" ,
6
+ "type" : " patch"
7
+ }
8
+ ],
9
+ "packageName" : " @coze-editor/react-components" ,
10
+
11
+ }
Original file line number Diff line number Diff line change 2
2
// SPDX-License-Identifier: MIT
3
3
4
4
import { createPortal } from 'react-dom' ;
5
- import { type ReactNode } from 'react' ;
5
+ import { type ReactPortal , type ReactNode } from 'react' ;
6
6
7
7
import { useHTMLElement , useInjectorEffect } from '@coze-editor/react-hooks' ;
8
8
import {
9
9
placeholder ,
10
10
activeLinePlaceholder ,
11
11
} from '@coze-editor/extension-placeholder' ;
12
12
13
- function Placeholder ( { children } : { children ?: ReactNode } ) : ReactNode {
13
+ function Placeholder ( { children } : { children ?: ReactNode } ) : ReactPortal {
14
14
const element = useHTMLElement ( 'span' ) ;
15
15
16
16
useInjectorEffect (
@@ -27,7 +27,7 @@ interface ActiveLinePlaceholderProps {
27
27
28
28
function ActiveLinePlaceholder ( {
29
29
children,
30
- } : ActiveLinePlaceholderProps ) : ReactNode {
30
+ } : ActiveLinePlaceholderProps ) : ReactPortal {
31
31
const element = useHTMLElement ( 'span' ) ;
32
32
33
33
useInjectorEffect (
You can’t perform that action at this time.
0 commit comments