Solved

Modify Coldfusion cftextarea richtext yes modify toolbar inline

Posted on 2013-01-21
7
952 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Read about why website design really matters in today's demanding market.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

708 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

15 Experts available now in Live!

Get 1:1 Help Now