Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Modify Coldfusion cftextarea richtext yes modify toolbar inline

Posted on 2013-01-21
7
Medium Priority
?
1,001 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
[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
  • 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
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 
LVL 52

Accepted Solution

by:
_agx_ earned 2000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

722 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