diff --git a/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js b/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js index 7533870f387cd665be3e490abbed1f828957aff7..bbe93cd9739245d7fe1ea2af849fde15051246ee 100644 --- a/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js +++ b/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js @@ -87,7 +87,16 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => { item.run(state, dispatch, val.replace(/ /g, '-')); }; - console.log(allTags); + const renderTagList = () => { + const tagList = []; + const blockTags = allTags.filter(tag => { + return tag.tagType === 'block'; + }); + blockTags.forEach(blockTag => { + tagList.push(<span key={uuidv4()}>{blockTag.label}</span>); + }); + return <div>{tagList}</div>; + }; return useMemo( () => ( @@ -103,6 +112,7 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => { <Add onClick={onClickAdd}>Add</Add> </FlexDiv> )} + {renderTagList()} </Wrapper> ), [isShowTag, inputValue],