Copy&Paste code from forum


I use the Vaadin forum very often - it is a great source for information and helpfull hints!

I’m just a litte bit bothered by the code formatting.

It looks good, but when I copy&paste code from a posting then I get
single line which also contains the line numbers. So I have to reformat this line of code manually to get proper code.

Does anyone have an idea how to do this better?

Thanks, Thorsten

You can check out
this post
for one tool that makes it easier.

You could try a Vaadin app on Uilder that parses all code blocks from a single forum thread:
code copy

Ha, once again Henri beat me to it :slight_smile:

Nice! Did not see that post before…
Thanks, Thorsten

I use a little different hack. I click ‘reply with quote’ on the message that contains the code. When I get to the “Add message” window, the Body part has the post in it with the unformatted code snippet, which is easy to copy and paste.

Much better! Thanks for the hint!

Due to increasing Vaadin popularity I think it would be a good idea to implement a better code view in the forum software…

101% agreed. Added this to our backlog.