angular2-hotkeys icon indicating copy to clipboard operation
angular2-hotkeys copied to clipboard

Cheatsheet template

Open cooller-94 opened this issue 6 years ago • 6 comments

Could you please possibility to change template of hotkeys cheatsheet?

Please advice, Thanks in advance

cooller-94 avatar Sep 07 '17 10:09 cooller-94

I'm not currently adding any features to this project unfortunately (I no longer with with Angular at my job), but I'd love a pull request!

brtnshrdr avatar Oct 27 '17 21:10 brtnshrdr

hotkeys-cheatsheet tag is not working for me in Angular 5.0.0. Do I have to make any changes for this ??? this code is getting error when I have included at top level element. Is there any modification in this code???

rachitd-ezdi avatar Feb 03 '18 05:02 rachitd-ezdi

The rest of the project is not actually tied to the example cheatsheet. You can create your own fairly easily and modify it how you like (give it a different selector of course).

I'd start with the example here to figure out how it's done

AshMcConnell avatar Mar 22 '18 14:03 AshMcConnell

Should be pretty possible to make your own cheat sheet by simply subscribing to

    this.hotkeysService.cheatSheetToggle

And build your own component with a different selector than hotkeys-cheatsheet and then you can do whatever you want.

I'll see if I can get this into the documentation because this seems like something more people would want to do. Just supplying your own template (and presumably css) seems like it would be a bit convoluted so I think I prefer the idea of just documenting better how to build your own cheat sheet.

wittlock avatar Mar 28 '18 22:03 wittlock

@wittlock any update on this? Even a short word in the documentation would be of great help :slightly_smiling_face:

rigelk avatar Sep 11 '18 12:09 rigelk

@rigelk You just need to take a copy of the original cheat sheet and change the html / logic to do what you like. It does the this.hotkeysService.cheatSheetToggle subscription inside it. All you need to do is replace your <hotkeys-cheatsheet></hotkeys-cheatsheet> with your copy (using a different selector)

AshMcConnell avatar Sep 11 '18 13:09 AshMcConnell