File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { updateBlockTr } from "../../api/blockManipulation/commands/updateBlock/updateBlock.js" ;
2
2
import { getBlockInfoFromTransaction } from "../../api/getBlockInfoFromPos.js" ;
3
+ import { defaultProps } from "../../blocks/defaultProps.js" ;
3
4
import { createToggleWrapper } from "../../blocks/ToggleWrapper/createToggleWrapper.js" ;
4
5
import {
5
6
createBlockConfig ,
@@ -24,6 +25,7 @@ const config = createBlockConfig(
24
25
} : HeadingOptions = { } ) => ( {
25
26
type : "heading" as const ,
26
27
propSchema : {
28
+ ...defaultProps ,
27
29
level : { default : defaultLevel , values : levels } ,
28
30
...( allowToggleHeadings ? { isToggleable : { default : false } } : { } ) ,
29
31
} ,
Original file line number Diff line number Diff line change @@ -33,9 +33,10 @@ export function editorHasBlockWithType<
33
33
any ,
34
34
any
35
35
> {
36
- if ( ! editorHasBlockWithType ( editor , blockType ) ) {
36
+ if ( ! ( blockType in editor . schema . blockSpecs ) ) {
37
37
return false ;
38
38
}
39
+
39
40
if ( ! props ) {
40
41
return true ;
41
42
}
You can’t perform that action at this time.
0 commit comments