Disabling ckeditor toolbars

Moderator: crythias

Locked
bogentu
Znuny newbie
Posts: 17
Joined: 14 Feb 2011, 17:33
Znuny Version: 3.0.5

Disabling ckeditor toolbars

Post by bogentu »

Is there any way to remove the ckeditor toolbars from both agent and customer tickets text entry fields? I don't want or need the ability to format the messages. I found that they disappear if I set Framework -> Core::Web::Frontend::RichText to No, but this means that URLs will not be show properly in the messages that are sent out. I would like to keep the rich text format but just remove the tools. There is a collapse/expand button on the toolbar that works, but I can't find any way to force the collapse option as the default.
bogentu
Znuny newbie
Posts: 17
Joined: 14 Feb 2011, 17:33
Znuny Version: 3.0.5

Re: Disabling ckeditor toolbars

Post by bogentu »

I found that I can remove the editing toolbars by locating the include statement in the affected dtl files and commenting it out:

Code: Select all

<!-- dtl:block:RichText-->
                    #$Include{"RichTextEditor"}
and

Code: Select all

<!-- dtl:block:RichText-->
                    #$Include{"CustomerRichTextEditor"}
But to get them all, I'd have to modify a dozen or more dtl's. I'd much rather just turn off the editor somehow. Anyone?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Disabling ckeditor toolbars

Post by jojo »

Core::Web::Frontend::RichText to No as you already wrote. The display of links in a mail client (which are not a html link) ist client dependend. Thunderbird also shows these as a clickable link
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
bogentu
Znuny newbie
Posts: 17
Joined: 14 Feb 2011, 17:33
Znuny Version: 3.0.5

Re: Disabling ckeditor toolbars

Post by bogentu »

When Richtext is turned off in this way, the URL's in my signatures get whacked. With Richtext, they show inline as you would expect in the mail client (and in the OTRS interface) and are live links:

Code: Select all

Web:  http://foo.bar
But with it off, it changes the URL's like this, with the URL replicated as what looks like a citation:

Code: Select all

Web: [1] http://foo.bar  (note that this doesn't show up as a live link)
--
[1] http://foo.bar (this does show as a live link)
So I guess I do want Richtext, just not the ckeditor toolbars. I've tried to find how I can instruct ckeditor to display in "collapsed" mode too, but can't find that option (if it exists). Simply deleting the javascript code in RichTextEditor.dtl generates errors, as you might expect.
bogentu
Znuny newbie
Posts: 17
Joined: 14 Feb 2011, 17:33
Znuny Version: 3.0.5

Re: Disabling ckeditor toolbars

Post by bogentu »

Update: So much for my idea about commenting out the include statement in the dtl's. Doing so completely eliminates formatting, including returns. So its always one long paragraph with no breaks.

I also noticed that there are lots of ways to configure ckeditor using its own config files, but it appears that the configuration changes made are not recognized. So there must be some other place in OTRS that ckeditor config is done.
scareface
Znuny newbie
Posts: 19
Joined: 22 Nov 2011, 09:05
Znuny Version: 3.1.7

Re: Disabling ckeditor toolbars

Post by scareface »

Hi, I had the same Problem and found the config.

here my solution to collaps the toolbar by default.

Edit /opt/otrs/var/httpd/htdocs/js/Core.UI.RichTextEditor.js

Code: Select all

    .
    .
    .
toolbar_Simple: Core.Config.Get('RichText.ToolbarSimple'),
toolbar: ToolbarSet,
// NEW BEGIN
toolbarStartupExpanded: false,
// NEW END
filebrowserUploadUrl: Core.Config.Get('Baselink'),
extraPlugins: Core.Config.Get('RichText.SpellChecker') ? 'aspell' : ''
    .
    .
    .
Tested in OTRS 3.1.1
OTRS: 3.1.7 (Test) 3.1.7(Prod)
OS: CentOS
Web/DB: Apache2/MySQL 5 ? MSSQL
Locked