- Installation Guides
- Browser Support
- Languages Support
- Shortcuts
- Activation
- Examples
- Customize the Editor
- Use-cases
- Plugins
- APIs
- Development Frameworks
- Server Integrations
- Server SDKs
- Migration Guides
- Changelog
- Tutorials
- Froala Docs
- /
- Plugins
- /
- Paint Format Plugin
Paint Format Plugin
Plugins are fully functional during your trial once you've added your trial key to the setup.
Copy the look of one piece of text and apply it to another. Users place the caret in formatted text, click Paint Formatting, then click a word or drag across text.
How it works:
- Place the caret inside text that has the formatting you like.
- Click the Paint Formatting button, or press
Ctrl+Alt+C. - Click a word or drag across text. The copied formatting lands there as one undo step.
Painting replaces the target’s inline formatting with the copied formatting. Painting from plain text clears the target’s inline formatting, which makes it a quick way to reset a phrase.
What gets copied
- Bold, italic, underline, strikethrough, subscript and superscript
- Font family and font size
- Text colour and background colour (highlight)
- Inline Style properties and Inline Class classes
- Current limit: In v5.6.0, painting works on text. When the selection is a range of table cells, the content stays as it is, the editor announces “Can’t paint selected cells” and paint mode stays on, so users can select text instead.
Add Plugin to your code:
Plugin name: paintFormat
Plugin JS Script: ../js/plugins/paint_format.min.js
Or from CDN https://cdn.jsdelivr.net/npm/froala-editor@latest/js/plugins/paint_format.min.js
Plugin CSS link: ../css/plugins/paint_format.min.css
Or from CDN https://cdn.jsdelivr.net/npm/froala-editor@latest/css/plugins/paint_format.min.css
Keyboard shortcuts
| Action | Windows and Linux | macOS |
|---|---|---|
| Turn paint mode on | Ctrl+Alt+C | Control+Option+C |
| Paint the selected text (press again while paint mode is on) | Ctrl+Alt+C | Control+Option+C |
| Turn paint mode off from an empty caret (press again while paint mode is on) | Ctrl+Alt+C | Control+Option+C |
| Turn paint mode off | Esc | Esc |
macOS uses Control+Option+C because the browser reserves ⌘+⌥+C for its developer tools. One Undo reverts a whole paint.
Toolbar buttons
Paint Formatting ["paintFormat"]
The button sits right before Clear Formatting in the default toolbar. The arrow beside it opens the Continuous painting switch.