Solved

Modify Coldfusion cftextarea richtext yes modify toolbar inline

Posted on 2013-01-21
7
965 Views
Last Modified: 2013-02-06
Hi,

I have a function that the experts  helped me solve where it loops through the cftext areas and validates that the length does not exceed what is in the database (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_28000781.html).

I try to pull some of the buttons off the editor with this javascript, and it breaks the function that the experts developed.  Any thoughts on how to modify the toolbar without breaking the javascript developed in the previous question?

<script>
function FCKeditor_OnComplete(editorInstance)
{
 editorInstance.Config["ToolbarSets"]["MyToolBar"] = [
 ['SpecialChar','Bold','Italic','Underline','Subscript','Superscript','SpellCheck','Link']
 ];
editorInstance.EditorWindow.parent.FCK.ToolbarSet.Load('MyToolBar' ) ;
}
</script>
0
Comment
Question by:atljarman
  • 4
  • 3
7 Comments
 

Author Comment

by:atljarman
ID: 38804184
I get an exception thrown and not caught from the cfajax file.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 38805337
It works with CF10. All I did was added that function inside the existing <script> tags from the other example.  

Can you post the error and an example that triggers the error? Maybe you're doing something different or perhaps its a version problem? There's probably different version of the editor shipped w/CF7-10, so maybe that syntax isn't supported in your version? That's just a guess though...
0
 

Author Comment

by:atljarman
ID: 38809742
It happens on line 90 of the cfajax file attached.  It says exception thrown but not caught.\

I don't have access to the server files, but I could ask the server folks to create the custom toolbar so that i can just reference. That would likely solve the problem as the script is just stripping away all the icons but what is listed from the full list.
cfajax-1-.txt
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 38810276
Hard to say what's causing it without seeing the error message from the ajax logs/debugger (or your code if it's different). But it works perfectly w/CF10.  What CF version are you running?

Yeah, a custom toolbar would work too or you might be able to do it yourself.
0
 

Author Comment

by:atljarman
ID: 38810304
CF9.  I've put the request in and I will see what they say.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 38810407
Sounds good.
0
 

Author Closing Comment

by:atljarman
ID: 38859914
I created a separate folder and referenced the in the cftextarea. Thanks for your help.  Now if I could get the characters remining to display at the bottom of the cftextarea that would be great!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

786 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