p:editor and execCommand

UI Components for JSF
Post Reply
jterstiege
Posts: 2
Joined: 02 Feb 2011, 18:19

02 Feb 2011, 18:33

Hi,

is there a way to call execCommand (as supported by the original cleditor) on the Primefaces p:editor?

What I'm trying to achieve is either:

a) replace the currently selected text with another text or
b) insert a new text at the current cursor position

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

02 Feb 2011, 18:50

Client side api of cleditor is at;

http://premiumsoftware.net/cleditor/doc ... arted.html

There is execCommand there, maybe it will help.

widgetVar.editor will give you cleditor instance.

jterstiege
Posts: 2
Joined: 02 Feb 2011, 18:19

03 Feb 2011, 10:39

Thanks, it's working fine now.

crazy.8
Posts: 13
Joined: 18 Feb 2011, 18:37

19 May 2011, 21:26

I am trying to append something to the editor using execCommand but I can't seem to find the command for this action. on the MCETiny editor the command is execCommand(mceInsertContect, false, dataToAppend) how can i do this with the editor in prime?

andrerip
Posts: 5
Joined: 21 Oct 2011, 18:19

28 Oct 2011, 18:57

Thanks optimus.prime! It helped me a lot...
Using Primefaces 3.4.2
JSF 2.1
JBoss Server 7.1.2

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests