jquery - How to reset the states of (UNDO & REDO) button on froala editor -
hi using froala editor save html each stages ..
consider there 3 stages.. a,b , c ..
froala editor 1
$('#txt_blog_editor').editable({ });
the div same 3 stages stages can created dynamically .. have issue here redo , undo buttons..
example
on click of stage , type "this stage a"
then press stage b
the div cleared , type "this stage b"
here when press undo button text changes "this stage a". want clear redo undo
history/cache/buffer , ctrl + z
on click of stages .
is there direct method in froala destroy history or reset state of redo & undo buttons.
you have clear undostack.
$(your_selector).data('fa.editable').undostack = []; $(your_selector).data('fa.editable').undoindex = []; $(your_selector).data('fa.editable').saveundostep();
or simpler:
$(your_selector).editable('initundoredo');
jquery html editor undo-redo froala
No comments:
Post a Comment