gxanshu / grapesjs-zoom-plugin

stupidly simple zoom plugin for grapesjs
https://codenanshu.in/projects/grapesjs-zoom-plugin
MIT License
14 stars 0 forks source link

Option to Disable Shortcut #1

Open alansiqueira27 opened 1 year ago

alansiqueira27 commented 1 year ago

Hi, is it possible to have a flag to disable the shortcuts? I have a scenario where the user might need to type "{{my_custom_tag}}" in a textbox, and thus the underline shortcut will trigger the zoom out without intent.

Thanks for the plugin,

gxanshu commented 1 year ago

the plugin is really easy to understand. if you can give us a PR this will be very helpful.

alansiqueira27 commented 1 year ago

Hi, I'm sorry, I tried but I could not manage to run the original code on my machine, so I cannot test if it works if I do any change. If you could please do the change....

`pluginsOpts: {

  zoomInKey:  ['ctrl', 'a'],
  zoomOutKey: ['ctrl', 'b'],

} },`

I get this error on the [zoom] line:

error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.

alansiqueira27 commented 1 year ago

By the way those variables are not doing anything in the code: zoomInKey and zoomOutKey

gxanshu commented 12 months ago

currently zoom keys are in development but you can zoom things whin Shift + and Shift -

https://github.com/gxanshu/grapesjs-zoom-plugin/blob/935a4720557dc73b309a00b00a409b35a332f8a6/README.md?plain=1#L39