Bigger richtext window
This commit is contained in:
@@ -6,7 +6,6 @@ import { PhArrowUDownRight, PhArrowUUpLeft, PhListBullets, PhListNumbers, PhQuot
|
|||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
disableInlines?: boolean
|
disableInlines?: boolean
|
||||||
disableBlocks?: boolean
|
disableBlocks?: boolean
|
||||||
disableControls?: boolean
|
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const model = defineModel<any>()
|
const model = defineModel<any>()
|
||||||
@@ -58,19 +57,10 @@ function clearFormatting() {
|
|||||||
@click.prevent="editor.chain().focus().toggleStrike().run()"
|
@click.prevent="editor.chain().focus().toggleStrike().run()"
|
||||||
:disabled="!editor.can().chain().focus().toggleStrike().run()"
|
:disabled="!editor.can().chain().focus().toggleStrike().run()"
|
||||||
:variant="editor.isActive('strike') ? 'default' : 'secondary'"
|
:variant="editor.isActive('strike') ? 'default' : 'secondary'"
|
||||||
class="size-7 rounded-none"
|
|
||||||
size="icon"
|
|
||||||
>
|
|
||||||
<PhTextStrikethrough weight="bold" />
|
|
||||||
</UiButton>
|
|
||||||
|
|
||||||
<UiButton
|
|
||||||
@click.prevent="clearFormatting"
|
|
||||||
variant="secondary"
|
|
||||||
class="size-7 rounded-s-none"
|
class="size-7 rounded-s-none"
|
||||||
size="icon"
|
size="icon"
|
||||||
>
|
>
|
||||||
<PhTextTSlash weight="bold" />
|
<PhTextStrikethrough weight="bold" />
|
||||||
</UiButton>
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -104,12 +94,21 @@ function clearFormatting() {
|
|||||||
</UiButton>
|
</UiButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex" v-if="!props.disableControls">
|
<div class="flex">
|
||||||
|
<UiButton
|
||||||
|
@click.prevent="clearFormatting"
|
||||||
|
variant="secondary"
|
||||||
|
class="size-7 rounded-e-none"
|
||||||
|
size="icon"
|
||||||
|
>
|
||||||
|
<PhTextTSlash weight="bold" />
|
||||||
|
</UiButton>
|
||||||
|
|
||||||
<UiButton
|
<UiButton
|
||||||
@click.prevent="editor.chain().focus().undo().run()"
|
@click.prevent="editor.chain().focus().undo().run()"
|
||||||
:disabled="!editor.can().chain().focus().undo().run()"
|
:disabled="!editor.can().chain().focus().undo().run()"
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
class="size-7 rounded-e-none"
|
class="size-7 rounded-none"
|
||||||
size="icon"
|
size="icon"
|
||||||
>
|
>
|
||||||
<PhArrowUUpLeft weight="bold" />
|
<PhArrowUUpLeft weight="bold" />
|
||||||
@@ -234,6 +233,9 @@ function clearFormatting() {
|
|||||||
/* Basic editor styles */
|
/* Basic editor styles */
|
||||||
.tiptap {
|
.tiptap {
|
||||||
padding-block: 0.75rem;
|
padding-block: 0.75rem;
|
||||||
|
min-height: 7rem;
|
||||||
|
max-height: 12rem;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
:first-child {
|
:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user