Text Editor - Blockquote
Wrap the current block in a blockquote with the blockquote command and pressed state.
#Usage
import { TextEditor } from '@primeui/vue-texteditor';<TextEditor.Root v-model="value">
<TextEditor.Toolbar>
<BlockquoteButton />
</TextEditor.Toolbar>
<TextEditor.Content />
</TextEditor.Root>A blockquote sets apart a quotation or callout. A toolbar toggle button invokes commands.blockquote() and reflects pressed state with state.blockquote, both from useTextEditorContext().
#Command
commands.blockquote() toggles the blockquote wrapping on the current block; calling it again on an active blockquote removes the wrapping.
<!-- BlockquoteButton.vue -->
<script setup lang="ts">
import { useTextEditorContext } from '@primeui/vue-texteditor';
const { commands, state } = useTextEditorContext();
</script>
<template>
<button @click="commands.blockquote()" :aria-pressed="state.blockquote">Quote</button>
</template>#Example
Loading Demo...
#API
commands.blockquote() and state.blockquote come from useTextEditorContext(). See API for the full reference.