Greetings,
That did the trick. Ajas, you ROCK!
Thanks for the help.
On Friday, June 22, 2012 8:41:19 AM UTC-5, Ajas Mohammed wrote:
>
> James,
>
> Welcome to the club of CFTEXTAREA richtext="true" features & How to
> issues. I had to do accomplish something like this but in our case we had a
> link on same page as the rich text box.
>
> This is how I did it and I will blog about it soon. Even though it looks
> simple, I literally spent 4 nights thinking about the solution. To top it
> off, my co worker had already given up saying cant get ID as it changes
> dynamically every time, which made sense to me. I wanted to give one last
> try and luckily ( I mean it) I stumbled across new CF 9/10 javascript
> functions for Ajax controls. In this case
> ColdFusion.RichText.getEditorObject. So part1 was done, now to
> insertText, I read docs about fckEditor and they had InsertHtml function.
> Problem solved. :-)
>
> <script type="text/javascript">
> function fnInsertText (variableName)
> {
> var richtextEditor =
> ColdFusion.RichText.getEditorObject('letterVerbiage');
> richtextEditor.InsertHtml(variableName);
> }
> </script>
>
> and in the same page, we have this link <a href="##"
> onclick="fnInsertText('#variableNameUpper#');">#variableNameUpper#</a><br>
>
> HTH.
>
> (off topic, I wish I could attend the meetings).
>
> <Ajas Mohammed />
> iUseDropbox(http://db.tt/63Lvone9)
> http://ajashadi.blogspot.com
> We cannot become what we need to be, remaining what we are.
> No matter what, find a way. Because thats what winners do.
> You can't improve what you don't measure.
> Quality is never an accident; it is always the result of high intention,
> sincere effort, intelligent direction and skillful execution; it represents
> the wise choice of many alternatives.
>
>
>
> On Fri, Jun 22, 2012 at 9:00 AM, 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]
>>> 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
>>
>
>
--
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