I have got a string which consists of textlines. I would like to input these lines into a textarea with some css styles(eg changing the colour of some lines). How can this be done?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
use tinymce editor. http://www.tinymce.com/
or you can use any kind of a Javascript WYSIWYG Editor
Add tinymce to page,
TinyMCE
does do a pretty decent job of rendering CSS and other markup in an editor.To include this easily with Wicket, I suggest the
org.wicketstuff.tinymce-parent
package. The development/source code is in GitHub and the actual releases are in the public maven repository.You can then use a standard Wicket TextArea component and add the TinyMCE behavior to it, instead of messing around with the javascript directly.
The one drawback is that, while TinyMCE is very mature, it also has some obscure bugs. It's best to keep it simple, if at all possible.