ColdFusion richtext textarea

Posted on 2010-01-01
Last Modified: 2012-05-08
Using ColdFusion 8.0.

Inside a form, <cftextarea richtext="true" name="Reading"></cftextarea> pops up a nice rich text edition (the CKEditor).

My problem is then displaying the rich text. My initial thought is:
<cfoutput><cfform><cftextarea name="Reading" richtext="true" disabled="true" >#GetReading.Reading#</cftextarea></cfform></cfoutput>

which does indeed display the text, but with all the controls you use when editing. I don't ant all those - just want to display the rich text.


Question by:larry_stephens
    LVL 9

    Expert Comment

    by:Andrew Maurer
    Try removing the attribute "richtext" and use html="true"

    Accepted Solution

    The answer was staring me in the face. This isn't a "rich text" editor in the sense of rich text as you would see in, say, MS Word. Turns out it is a rich text emulator and it's embedding html markup. You don't see that until you return the results in a certain way.

    So, use the FCKeditor embedded in ColdFusion to create text but display it normally, i.e., (in CF) <cfoutput>#returned value#</cfoutput>
    LVL 15

    Expert Comment

    Well You might try it like this:

    <cftextarea name="whatecver" richtext="yes" toolbar="Basic" toolbaronfocus="yes" value="#thevalue#"></cftextarea>

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
    Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL ( several years ago, it seemed like now was a good time to updat…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now