HTML <IMG> tag being removed by the editor

Moderator: crythias

Post Reply
DaveL
OTRS newbie
Posts: 2
Joined: 06 Feb 2014, 10:59
OTRS Version?: 3.3.3
Company: Frontline Digital

HTML <IMG> tag being removed by the editor

Post by DaveL »

I must be overlooking something very simple here.

I cannot seem to get the image tag to stay in the signature text body or with the other templated text items within OTRS. This would therefore assume that I have something a miss with the editor or its configuration.

Going to the Source view, I can add the <img src="xxxxx"> tag but then when I go back to the WYSIWYG editor that <IMG> code is stripped from the text.

I have found plenty of posts on the net about adding <IMG> tags to these fields, but nothing on anyone having my problem. Any ideas, I am running OTRS 3.3.3 on Ubuntu/Apache2?

- Dave.

DaveL
OTRS newbie
Posts: 2
Joined: 06 Feb 2014, 10:59
OTRS Version?: 3.3.3
Company: Frontline Digital

Re: HTML <IMG> tag being removed by the editor

Post by DaveL »

This is actually getting a little weirder. Even though there is no <img> tag when editing the signature, if responding to a ticket it actually includes the image, however no image is included on any other email such as new email ticket or other options?

- Dave.

tgmif
OTRS newbie
Posts: 2
Joined: 17 Feb 2014, 14:58
OTRS Version?: 3.3.4

Re: HTML <IMG> tag being removed by the editor

Post by tgmif »

Hi Dave,

I got the same problem. Strange thing is, if I create a new ticket there isn't a problem with embedded images, even the "Image-Button" is in the CKEditor toolbar.

tgmif
OTRS newbie
Posts: 2
Joined: 17 Feb 2014, 14:58
OTRS Version?: 3.3.4

Re: HTML <IMG> tag being removed by the editor

Post by tgmif »

After going at least half way insane while finding the part in the template with tells the editor to stripe the <img/> tag - without any success - I simply changed the signature in the database.

crythias
Moderator
Posts: 10110
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: HTML <IMG> tag being removed by the editor

Post by crythias »

edit:
otrs/var/httpd/htdocs/js/Core.UI.RichTextEditor.js
Find:
extraAllowedContent
add img in the list.

I don't know what this will break, but that will allow you to do what you want.
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

machadoa
OTRS wizard
Posts: 101
Joined: 11 Dec 2015, 17:36
OTRS Version?: 5.0.5

Re: HTML <IMG> tag being removed by the editor

Post by machadoa »

crythias wrote:edit:
otrs/var/httpd/htdocs/js/Core.UI.RichTextEditor.js
Find:
extraAllowedContent
add img in the list.

I don't know what this will break, but that will allow you to do what you want.
Hello

Can you tell me exactly what I need to change in the file because I like to put a logo for my signature but without success yet ..

Thanks

Post Reply