Using PrimeFaces 3.0.M2
How can I set a value of the p:editor using javascript?
Thanks,
Koen
How to set p:editor value using javascript
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Maybe you can get the editor instance with:
widget.editor and set the value via CLEditor API?
widget.editor and set the value via CLEditor API?
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
- bruno.neves
- Posts: 22
- Joined: 15 Jul 2010, 14:03
I'm having the same problem, did anybody would have done??
Primefaces 3.4.2
Mojarra 2.1.7
Glassfish 3.1.2
Netbeans 7.1.1
Mojarra 2.1.7
Glassfish 3.1.2
Netbeans 7.1.1
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
CLEditor doesn't seem to support this so I think we need to extend this, create an issue if you like.
- bruno.neves
- Posts: 22
- Joined: 15 Jul 2010, 14:03
I managed to solve this way:
But I think that create a issue would be better, then I'll do it!
Code: Select all
widgetVarEditor.editor.focus();
setTimeout(function() {
widgetVarEditor.editor.execCommand('inserthtml', 'TEXT', false);
}, 0);
return false;
Primefaces 3.4.2
Mojarra 2.1.7
Glassfish 3.1.2
Netbeans 7.1.1
Mojarra 2.1.7
Glassfish 3.1.2
Netbeans 7.1.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 65 guests