Unable to set data in Freshchat conversation editor using Interface setValue

Hi DevRel Team,

In a custom app developed for Freshchat inbox, I am trying to set the data in reply editor which is fetched from a 3rd party system and using below method for the same.

“setValue”, {id: “editor”, value: “Text to be inserted”})
.then(function(data) {
// data - success message
}).catch(function(error) {
// error - error object

However It is not setting the value in the editor. I get a success response in then() and there is no error thrown in console.

Please suggest if I am missing something here. Thanks in advance.


Hey @Sachin_Kumar,

The snippet you shared is correct and the value should be ideally set to the editor. Can you share your app code? And also verify the editor id.

Hi @zach_jones_noel ,

Thanks for your response. I found the issue, the method takes the argument as “value” where as in Freshdesk and Freshservice, it is “text”. I corrected it from “text” to “value”
client.interface.trigger(“setValue”, {
id: “editor”,
value: <p>${text}</p> //It was text
}).then(function () {
client.interface.trigger(“showNotify”, {
type: ‘success’,
message: “Article Added to the Reply”
}).catch(function () {
client.interface.trigger(“showNotify”, {
type: ‘danger’,
message: “Error while adding Article to the Reply”

Thanks for your help.


1 Like

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.