You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For us it is not enough to copy the content to the original textarea when save button is clicked.
We wan't to do some business logic when the save button is clicked. With the actual behavior the easiest solution for us would
to provide our own save button and get the editors content. The content is what we are interested in, when the user clicks
save.
Actual the save button is more a problem then a solution as wer'e not directly notice when it is clicked (we need to disable it).
The actual implementation (set the callback in the options) is not convenient as in some typescript environments (like Angular
Suneditor) the option is passed in a different scope. With that we had some trouble as we can't execute any of our class logic
in this options object.
In addition, it is not uniform, since the other event callbacks are registered in overwride a functions.
Possible solution:
Provide a function that can be overridden by the user and get's called rifght after the save method.
This could return the actual content - That's what the most users are interested in. This could prevent the need to listen for all
changes when you are only interested in the "final content".
Thank's for your work! your editor is great :)
Greetings Daniel
The text was updated successfully, but these errors were encountered:
@DE-Danloc Currently the "callBackSave" option does this.
But I think the "onSave" event is more intuitive.
It will be applied in the next version.
Thank you for your contribution.
Actual behavior / problem:
For us it is not enough to copy the content to the original textarea when save button is clicked.
We wan't to do some business logic when the save button is clicked. With the actual behavior the easiest solution for us would
to provide our own save button and get the editors content. The content is what we are interested in, when the user clicks
save.
Actual the save button is more a problem then a solution as wer'e not directly notice when it is clicked (we need to disable it).
The actual implementation (set the callback in the options) is not convenient as in some typescript environments (like Angular
Suneditor) the option is passed in a different scope. With that we had some trouble as we can't execute any of our class logic
in this options object.
In addition, it is not uniform, since the other event callbacks are registered in overwride a functions.
Possible solution:
Provide a function that can be overridden by the user and get's called rifght after the save method.
This could return the actual content - That's what the most users are interested in. This could prevent the need to listen for all
changes when you are only interested in the "final content".
Thank's for your work! your editor is great :)
Greetings Daniel
The text was updated successfully, but these errors were encountered: