Problem getting focus on cftextarea in an iframe. Page greys out when any toolbar item is selected.
<cfTEXTAREA richtext=true skin="moono" toolbar="Basic" WRAP=PHYSICAL ID="FormsMultiLine1" style="font-family : Tahoma, times new roman; font-size : 9pt" NAME="copy" height="200" width="550">#copy#</cfTEXTAREA></TD>
There can be various explanations. First, is this a new problem? If so, what changed? Or are you trying it for the first time? If so, what CF version? and what update is applied?
I've been using this following cftextarea tag with CF11: <cftextarea richtext="yes" skin="silver" toolbar="Basic" .....
This does NOT load in CF2018. I was advised to use: <cftextarea richtext=true skin="moono" toolbar="Basic" ...
However, this tag does not function in a framed web page.
Surely, you have had other users with this problem and have alternative text editors?
If so, please advise.
I appreciate that you may be getting frustrated about all this, RaehmLeonard, and I see you've offered two replies since my last one. But let's take things one step at a time. I'm pretty sure we'll get you to a solution.
First, yes, people DO use those tags, but things DO change from one release to another. That's why I sought clarification first on when this HAD worked for you (if at all). But then I also asked something very specific, which you did not answer. I will try again:
It's ok if you are not familiar with such tools. Just say so. But if you are, did you try it? The reason I ask is that it may have indicated a particular common problem.
As you may know, there are in fact some features deprecated (and still others "retired") in CF2018. They are listed at https://helpx.adobe.com/coldfusion/deprecated-features.html, and while cftextarea is not listed as one of them, I'm willing to bet that's a mistake and that it is. Let me explain.
If you DO see errors in your dev tools, especially 404's related to calls back CF, then you are hitting the problem that is listed at the bottom of that page. And you can follow the advice offered there, to add the yui library back to CF.
If that fixes your problem, great. Let us know, and we (or you) can get word to Adobe to update that page to mention CFTEXTAREA also. And to your last comment, we could get them also to add to that doc page on the tag itself to clarify that it's deprecated in 2018 (as was done for the pages for related things affected by this, like cfcalendar, cftree, and cfmenu.
BTW, even being marked "deprecated" or "retired" that doesn't mean one CAN'T use the feature. As explained on that page, deprecated means "no longer updated" which means most should not continue using, or should be seeking alternatives. And retired means not working by default--so in this case requiring that re-adding in of the YUI library.
That's why people would indeed have problems with this out of the box. So yes, "surely we have had users with this problem", and yes some have turned to "seeking alternative [embeddable web] text editors".
But since you're asking about getting CFTextarea working, that's what I have been focused on. I'd love to hear whether the above has helped, and if not, again what you see in the dev tools in the network and/or console tabs. The diagnostics to solve your problem may well be right there. Let us know what you find.
No, I am not familiar with "development tools".
To clarify, the "moono" skin tag works fine with CF 2018 on a plain html page, but not a iframed page.
So I believe this is really a focus issue. That is, setting focus to the frame containing the cftextarea tag.
If you can assist on that subject, great. If not, I'm still looking for alternate skin to try. If you know of any, please advise.
But this is really just a guess. We'd need to see a lot more of what's going on than your CFTEXTAREA tag. You might need to actually post all or most of the main page and the iframe for anyone to figure it out.
Alternatively, you can use the developer tools within your browser to see whether you're getting errors loading the CFTEXTAREA as Charlie suggested. Search on "chrome dev tools tutorial" for a quick start on how to do that. You could then post the specific JS errors you see there, if any. Even then, though, we'd probably need a little more information to come to a solution.
Dave Watts, Eidolon LLC
Adding to Dave's great reply, I'll note as well that such dev tools are in ALL browsers, not just Chrome. I know DAVE knows that: I'm saying this for the sake of the OP, since Dave mentioned searching for "Chrome dev tools tutorial". They're also available in Firefox, IE, Edge, Opera, Safari, and others.
And some good news is that they work about the same in all, so yes, whatever tutorial you may find could help you understand what the tools are about. And they're really quite easy to use, generally.
And the best news is that such tools really are excellent for solving problems like this one (and so many others), where otherwise we as devs would be left simply trying to write code, save it, view it, and hope we see solve the problem we have. That's like throwing darts at the wall trying to pop a baloon to win a prize...when instead the dev tools are like having spy glasses which let you see inside the baloon to know which to pop. 🙂
But sure, if all else fails, you may want to just try some other rich text editor. That could seem overkill to solve just this problem, but again an argument could be made that it's the better long-term solution given Adobe's deprecation/retirement of UI-oriented tags. And I'll note that I have a category of such rich text editors on my cf411.com site, specifically at http://www.cf411.com/richtexted.
Hope that's helpful.
1. Thanks for your feedback. Wish I had the time to review your post on focusing (https://www.carehart.org/articles/#2002_1b.), but I don't. My general understanding is that there is script for the parent and script for the targeted iframe. Can you simply provide me with those code snippets.
2. And this is NOT a browser issue, as the code works fine on a clean cfm page with no iframes or templates.
3. Also, as I am managing over 80 sites from my CF server, I don't need to pay for a third-party solution when CF should be providing a working solution(s).
4. Oddly, I found no references to this issue anywhere in your support community. Surely, someone other than myself has encountered this issue when migrating from CF11 to CF 2018.
5. I'm still primarly looking for other working solutions other than 'cfTEXTAREA richtext=true
6. Who is the CF developer that dropped the cftextarea code that worked in CF11?
Browsers treat code in iframes differently. So, I strongly suspect that it is a browser issue, in that your browser is blocking the loading of some JS library used by CFTEXTAREA.
Instead of asking Charlie to post code snippets - which I don't think would help in this case - can you post code snippets yourself? Just something that has a minimal non-working case. Then, someone on here can try to run it and see what kind of errors come up.
Finally, this is a community forum where CF users participate, rather than an official Adobe support forum. So it's unlikely that anyone will know what developer changed what code.
I hope this helps!
Dave Watts, Eidolon LLC
^^^ This ^^^