Text Editor - Print
Open the browser print flow for the editor content with the print command.
#Usage
import { TextEditor } from '@primeui/vue-texteditor';<TextEditor.Root v-model="value">
<TextEditor.Toolbar>
<PrintButton />
</TextEditor.Toolbar>
<TextEditor.Content />
</TextEditor.Root>commands.print() opens the browser's print flow for the current editor content. A toolbar widget calls it from useTextEditorContext(); the command is always available, so the button needs no disabled binding.
#Command
commands.print() hands the editor content to the browser print dialog.
<!-- PrintButton.vue -->
<script setup lang="ts">
import { useTextEditorContext } from '@primeui/vue-texteditor';
const { commands } = useTextEditorContext();
</script>
<template>
<button @click="commands.print()" aria-label="Print">Print</button>
</template>#Example
Loading Demo...
#API
commands.print() comes from useTextEditorContext() and carries no state flag. See API for the full reference.