mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add buttons extension blocks
This commit is contained in:
parent
8965ee67c3
commit
f2c6687660
5 changed files with 241 additions and 4 deletions
|
|
@ -17,6 +17,7 @@ import {
|
|||
FileText,
|
||||
ImagePlus,
|
||||
Lightbulb,
|
||||
MousePointerClick,
|
||||
Sigma,
|
||||
Tag,
|
||||
Tags,
|
||||
|
|
@ -211,16 +212,31 @@ export const ToolbarButtons = ({ editor, props }: any) => {
|
|||
onClick={() => editor.chain().focus().insertContent({
|
||||
type: 'badge',
|
||||
content: [
|
||||
{
|
||||
type: 'text',
|
||||
text: 'This is a Badge'
|
||||
}
|
||||
{
|
||||
type: 'text',
|
||||
text: 'This is a Badge'
|
||||
}
|
||||
]
|
||||
}).run()}
|
||||
>
|
||||
<Tags size={15} />
|
||||
</ToolBtn>
|
||||
</ToolTip>
|
||||
<ToolTip content={'Button'}>
|
||||
<ToolBtn
|
||||
onClick={() => editor.chain().focus().insertContent({
|
||||
type: 'button',
|
||||
content: [
|
||||
{
|
||||
type: 'text',
|
||||
text: 'Click me'
|
||||
}
|
||||
]
|
||||
}).run()}
|
||||
>
|
||||
<MousePointerClick size={15} />
|
||||
</ToolBtn>
|
||||
</ToolTip>
|
||||
</ToolButtonsWrapper>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue