Skip to main content
Imidi
Inspiring
April 2, 2022
Question

Coldfusion 21. Output cftextarea value of a formated text within a variable

  • April 2, 2022
  • 1 reply
  • 120 views
Uff! Another problem with cftexarea in Coldfusion 21,
The following code:

<cfparam name="comment" default="<h3 style=""text-align:center; color:red"">Is it normal?</h1>">

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<title>Untitled Document</title>
</head>

<body>
<cfform method="post" name="myForm" id="myForm" preservedata="yes">
 <cftextarea name="raspuns" cols="90" rows="8" class="style16" id="raspuns"  value="#comment#" richtext="true" toolbar="Basic" html="yes"></cftextarea>
  </cfform>
</body>
</html>

The output in Coldfusion 10 is like in picture 1, and  in Coldfusion 21, like in picture 2.
The output should be as in Figure 1: red and middle!
Thank you for help!
    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    April 5, 2022

    Testing your code on https://trycf.com with CF10. CF11, CF2016, CF2018 and CF2021, I also obtained inconsistent results across the CF versions. I have therefore opened a bug ticket: https://tracker.adobe.com/#/view/CF-4212987 

     

    In any case, the general advice in the ColdFusion community is that you should avoid ColdFusion's UIs, and use alternatives instead  That is, you should find alternatives to cfform, cftextarea, cfinput, cflayout and so on. See, for example, https://static.raymondcamden.com/cfuitherightway/index.html 

    Imidi
    ImidiAuthor
    Inspiring
    April 5, 2022
    Thank you very much BKBK!
    I think that starting with Coldfusion 11 Adobe has moved away from the essence of the original idea 
    by turning Coldfusion into a common application.