activeadmin_quill_editor icon indicating copy to clipboard operation
activeadmin_quill_editor copied to clipboard

How to configure history module?

Open vol1ura opened this issue 2 years ago • 1 comments

Hello! Is there any way to add Undo and Redo buttons from history module?

I have tried to insert in field configuration

{
  data: {
    options: {
      modules: {
        history: {
          delay: 2000,
          maxStack: 500,
          userOnly: true
        }
      }
    }
  }
}

but it doesn't work.

vol1ura avatar Sep 07 '22 10:09 vol1ura

Hello! Is there any way to add Undo and Redo buttons from history module?

I have tried to insert in field configuration

Hey @vol1ura. I made a check and it seems fine. I tested it using:

options = { modules: { history: { delay: 0, maxStack: 500, userOnly: true } }, theme: 'snow' }
f.input :description, as: :quill_editor, input_html: { data: { options: options } }

With 0 delay it's easier to see the effect.

But the history options don't seem to setup the Undo/Redo buttons. I made some searches with "quilljs undo button" and there are some workarounds to setup these buttons because it's not a standard feature for the editor.

blocknotes avatar Sep 12 '22 21:09 blocknotes

OK, thank you for answer.

vol1ura avatar Sep 25 '22 15:09 vol1ura