How to get text from text editor

We are developing a custom app with the FreshDesk SDK in order to integrate some important functionalities of our company into FreshDesk, and we are facing the next problem;

  1. We need to get the text from the reply editor; this is necessary in order to add some modifications in the text automatically, this simple action is going to save us a lot of time, unfortunately after did an extensive search into the documentation we did not find a solution.

I hope you can help us with this issue.

1 Like

@Sebastian_OCAMPO

There’s a way to push the text from the Modal to the editor using

client.interface.trigger(
"setValue", {id: "editor", text: "Text to be inserted",
attachments: [attachment ID1, attachment ID2...]})
.then(function(data) {
// data - success message
}).catch(function(error) {
// error - error object
});

Do you think that flow is helpful?

Hi Saif,

The problem is not setValue into the editor the app already do that; instead what we need is to get the current value from the Text Editor in order to process it.

I recognize it. There doesn’t seem to be a platform API to get this done.

You can try doing workarounds by utilizing background apps (ticket_background placeholder). Maybe some frontend script CDN that records keystrokes and gives the app keystrokes from the user and pass it over to the model (directly or via DB).

Not the best solution. But that’s one way.

I have also recorded this as a feature request for our team.

1 Like