Directory

← Back

RichTextToolbar

A server side widget for the toolbar of a RichTextArea

Author

Rating

This Add-on is intended as a drop-in replacement for the RichTextArea by Vaadin. Most of it is just a copy of the original.

Added functionality so far:

  • server side widget for the toolbar, which allows to place it decoupled from the text area. It is possible to attach multiple text areas to one toolbar.
  • set the height to grow and shrink with the text
  • i18n through sass variable
  • more styling of toolbar through css
  • styling content of area with css

See README for styling and I18n description

Sample code

VerticalLayout layout = new VerticalLayout();
RichTextToolbar rtt = new RichTextToolbar();
RichTextArea rta1 = new RichTextArea();
RichTextArea rta2 = new RichTextArea();
layout.addComponent(rtt);
layout.addComponent(rta1);
layout.addComponent(rta2);
rta1.setToolbar(rtt);
rta2.setToolbar(rtt);
public class DemoUI extends UI {

    @Override
    protected void init(VaadinRequest request) {
        final VerticalLayout layout = new VerticalLayout();
        RichTextToolbar rtt = new RichTextToolbar();
        rtt.setSingleLinePanel(true); // only one row of buttons and selects
        rta.setAutoGrowHeight(true); // start small and grow/shrink with text
        layout.addComponent(rtt);
        layout.addComponent(rta);
        rta.setToolbar(rtt);
        setContent(layout);
    }
}

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Firefox 49+ has Problems with styling of select options. To make the color select usable again under Firefox the color names are set as text for the options. To allow i18n it is possible to set the names for the six colors.

Released
2017-04-26
Maturity
BETA
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.4+
Vaadin 7.5 in 1.5.0
Vaadin 7.4 in 1.5.0
Vaadin 7.3 in 1.3.0
Vaadin 7.3+ in 1.2.1
Vaadin 7.0+ in 0.7.4
Vaadin 6.8 in 0.1.0
Browser
Internet Explorer
Firefox
Opera
Google Chrome
Internet Explorer
Internet Explorer

RichTextToolbar - Vaadin Add-on Directory

A server side widget for the toolbar of a RichTextArea RichTextToolbar - Vaadin Add-on Directory
This Add-on is intended as a drop-in replacement for the RichTextArea by Vaadin. Most of it is just a copy of the original. Added functionality so far: - server side widget for the toolbar, which allows to place it decoupled from the text area. It is possible to attach multiple text areas to one toolbar. - set the height to grow and shrink with the text - i18n through sass variable - more styling of toolbar through css - styling content of area with css See README for styling and I18n description
Online