Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combination with wrapper meta add on? #87

Open
ankidoc opened this issue Jul 4, 2022 · 3 comments
Open

combination with wrapper meta add on? #87

ankidoc opened this issue Jul 4, 2022 · 3 comments
Labels
wontfix This will not be worked on

Comments

@ankidoc
Copy link

ankidoc commented Jul 4, 2022

hello!

amazing add on!

any chance of combining it with wrapper meta add ons function to center but left justified?

I saw that there are shortcuts for center, left, right and even justification. But I can't get it to work like the leftsided centering which can be done with wrapper meta add on in the editor.

Thanks!!!

@BlueGreenMagick
Copy link
Owner

I don't really know what 'leftsided centering' is, but if you know a bit of JavaScript, you can add a custom hotkey action as written in the FAQ

@ankidoc
Copy link
Author

ankidoc commented Jul 4, 2022

sorry for my bad explanation.

So when you use wrapper meta add on, it adds "centeredbox" in the html beside left sided and justified.

So I don't know anything about JavaScript but I was curious, how to make it work with your add on.

@BlueGreenMagick BlueGreenMagick added the wontfix This will not be worked on label Jul 6, 2022
@BlueGreenMagick
Copy link
Owner

Sorry, but this feels too niche to put into the add-on.

If you really want to use this feature, as written above you can add a script to the notetype. Maybe something like this (where you have .center { ...} in your note type styling)

EFDRC.registerShortcut("Ctrl+L", (event, el) => {
      EFDRC.wrapInternal(el, '<div class="center">', '</div>', false)
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants