When creating a new app we want to leverage the editor window methods. However, when trying to open the reply editor and insert text, the editor opens but no text is inserted. If the editor is already open with the button is pressed, this error is thrown.
" The 'reply’ editor is already open. If you just want to add text to the existing window, use the setValue interface API instead."
Opening a new editor when clicked, the mentioned text is not being inserted
If the editor is already open, then error use setValue interface API instead
In the first scenario the expected behaviour is as per ticketopenreply, where usage would be as
depicted
client.interface.trigger("click", {id: "reply", text: "Text to be inserted"})
.then(function(data) {
// data - success message
}).catch(function(error) {
// error - error object
});
In the latter part when the window is already open, there wont be a need for opening a new editor instead the text is to be inserted as mentioned in ticketinserteditorwindow. Since the editor is already open the usage would be as depicted below
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
});
In scenarios when an editor is already open the system would result in error
" The 'reply’ editor is already open. If you just want to add text to the existing window, use the setValue interface API instead."
Having said that, could you please confirm if our understanding is same.
Appreciate your patience. Thanks for reaching out.
As I mentioned earlier I raised the issue with relevant team. Additionally, raised a ticket with Support Desk team, and is being evaluated by L2 support team. I shall keep you updated on progress.