Recent searches
No recent searches
Add "editing toolbar" at "My activities", so customer can post "code" with correct format.
Posted Dec 22, 2021
Hi Zendesk,
Our customer ask us to add "editing toolbar" at "My activites", so when they're reply the ticket from web, they can post "code" for correct format, as below picture show:
Currently, it can only write plain text
Thank you.
Best Regards.
John Weng
0
6
6 comments
Gorka Cardona-Lauridsen
Hi john_weng 翁維澤
You can easily achieve that by replacing the {{textarea 'body'}} expression in the form object in your themes request_page.hbs template with {{wysiwyg 'body'}} - here's an example for how to do it for the comments text editor, but for the request page it is the same.
Here's the helper documentation.
If you use the latest version of the Copenhagen theme it comes with this setup by default.
0
john_weng 翁維澤
Hi Gorka,
We have use the method you provide, the editing toolbar can show,
But we meet another issue that customer cannot click submit even they have leave the message
I add my code, reference request_page.hbs
Please let me know if you know any of restricted.
Thank you.
Best Regards.
John Weng
0
Greg Katechis
Hi john_weng 翁維澤! Without any modification to the script.js file, where the default handler exists to disable/enable the submit button, the only reason that I can think of why that would be disabled is if the text field would be empty...which it definitely isn't! I did look at the file you shared and it shows some modification of the base request_page.hbs in a way that may be causing an issue with the query selectors, although I didn't dig in deep enough to confirm that.
To see if the issue is on the Zendesk side, could you test the comment functionality out in a new Copenhagen environment and let us know if the submit button is still greyed out there?
0
john_weng 翁維澤
Hi Greg Katechis,
Sorry for replying late!
I’m not sure what you mean about
“test the comment functionality out in a new Copenhagen environment and let us know if the submit button is still greyed out there?”
Because in new Copenhagen environment, it already use {{wysiwyg 'body' rows='7'}},
also, it’s working correctly.
I check the script.js file and find there is some code about the “textare” and disable submit button, please reference the picture(compare.png)
I have also attached the files:
John_Live_script.js(line: 110-126), New_Copenhagen_script.js(line: 92-128)
I think this is should be the reason why my theme’s submit button disabled because there is no definition of “wysiwyg”.
But I’m not familiar with javascript, can you tell me how to write the code to judge “wysiwyg” is empty or not?
If need other information, please let me know.
Thank you.
0
john_weng 翁維澤
Hi Greg Katechis,
This is John.
I try copy javascript's code from "New Copenhagen" to my theme, and I can avoid the submit button issue now.
When I test the Theme, I found that when I use code block, it will not indent as code format, it also occur at "New Copenhagen" theme, I think it also occur in your environment, you can reference below code format from the code block.
The code is part of "New Copenhagen" theme script.js,
It's from line: 10-23
0
john_weng 翁維澤
Hi
We have enable and using edit toolbar now
We will using this first, if customer or agent have responded about this issue,
We will open another ticket for it.
Thank you.
0