Solved

Coldfusion cftexarea (richtext=true) alignment issue

Posted on 2007-11-29
2
187 Views
Last Modified: 2008-09-16
When text is written inside a cftextarea and end-of-line is entered, and the source is viewed it appears within a <p> block. Due to subsequent processes it was neccessary for me to change fckconfig.js which configures this to make </br> the default function of the ENTER key.

However, the problem i get now is that <p> is ALSO submitted when the text is aligned. If i write some text, and align it in any way it is embedded within some <p> block, i.e:

<p align="justify">some text</p>

.. is there a way to configure, such as there was for the enter key, which tag should be used for alignment? .. ideally i would like to use <div align="justify"> since the subsequent process does not perform any formatting on <div> tags>>
0
Comment
Question by:paddycobbett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Accepted Solution

by:
Plucka earned 500 total points
ID: 20379911
I would suggest that rather than modifying the fckconfig.js I would accept how it renders things, then afterwards alter the result using CF RegEx's.

Sounds like you have a problem on rendering the content, so just store it verbatim, and only change it to how you want it to work when you want to render it.

A simple non regex version of this might be
<cfset myContent = replace(myContent, "<p>", "<br />", "all") />
<cfset myContent = replace(myContent, "</p>, "<br /><br />, "all") />

Open in new window

0
 
LVL 1

Author Comment

by:paddycobbett
ID: 20384107
That's a reasonable work around thanks =)
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

707 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