Copy link to clipboard
Copied
I want my users to be able to edit an SQL text field and give them a wysiwyg editor - then have it displayed properly in a browser - just like the area I'm typing in to make this post.
I noticed there was a rich text option in a cftextarea tag, but I need html.
Can someone tell me how this site works or an alternative that I can use?
RichieWhite wrote:
I believe the rich text editor with cftextarea will work for me.
Does anyone know how to display rich text content in a browser (and it look like it does in the control)?
From the documentation on richText:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<!--- Display the text if the form has been submitted with text. --->
<cfif isdefined("form.richtext01") AND (form.richtext01 NEQ "")>
<cfoutput>#form.richtext01#</cfoutput><br />
</cfif>
<!--- A form with a
Copy link to clipboard
Copied
Looking @ the mark-up of this page, it looks like they're using TinyMCE as the text editor.
--
Adam
Copy link to clipboard
Copied
I believe the rich text editor with cftextarea will work for me.
Does anyone know how to display rich text content in a browser (and it look like it does in the control)?
Copy link to clipboard
Copied
RichieWhite wrote:
I believe the rich text editor with cftextarea will work for me.
Does anyone know how to display rich text content in a browser (and it look like it does in the control)?
From the documentation on richText:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<!--- Display the text if the form has been submitted with text. --->
<cfif isdefined("form.richtext01") AND (form.richtext01 NEQ "")>
<cfoutput>#form.richtext01#</cfoutput><br />
</cfif>
<!--- A form with a basic rich text editor and a submit button. --->
<cfform name="form01">
<cftextarea richtext="true" name="richtext01" basepath="/CFIDE/scripts/ajax/FCKEditor" />
<cfinput type="submit" value="Enter" name="submit01">
</cfform>
</body>
</html>
Copy link to clipboard
Copied
I thought I tried that.
Thanks a lot!!
Copy link to clipboard
Copied
The richtext option creates an HTML editor. So once you've saved that to the database, just output to the browser like any other text:
<cfoutput query="yourQry">
#yourBigTextField#
</cfoutput>