How to insert a text into a p:editor?

Asked

Viewed 345 times

1

I have a <p:editor /> and need to insert predefined text at the current cursor position.

I’ve been looking in the documentation of Primefaces and found nothing similar (I can clean using PF('editor').clear() but I couldn’t find anything to insert text)

1 answer

0


I got the answer on the Primefaces forum post

PF('edt').editor.execCommand('inserthtml','texto inserido');

Browser other questions tagged

You are not signed in. Login or sign up in order to post.