Skip to content

Shortcut for subscript and superscript #3759

Answered by SiriusXT
nema69 asked this question in Ideas
Discussion options

You must be logged in to vote

I implemented this function by using a script to simulate the mouse, the code is:
#widget

setTimeout(() => {
api.bindGlobalShortcut("alt+[",function (){
    if (window.getSelection().toString()!=""){
        setTimeout(() => {document.querySelectorAll("div.ck.ck-balloon-panel.ck-balloon-panel_visible.ck-balloon-panel_with-arrow.ck-toolbar-container button.ck.ck-button:nth-child(6)")[0].click();}, 10); }
    else{return}
    
}); 
api.bindGlobalShortcut("alt+]",function (){
    if (window.getSelection().toString()!=""){
        setTimeout(() => {document.querySelectorAll("div.ck.ck-balloon-panel.ck-balloon-panel_visible.ck-balloon-panel_with-arrow.ck-toolbar-container button.ck.ck-button:n…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@zadam
Comment options

zadam Oct 3, 2023
Maintainer

@SiriusXT
Comment options

Comment options

You must be logged in to vote
1 reply
@zerebos
Comment options

zerebos Oct 3, 2023
Collaborator

Answer selected by nema69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
4 participants