Overwrite name to prevent breakages

This commit is contained in:
Austin Chen 2022-09-15 17:12:36 -07:00
parent b85b0f80c6
commit e1350c084d

View File

@ -31,6 +31,7 @@ const ContractMentionComponent = (props: any) => {
* https://tiptap.dev/guide/node-views/react#render-a-react-component
*/
export const DisplayContractMention = Mention.extend({
name: 'contract-mention',
parseHTML: () => [{ tag: name }],
renderHTML: ({ HTMLAttributes }) => [name, mergeAttributes(HTMLAttributes)],
addNodeView: () =>