-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Question] Realize a shortcut, when there's no "cmd_***"? Example: HTML format "paragraph". #160
Comments
You would need to start your devtools investigation with the menupopup element.
Similar issue You can insert html directly.
Similar issue |
Thanks for your answer :) I read the readme.md (of course) and tried the following syntax for the compose window in tbkeys lite: What do I miss please? For inserting HTML I tried:
No success. |
Are you using tbkey or tbkeys-lite? You cannot run arbitrary javascript with tbkeys-lite. You can use the cmd shorthand and func shorthand with tbkeys and tbkeys-lite. Use the cmd shorthand for calling a command using the goDoCommand method. For example, "cmd:cmd_nextMsg" is the same as "window.goDoCommand('cmd_nextMsg');". Use the func shorthand for calling a function on the window object without a parameter. For example, "func:MsgNewMessage" is the same as "window.MsgNewMessage();". There is a tbkeys.xpi link on the GitHub releases page. Troubleshooting |
I was using tbkeys-lite. I tried it again with tbkeys:
The cmd shorthand works fine, als always. Example:
|
The command works for me. Thunderbird 115.2.3 Are you typing the command in the "Compose key bindings" text input field in the addon options? Try closing and opening the compose window. Try restarting the app. Key bindings do not fire in text input fields unless the first key combo includes a modifier other than shift.
The f2 key binding works for me when I focus the "Cc" button, but not when I focus the "To" text input field. I press shift tab repeatedly to focus the "Cc" button. Try the meta+1 key binding after focusing the "Cc" button. Try running the following code snippet using the error console as a test.
In Thunderbird, the Browser Console is called the Error Console. Browser Console |
Thanks again for your test and your answer. Everything works fine now. That makes me happy! My plattform, to make the documentation complete: Of course I'm wondering, why my test before failed. Because I restarted TB before each test. Now there are so many options for shortcuts for several tasks. Thanks for your helpful extension! Even
works fine. Please allow me one questions about "inserting HTML": When I type some text ("lorem"), mark that text and perform the shortcut, the text will be deleted.
When you type some text ("lorem"), mark that text and perform the command "Menu Format > Paragraph > H1" the text will not be deleted, but marked up with the element.
Is it possible to get the same behaviour for blockquote as for h1? But I do not want to bother you. Please answer only if you feel like it. Otherwise I'll ask in a javascript forum. |
Try these:
execCommand formatblock Reference Use the following addon to easily view the source of the currently composed message. HTML Source Editor |
Works like a charm with blockquote! The extension HTML Source Editor was already in use. : ) TBKeys was - before that thread - my most important extension. Now again more. All the best for you! |
Only one thing I forgot: Example:
After performing the shortcut again the result should be:
If anyone knows how to realize that, please let me know : ) |
Hello ! |
Try this:
Reference The sup tag defines superscript text in HTML. HTML sup tag |
Excellent, thank's a lot ! |
May I ask about this again? Is anyone reading along who has an idea how to implement this via JS. I would be very happy : ) |
Try using the undo shortcut to remove the blockquote. The docs page says that blockquote is the exception. execCommand formatblock If I execute the following commands one at a time in a new compose window...
Then the body element would change like so...
The formatBlock stuff is done in the .cpp code. Reference |
Thank you for your detailed answer! If I understand you correctly, there is no way to solve the task and turn blockquote on and off with one command. "Undo" is unfortunately not a substitute. Because it works only immediately after assigning. |
I would say there isn't a simple solution to do that as far as I know. |
Hi.
Realizing shortcuts for functions, where a "cmd_***" exists works fine.
Example:
{
"meta+u": "cmd:cmd_ul",
"meta+o": "cmd:cmd_ol"
}
I like to realize shortcuts for commands, where no ""cmd_***" exists.
Example, when you analyse a function - offered via the menubar - with the developer tools:
Compose Window for HTML Mails > Menu Format > Submenu Paragraph > Paragraph
<menuitem xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="menu_p" type="radio" name="1" label="Absatz" accesskey="A" value="p" observes="cmd_renderedHTMLEnabler" checked="true"><hbox class="menu-iconic-left" align="center" pack="center" aria-hidden="true" checked="true"><image class="menu-iconic-icon"/></hbox><label class="menu-iconic-text" flex="1" crop="end" aria-hidden="true" value="Absatz" accesskey="A"/><label class="menu-iconic-highlightable-text" crop="end" aria-hidden="true" accesskey="A">Absatz</label><hbox class="menu-accel-container" aria-hidden="true"><label class="menu-iconic-accel"/></hbox></menuitem>
Is there any way to realize a shortcut for such types of commands?
There are several more than the mentioned one for "paragraph".
Example: h1-h4, pre, ...
And further:
I would love to create a shortcut for inserting the html element "blockquote", because it is appropriate for citations from external sources.
Thanks for your help.
The text was updated successfully, but these errors were encountered: