Adding fonts to "Font" dropdown in editor

Moderator: crythias

Post Reply
twobeers
Znuny newbie
Posts: 4
Joined: 05 Jan 2021, 13:31
Znuny Version: 7.0.23
Real Name: Tobias

Adding fonts to "Font" dropdown in editor

Post by twobeers »

Hello everybody,

I'm currently searching for a way to add additional fonts to the "Font" dropdown box in the editor. I would like to add the fonts from our corporate design, but haven't found a way to do so yet. Does anybody here know how/if this can be done? We are using OTRS 7.0.23.

Thanks,
Tobias
You do not have the required permissions to view the files attached to this post.
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Adding fonts to "Font" dropdown in editor

Post by root »

Hi,

Please open a ticket with the vendor. As there is no Community Edition 7 of OTRS we do not know this version.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
twobeers
Znuny newbie
Posts: 4
Joined: 05 Jan 2021, 13:31
Znuny Version: 7.0.23
Real Name: Tobias

Re: Adding fonts to "Font" dropdown in editor

Post by twobeers »

Hey Roy,

thanks for the quick reply, I'll reach out to support as well. Do you know if there was/is there an option to change this in V6? I'm hoping that if it's available in V6, it will also be available in v7, hopefully at the same location.

Best Regards,
Tobias
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Adding fonts to "Font" dropdown in editor

Post by root »

twobeers wrote: 07 Jan 2021, 15:20 Hey Roy,

thanks for the quick reply, I'll reach out to support as well. Do you know if there was/is there an option to change this in V6? I'm hoping that if it's available in V6, it will also be available in v7, hopefully at the same location.

Best Regards,
Tobias
Hi,

Since version 6 it's way harder to modify the editor's settings. In version 6 the file var/httpd/htdocs/js/Core.UI.RichTextEditor.js would be the first place where I would check.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Adding fonts to "Font" dropdown in editor

Post by root »

Hi,

What is the version of the CKeditor in OTRS 7?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
twobeers
Znuny newbie
Posts: 4
Joined: 05 Jan 2021, 13:31
Znuny Version: 7.0.23
Real Name: Tobias

Re: Adding fonts to "Font" dropdown in editor

Post by twobeers »

root wrote: 07 Jan 2021, 15:24 Since version 6 it's way harder to modify the editor's settings. In version 6 the file var/httpd/htdocs/js/Core.UI.RichTextEditor.js would be the first place where I would check.
Thanks, I'll check there.
root wrote: 07 Jan 2021, 15:39 What is the version of the CKeditor in OTRS 7?
I think our OTRS is using 4.7.0, see code snippet below.

Code: Select all

<script type="text/javascript">//<![CDATA[
    "use strict";
    var CKEDITOR_BASEPATH = "/htdocs/js/thirdparty/ckeditor-4.7.0/";
//]]></script>
twobeers
Znuny newbie
Posts: 4
Joined: 05 Jan 2021, 13:31
Znuny Version: 7.0.23
Real Name: Tobias

Re: Adding fonts to "Font" dropdown in editor

Post by twobeers »

mhm, it should be able to configure the fonts used in the ckeditor by editing the settings in /htdocs/js/thirdparty/ckeditor-4.7.0/plugins/font/plugin.js

See https://ckeditor.com/docs/ckeditor4/lat ... font_names for a short description and https://github.com/ckeditor/ckeditor4/b ... #L382-L398 for the exact location where the changes need to be done.

I'll try to get this working and will provide feedback.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: Adding fonts to "Font" dropdown in editor

Post by reneeb »

in der Datei Core.UI.RichTextEditor.js, einfach unter die Zeile mit "fontSize_sizes" diese Zeile kopieren:

Code: Select all

            font_names: "Arial/Arial, Helvetica, sans-serif;Arial Narrow/Arial Narrow, Helvetica, sans-serif; Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif; Ubuntu/Ubuntu, Geneva, sans-serif",
            
Anschließend den "Loader-Cache" löschen:

Code: Select all

perl bin/otrs.Console.pl Maint::Loader::CacheCleanup
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Post Reply