feat: add bold and italic buttons to editor (#1469)

This commit is contained in:
victordelva 2023-02-05 17:11:09 +01:00 committed by GitHub
parent 7380e243c4
commit b7a3e93097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 61 additions and 14 deletions

View file

@ -268,18 +268,7 @@ defineExpose({
</button>
</CommonTooltip>
<template v-if="editor">
<CommonTooltip placement="top" :content="$t('tooltip.toggle_code_block')">
<button
btn-action-icon
:aria-label="$t('tooltip.toggle_code_block')"
:class="editor.isActive('codeBlock') ? 'text-primary' : ''"
@click="editor?.chain().focus().toggleCodeBlock().run()"
>
<div i-ri:code-s-slash-line />
</button>
</CommonTooltip>
</template>
<PublishEditorTools v-if="editor" :editor="editor" />
<div flex-auto />