If you are unwilling to use jQuery for this, here is a piece of code that will get the job done assuming you have just this one CFTEXTAREA field in your DOM.
function insertHTML(strText){
for ( name in FCKeditorAPI.__Instances ) {
oEditor = FCKeditorAPI.__Instances[ name ];
oEditor.InsertHtml(strText);
}
}
Simply call this function when want to insert some html to the rich text editor.
Kier Simmons
Manager of Application Development
[cid:[email protected]]<http://www.giveblood.org/>
Phone:
713-791-6619
Toll Free:
1-888-482-5663
Fax:
713-791-6681
www.giveblood.org<http://www.giveblood.org>
P Please consider the environment before printing this e-mail.
From: [email protected] [mailto:[email protected]] On Behalf Of
jhusum
Sent: Friday, June 22, 2012 8:19 AM
To: [email protected]
Subject: Re: [houcfug] CFTextarea and javascript problem
Greetings,
I had tried that and added an ID attribute to the CFtextarea tag but the one
that is generated by CF overrode it.
Thanks.
On Friday, June 22, 2012 8:00:24 AM UTC-5, Seth Bienek wrote:
Provide an ID attribute in the CFTEXTAREA tag?
Seth
On Jun 22, 2012 7:08 AM, "James Husum" wrote:
Greetings,
My users want to be able to keep a small library of pre-written text that they
can insert into a textarea on a form. I've got the pieces of text stored in the
database. I have the javascript worked out so they can open a new window with
the lists of text, select the piece of text from the list, then automagically
insert it into the text box. Here comes the tricky bit.
The users also want to have a WYSIWYG editor on the text box so they can format
the text. This is easy enough to do if I use the built in CF features and use
the CFtextarea tag. However, CF generates a random ID attribute each time you
load the page, which makes it difficult to have a constant ID to refer to from
the other javascript that fills in the form.
Anyone got any bright ideas on how to get around this?
--
James Husum
The Quixote Project - one guy's quest to make the world a better place -
http://www.thequixoteproject.org/
Brainsludge - all the shtuff running around my brain -
http://www.brainsludge.com/
Currently reading: The Chessmen of Mars by Edgar Rice Burroughs
--
You received this message because you are subscribed to the "Houston ColdFusion
Users' Group" discussion list.
To unsubscribe, send email to
[email protected]<mailto:[email protected]>
For more options, visit http://groups.google.com/group/houcfug?hl=en
--
You received this message because you are subscribed to the "Houston ColdFusion
Users' Group" discussion list.
To unsubscribe, send email to
[email protected]<mailto:[email protected]>
For more options, visit http://groups.google.com/group/houcfug?hl=en
--
You received this message because you are subscribed to the "Houston ColdFusion
Users' Group" discussion list.
To unsubscribe, send email to [email protected]
For more options, visit http://groups.google.com/group/houcfug?hl=en
<<inline: image001.gif>>
