RichTextArea problems

Hi people.
I have some problems with RichTextArea (I use vaadin 8):

  1. How to wrap text?

  2. How to make height change depending on its content?

  3. How tom hide its toolbar?

Reply ASAP, please.

How to wrap text?

It does that by default

How to make height change depending on its content?

Set the height undefined, and some defined width in order to let it behave nicely

How tom hide its toolbar?

rte.setReadOnly(true)

Tatu Lund:

How to wrap text?

It does that by default

How to make height change depending on its content?

Set the height undefined, and some defined width in order to let it behave nicely

How tom hide its toolbar?

rte.setReadOnly(true)

  1. Sorry, but wrap text doesn’t work.

  2. it doesn’t help either. it shows scroll but i don’t want scroll i need its height to increase dynamically.

I don’t understand the people who click dislike on post.

If you think that the question is so stupid so reply to it!

Unfortunately, we can’t see who disliked our posts.

Tatu Lund:

How to wrap text?

It does that by default

How to make height change depending on its content?

Set the height undefined, and some defined width in order to let it behave nicely

How tom hide its toolbar?

rte.setReadOnly(true)

I want to say that i want make richtextarea height autosize and remove vertical scroll.

If you just do something like this, you should get as a result RichTextArea without toolbar (since it is now in read only mode). By default scroll bar is not appearing in read only mode (unlike edit mode). And since we have set only the width, the height will depend on length of the text

RichTextArea area = new RichTextArea();
area.setValue("Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?");
area.setReadOnly(true);
area.setWidth("400px");

Tatu Lund:
If you just do something like this, you should get as a result RichTextArea without toolbar (since it is now in read only mode). By default scroll bar is not appearing in read only mode (unlike edit mode). And since we have set only the width, the height will depend on length of the text

RichTextArea area = new RichTextArea();
area.setValue("Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?");
area.setReadOnly(true);
area.setWidth("400px");

Thanks u for reply.

But i also need it in setReadOnly(false) while typing text.