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

Run stateful commands #155

Open
AdamPS opened this issue Aug 29, 2023 · 2 comments
Open

Run stateful commands #155

AdamPS opened this issue Aug 29, 2023 · 2 comments

Comments

@AdamPS
Copy link

AdamPS commented Aug 29, 2023

The keyconfig docs describe commands with parameters. This one works for me:

window.doStatefulCommand('cmd_align', 'right');

However I can't get others to work. I found this other issue with an alternative way of doing font color.

However I am interested in paragraphState and I can't get it to work. Any ideas please?

@morat523035
Copy link

morat523035 commented Aug 29, 2023

The kb.mozillazine.org keyconfig page was last updated in 2013‎.

Try these:

window.goDoCommandParams('cmd_paragraphState', 'h1');
window.editorSetParagraphState('h1');

Body Text: ''
Paragraph: 'p'
Heading 1: 'h1'
Address: 'address'
Preformat: 'pre'

Reference
http://searchfox.org/comm-esr115/search?q=cmd_paragraphState
http://searchfox.org/comm-esr115/search?q=paragraphMenuPopup
http://searchfox.org/comm-esr115/search?q=setParagraphState

@AdamPS
Copy link
Author

AdamPS commented Aug 30, 2023

Great thanks it works. I'm very happy with this add-on.

The kb.mozillazine.org keyconfig page was last updated in 2013‎.

Yes, but the README for this project still says "This old wiki page about Keyconfig also has some commands that are still valid"😃. It would be great to add to the README here so that it didn't depend on the other outdated page. There are some useful answers in some of the issues that could be copied in.

Also it would be great if we could run stateful commands in tbkeys-lite, for example like this:

cmd:cmd_paragraphState:h1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants