We are using ZAF / ZCLI to add an editor option with several buttons. One of the buttons replaces the editor content with content fetched via an API.
To do this, we have code like so:
client.set('comment.text', ''); // Clears content & undo history for the editor.
insert', summary); // Appends new content for the editor.
For some tasks, we use an API method to set a custom textarea field we use in our left sidebar (a PUT request to that field).
Problem 1: Editor Undo History: The client.set line clears the 'Undo' history. The new Zendesk 'Enhance Writing' button does the same thing, but preserves the history.
We have used the ZCLI and ZAF Client API documentation as the basis for our application:
How can we retain undo history while updating the whole field, instead of only inserting at the cursor?
Problem 2: Metafield Undo History: We'd also like to update our Text custom field on the left sidebar without wiping out the edit history.
I suspect that there are AJAX methods available for both of these operations; can we get some help locating these in the documentation or seeing some examples?
댓글을 남기려면 로그인하세요.