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 11import { updateBlockTr } from "../../api/blockManipulation/commands/updateBlock/updateBlock.js" ;
22import { getBlockInfoFromTransaction } from "../../api/getBlockInfoFromPos.js" ;
3+ import { defaultProps } from "../../blocks/defaultProps.js" ;
34import { createToggleWrapper } from "../../blocks/ToggleWrapper/createToggleWrapper.js" ;
45import {
56 createBlockConfig ,
@@ -24,6 +25,7 @@ const config = createBlockConfig(
2425 } : HeadingOptions = { } ) => ( {
2526 type : "heading" as const ,
2627 propSchema : {
28+ ...defaultProps ,
2729 level : { default : defaultLevel , values : levels } ,
2830 ...( allowToggleHeadings ? { isToggleable : { default : false } } : { } ) ,
2931 } ,
Original file line number Diff line number Diff line change @@ -33,9 +33,10 @@ export function editorHasBlockWithType<
3333 any ,
3434 any
3535> {
36- if ( ! editorHasBlockWithType ( editor , blockType ) ) {
36+ if ( ! ( blockType in editor . schema . blockSpecs ) ) {
3737 return false ;
3838 }
39+
3940 if ( ! props ) {
4041 return true ;
4142 }
You can’t perform that action at this time.
0 commit comments