Displaying Rich Text in a control similar to a TextBox

asked 2011-02-24 10:37:34 +0800

rcaschultz gravatar image rcaschultz

I am using ZK and am using the inline editor to display forms containing textboxes. In some instances the textbox contains plain text, and in other instances in contains HTML with hyperlinks - but this HTML displays in the text box just as plain text - with all the tags visible.

I want to display the HTML and hyperlinks in a rich manner, rather than as plain text. I could replace all the text boxes with instances of CKEditor, and then they would display properly - but the links are not clickable since the instances of CKeditor are for editing - not for simply displaying.

Is there some form or component that is a rich text box or rich text area that simply displays HTML properly rendered? Or is there some way to configure instances of CKEditor to only render the HTML correctly? I tried setting the ckeditor_config.js to ReadOnly, and it renders properly the HTML properly, but the links are not clickable. When I click a URL it simply shows the properties of the link - and does not execute the link.


delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2011-02-24 12:07:07 +0800

mjablonski gravatar image mjablonski
1284 3 5

Have a look at the HTML component:


Cheers, Maik

link publish delete flag offensive edit

answered 2013-05-24 10:50:12 +0800

abhisekpanda86 gravatar image abhisekpanda86 flag of India
5 2

I am facing the same proble. Any solution?

link publish delete flag offensive edit

answered 2013-05-24 11:16:20 +0800

abhisekpanda86 gravatar image abhisekpanda86 flag of India
5 2

updated 2013-05-24 11:19:31 +0800

This is the code,

<textbox readonly="true" id="txt_comment" value="@load(vm.comment)" rows="3"/>

and in viewmodel class I have below method to get the comment data.

public String getComment() { return "[b]This is a comment[/b]";// to display in the forum I use '[]' instead of html tag. Consider "[b]" as html tag bold. }

I want to display the text in bold. But it is displaying just like normal test with html tag.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2011-02-24 10:37:34 +0800

Seen: 414 times

Last updated: May 24 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More