re-editor icon indicating copy to clipboard operation
re-editor copied to clipboard

Disable cut,copy and paste

Open Tushar2940 opened this issue 9 months ago • 4 comments

how to disable cut, copy and paste for web as well as on android and ios

Tushar2940 avatar Mar 18 '25 06:03 Tushar2940

how to disable cut, copy and paste for web as well as on android and ios

Thanks for submitting the issue. Do you mean Toolbar?

MegatronKing avatar Mar 19 '25 14:03 MegatronKing

Disable Cut, Copy, and Paste in Editor (Both Keyboard & Right-Click Menu)

Hi,

Thank you for your response!

I would like to disable the ability to cut (Ctrl + X), copy (Ctrl + C), and paste (Ctrl + V) in the editor. This should apply to both Right-click context menu options too.

Could you please guide me on how to achieve this within the package?

Thanks in advance for your help!

Tushar2940 avatar Mar 24 '25 10:03 Tushar2940

@Tushar2940 See this field: https://github.com/reqable/re-editor/blob/c6ad3bff89540959079d43dc6cfc132e7fcba163/lib/src/code_editor.dart#L240

MegatronKing avatar Mar 24 '25 10:03 MegatronKing

Re-Editor has the built-in default shortcut hotkeys, and developers can also use shortcutsActivatorsBuilder to set custom shortcut hotkeys. Of course, the shortcut keys only work on the desktop.

how to disable for web and other platform? if it is working for other platform then can you please give an example code so i can understand better. right now i am implementing this in flutter web.

Thanks for your help!

Tushar2940 avatar Mar 26 '25 06:03 Tushar2940