Print

Adds a Print toolbar button that opens the browser print dialog with the current editor content.

Content is rendered in a hidden iframe via the preview module. Optional extra CSS can be injected for print layout.

Load the bundle

<script src="/assets/redactor/redactor.js"></script>
<script src="/assets/redactor/plugins/print/print.js"></script>

Initialization

const app = Redactor('#entry', {
    plugins: ['print']
});

Options

  • css (string | false)
    • default false
    • Extra CSS injected into the print iframe (for example a path to a print stylesheet).
  • icon (string)
    • SVG icon HTML for the toolbar button.
Redactor('#entry', {
    plugins: ['print'],
    print: {
        css: '/assets/print.css'
    }
});

Language strings

en: {
    print: {
        print: 'Print'
    }
}

Events

This plugin does not emit events.

API

print

Opens the browser print dialog for the current editor content.

app.print.print();