Keep formating while editing received ticket

Forum dedicated to Mods for HESK created by Mike Koch

Moderator: mkoch227

Post Reply
stevenf
Posts: 24
Joined: Wed Jun 15, 2016 9:37 am

Keep formating while editing received ticket

Post by stevenf »

Hello,

I know this will sound like a very strange question, but is it possible to retain formating of ticket while editing it. Now, when I try to edit ticket, formating dissapears as in all text is transfromed in one paragraf. In source there is   inside p tags but in edtior there is no new line.

Also, this dosen't happens while writing response, only when try to edit received ticket.

Hesk version 2.6.7.
Mods for Hesk 2.6.3
mkoch227
Posts: 666
Joined: Wed Jul 04, 2012 3:37 pm

Re: Keep formating while editing received ticket

Post by mkoch227 »

In edit_post.php, find (should be around line 495):

Code: Select all

<?php if ($modsForHesk_settings['rich_text_for_tickets']): ?>
change to

Code: Select all

<?php if ($ticket['html']): ?>
Save, upload, and test. I haven't had a chance to test this yet so let me know how it goes :D
Mike, Lead Developer of Image HESK: A surprisingly simple, user-friendly and FREE help desk software with integrated knowledgebase.
stevenf
Posts: 24
Joined: Wed Jun 15, 2016 9:37 am

Re: Keep formating while editing received ticket

Post by stevenf »

Unfortunately, it didn't help cause after saving changes, there is no more row spacing no matter how much I add them.
mkoch227
Posts: 666
Joined: Wed Jul 04, 2012 3:37 pm

Re: Keep formating while editing received ticket

Post by mkoch227 »

Found another line that needed to be changed. In edit_post, find at line 483:

Code: Select all

$html = $modsForHesk_settings['rich_text_for_tickets'] ? 1 : 0;
change to

Code: Select all

$html = $ticket['html'] ? 1 : 0;
Mike, Lead Developer of Image HESK: A surprisingly simple, user-friendly and FREE help desk software with integrated knowledgebase.
stevenf
Posts: 24
Joined: Wed Jun 15, 2016 9:37 am

Re: Keep formating while editing received ticket

Post by stevenf »

It worked on first received ticked, but on second received reply same thing happens.
mkoch227
Posts: 666
Joined: Wed Jul 04, 2012 3:37 pm

Re: Keep formating while editing received ticket

Post by mkoch227 »

Sorry for the delay. I finally had a chance to look at this page in a bit more detail, and I think I worked all the kinks out of it. The issue with the page, as originally thought, was that the flag to use the HTML editor was using the helpdesk's setting, and not the "html" property of the ticket itself. However, after fixing that, the page still looked at the original ticket message's "html" property, even if you were editing a reply. Therefore, if you changed HTML settings between replies, or if customers can't use rich text, etc, this would cause issues.

Anyhoo, try replacing your edit_post.php file with this one: https://gitlab.com/mike-koch/Mods-for-H ... t_post.php and see what happens. If you still have issues, please send me a PM with (1) your helpdesk URL, (2) login credentials so I can view the ticket with issues,and (3) read-only database access so I can see certain fields pertaining to tickets/replies.
Mike, Lead Developer of Image HESK: A surprisingly simple, user-friendly and FREE help desk software with integrated knowledgebase.
stevenf
Posts: 24
Joined: Wed Jun 15, 2016 9:37 am

Re: Keep formating while editing received ticket

Post by stevenf »

Thank you for reply. I will try this.

Also just to ask, is there anywhere option to set up default font of 12px in ticket response?
mkoch227
Posts: 666
Joined: Wed Jul 04, 2012 3:37 pm

Re: Keep formating while editing received ticket

Post by mkoch227 »

stevenf wrote:Also just to ask, is there anywhere option to set up default font of 12px in ticket response?
I'm not sure exactly what you mean. Do you mean the actual text editor? If so, you'll need to modify the content.css file in inc/tiny_mce/3.5.11/themes/advanced/skins/default. Find:

Code: Select all

body, td, pre {
    color: #000;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    margin: 8px;
}
Then change font-size to the size you want. This does not change the font size when viewing the response after it is submitted. I plan on making the editor font size and actual display font size consistent so the user will actually see how the response will look.
Mike, Lead Developer of Image HESK: A surprisingly simple, user-friendly and FREE help desk software with integrated knowledgebase.
stevenf
Posts: 24
Joined: Wed Jun 15, 2016 9:37 am

Re: Keep formating while editing received ticket

Post by stevenf »

Thank you for reply. That file worked for editing received ticket without HTML editor so no formating will be lost.
Post Reply