• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ColdFusion 2018 CFTextarea

Explorer ,
Dec 18, 2019 Dec 18, 2019

Copy link to clipboard

Copied

Problem getting focus on cftextarea in an iframe.  Page greys out when any toolbar item is selected.

Please help!

<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>

TOPICS
Documentation

Views

893

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 18, 2019 Dec 18, 2019

Copy link to clipboard

Copied

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?

 

And are you familiar with using browser "dev tools"? If so, does its "network" tab show any failed requests calling back to CF (for javascript files, etc.)? And/or does its "console" tab show javascript errors?


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 19, 2019 Dec 19, 2019

Copy link to clipboard

Copied

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.

Thanks,

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 19, 2019 Dec 19, 2019

Copy link to clipboard

Copied

You need to update this page, as few of the tag options work in CF 2018

 

https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-t/cftextarea.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2019 Dec 19, 2019

Copy link to clipboard

Copied

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:

 

And are you familiar with using browser "dev tools"? If so, does its "network" tab show any failed requests calling back to CF (for javascript files, etc.)? And/or does its "console" tab show javascript errors?

 

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".

 

Indeed, some may soon chime in (perhaps without even reading my comment here) to point out that you SHOULD not be using any CF tags that generate and use javascript, and that CF's support of those has always been "horrible" and "dated", and that "any good developer" should know that they SHOULD in fact be seeking out alternatives to such things as text editors, tree controls, etc. And there are of course many such alternatives, in most of the many available javascript/ajax frameworks out there.

 

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.


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 19, 2019 Dec 19, 2019

Copy link to clipboard

Copied

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.

Thanks,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2019 Dec 19, 2019

Copy link to clipboard

Copied

Normally when we're talking about "focus" in JavaScript, we mean "where the cursor is right now". I don't think that's your problem. I do think it's possible that your browser is refusing to load resources from your main page into your iframe. This isn't really a CF problem. This is your browser trying to protect you from loading potentially dangerous code.

 

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2019 Dec 19, 2019

Copy link to clipboard

Copied

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. 🙂

 

In the meantime, as Dave mentioned, if your focus (no pun intended) really is solely on getting the "focus" into the iframe, are you yourself using the javascript focus method, to tell the browser where to put the focus? If not, that may be all you need...and then an additional challenge is setting that within the iframe specifically. If you're not familiar with the focus method, I wrote about it in an article many years ago, which would still apply. It's available via this link, if interested: https://www.carehart.org/articles/#2002_1b. Again, it's quite easy to use.

 

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.


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 19, 2019 Dec 19, 2019

Copy link to clipboard

Copied

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

skin="moono" '

6. Who is the CF developer that dropped the cftextarea code that worked in CF11?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2019 Dec 19, 2019

Copy link to clipboard

Copied

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.

 

I doubt that other people have run into this issue, because very few people use CFTEXTAREA. You might not want to hear this, and I understand you on that, but the plain fact is that most CF developers avoid CF tags that generate JavaScript. They do this for a reason - browsers and JavaScript are both constantly changing, and those CF tags don't keep up. They're a great introduction to how JS can work in your apps, but they're really not recommended for any serious use. I'm sorry. You don't have to pay for rich text areas necessarily, though, but you would have to spend developer hours adding them to your apps if you can't resolve this issue.

 

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

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2019 Dec 19, 2019

Copy link to clipboard

Copied

LATEST

^^^ This ^^^


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation