tr_p
(tr p)
April 29, 2011, 4:28pm
1
Hello,
Im using a HTML Input - WYSIWYG control. I want to show on a view the text I’m typing down in this control.
I’ve found a way of doing it:
create a blockPanel and then use javascript to fill in the blockpanel with the text found inside the HTML input, the script is as follows:
$(‘#{activePageBean.clientIds[‘BLOCKPANEL’]}’).innerHTML = ‘#{view.text}’;
The problem I’m having is that this works correctly only if there is no change line (enter key pressed) inside the HTML input.
Any ideias of a different way of showing html text?
tr_p
(tr p)
April 29, 2011, 4:31pm
2
I’ve already tried using a Formated text control but it does not preserves HTML tags… the message is shown like this:
Mensagem4
Instead of showing Mensagem4 in red.
system
(system)
May 3, 2011, 12:03am
3
What happens when the user clicks the enter button?
system
(system)
May 3, 2011, 12:15am
4
You can use the Output Text control to render your html markup value. Just set the ‘Escape’ property to false so it doesn’t encode all of your html tags.
tr_p
(tr p)
May 3, 2011, 3:46pm
5
Thank you Eric. That worked just fine