-
Suggestion
-
Resolution: Fixed
-
2
-
We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.
NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.
Updated:
Including the other font formatting options on this ticket that was originally just for Monospace:
- Subscript
- Superscript
- Monospace
- Clear Formatting
As there are shortcuts for italic, bold, underline and strike through formatting I would highly appreciate a shortcut for monospace.
By the way: You should use a consistent translation for "monospace". So use either "nichtproportionale Schriften" or "Festbreitenschriftart" as a German translation!
Form Name |
---|
[CONFSERVER-23966] Shortcut for font format options
Using double curly braces are acceptable when it's working, but it might be failed with pasted format texts. Which would lead to an unacceptable operations.
- Remove
{
Unknown macro: \{ and }
}
- Select text
- Choose monospace format.
These operations are annoying when curly braces failed and it failed A LOT....
A hot key combination would solve this issue. I would trade this feature with an existing hot key or make it configurable.
Here plus agree with the suggestion for shortcuts for monospace, subscript, superscript, etc.
I have heavy documentation work with code examples and need shortcut for monospace.
Mouse click on the menu requires many actions including moving mouse pointer to menu, scroll down, clicking and return to editing postion in the page.
TamperMonkey based solution does not work for my confluence server 7.0.1.
I heavily agree with the suggestion for having shortcuts also for monospace, subscript, ..
And thanks for the 'solution' by use of GreaseMonkey above – something sems to be changed in the meanwhile within Confluence, so it worked for me only after reloading the edited page. The following variant solved this problem (but it's just a hack, as now it is called more often than needed):
// ==UserScript== // @name Monospace Keyboard Shortcut for Confluence // @version 0.3 // @grant none // @include */editpage.action?* // @include */createpage.action?* // @run-at document-idle // @description Adds keyboard shortcuts for formatting, Ctrl+Alt+m - monospace, Ctrl+Alt+j - superscript, Ctrl+Alt+k - subscript // ==/UserScript== document.addEventListener('DOMNodeInserted', function() { if (tinyMCE) { if (tinyMCE.activeEditor) { console.log("Monospace patch loading"); tinyMCE.activeEditor.addShortcut("ctrl+alt+m","monospace","confMonospace"); tinyMCE.activeEditor.addShortcut("ctrl+alt+j","superscript","Superscript"); tinyMCE.activeEditor.addShortcut("ctrl+alt+k","subscript","Subscript"); } } }, false);
(Yet added two hacks for superscript and subscript as a sample, as it needed me a while to figure out the right names, maybe it helps someone – don't ask me regarding the crude shortcuts, just not yet tested which better ones wouldn't be conflicting with Confluence)
@WH, I'm finding this no longer works in Confluence v6.3.3. Do you or anyone else have a workaround? It's really unfortunate, as I used this shortcut many many times daily.
Update: I ended up disabling TamperMonkey scripts and just creating a Keyboard Maestro macro for this. KM is the answer for everything. On Ctrl-Alt-M, it cuts, types { {, pauses 0.1 sec, types cut text, pauses again, types } }. Works like a charm.
@WH: Is there a chance to get this script working even for taking comments?
Hi,
thx for the GM hint! +1! Iam not the GreaseMonkey expert but I had to tweak it like this to make it work:
// ==UserScript== // @name Monospace Keyboard Shortcut for Confluence // @version 0.2 // @grant none // @include */editpage.action?* // @include */createpage.action?* // @run-at document-idle // @description Adds a new keyboard shortcut (Ctrl+Alt+M) for monospace formatting // ==/UserScript== if (tinyMCE) { if (tinyMCE.activeEditor) { console.log("Monospace patch loading"); tinyMCE.activeEditor.addShortcut("ctrl+alt+m","monospace","confMonospace"); } }
Agree totally. Anything in Confluence should have a keyboard shortcut (or at least make one assignable easily).
For those of us who use monospace (and other) formatting frequently, this is a huge waste of time.
Thanks to John for the great user scripts that can help bridge the gap until Confluence has this feature! Thanks to Dmitry for providing the text we can also use while editing to accomplish this.
PS I apologze, I didn't look at the date of the blog post Apparently this has been there forever, I just never knew about it.
I thought this would be helpful to others.
While there still aren't keyboard hotkeys for applying the mentioned font formatting, the next version of Confluence will automatically convert wiki markup to rich text (the feature is called Autoformatting)
So now you can type things like:
{{inline code}} ^superscript ~subscript
into the corresponding rich text. Not as fast as hitting a hotkey, but still much better than using the toolbar.
See the video under "Autoformatting" in this blog post for more stuff:
http://blogs.atlassian.com/2012/12/12-things-you-didnt-know-about-the-confluence-editor/
Thanks for the feature!
I ran into the same issue today, and got tired of having to use the menu bar to toggle monospace. I did a little digging and found a solution that works great for me, and I thought it might help others.
The keyboard shortcuts for Confluence use a product called TinyMCE, which allows you to add keyboard shortcuts on the fly using the function tinyMCE.activeEditor.addShortcut(keystroke, description, command).
You can actually invoke it yourself anytime you are editing a page in Confluence and specify any unused keystroke combination (I picked "ctrl+alt+m" but you could choose a different one that you prefer better) and use the description "monospace" and the command "confMonospace", and from that point on in your page editing session, that keyboard combination is available to you.
There are a couple of ways to do this:
1) Persistent method using GreaseMonkey for Firefox or TamperMonkey for Chrome:
If you are using Firefox or Chrome, you can use the following user script to automatically add the keyboard shortcut anytime you access a URL that matches */pages/editpage.action?* or */pages/createpage.action?*
// ==UserScript==
// @name Monospace Keyboard Shortcut for Confluence
// @version 0.1
// @description Adds a new keyboard shortcut (Ctrl+Alt+M) for monospace formatting
// @match */pages/createpage.action?*
// @match */pages/editpage.action?*
// ==/UserScript==
tinyMCE.activeEditor.addShortcut("ctrl+alt+m","monospace","confMonospace")
2) Ad-hoc method using a javascript bookmark:
If you aren't using Chrome or Firefox, or can't (or don't want to) install GreaseMonkey or TamperMonkey in your browser, you can enable the monospace keyboard shortcut on an ad-hoc basis by creating a new browser bookmark, calling it something like "Enable Monospace", and setting it to the following javascript URL:
javascript:tinyMCE.activeEditor.addShortcut("ctrl+alt+m","monospace","confMonospace");
Then, whenever you are creating or editing a Confluence page where you frequently have to use monospace font, click on your new "Enable Monospace" bookmark, and from that point on, you will be able to use ctrl+alt+m to toggle monospace, the same way you would use ctrl+i to toggle italics.
You can also use this second approach to test out any new keyboard shortcuts you might create, before you decide whether you want to try the GreaseMonkey/TamperMonkey approach.
Just note that anytime the page reloads, the shortcut will be lost unless you use GreaseMonkey or TamperMonkey to add it in for your automatically every time you load the Confluence page editor.
For anyone who's curious, I found out the proper description and command to use by searching in the javascript source code for ".addButton(" (in Chrome, press F12 to show the developer console, switch to the sources tab, then on the lower menu, click Search and use the search box to find all occurrences. You will find a result that says:
B.addButton("monospace",
{title:"monospace",cmd:"confMonospace"})
There several others available that might be of interest to you, so feel free to experiment.
Hope this helps.
Would love to see a shortcut for monospace. I write technical documentation on Confluence for our C++ coding standards, and other things. When I type the name of an object, class, file, directory path, anything, I use monospace for that. Typing the {{ and }} is cumbersome and doesn't always work correctly. Being able to select text and do something like CTRL+M for monospace, would be absolutely wonderful.
Such a simple feature to implement on Atlassian's part yet we have to wait so long for it?
Surely writing technical documentation is the a majority use case for Confluence?
Any time I write the name of a class (for example) in an english sentence, I need it to be monospace.
This happens tens or hundreds of times every page - there should be a keyboard shortcut.
Same here: Doing source code documentation is really hard, espacilly with a non US keyboard where the
{ and }character is not easy to reach.
Just wondered why there is no shortcut? Doing source code documentation right now, and a hotkey for monospace would really be handy...
We're just transitioning from writing our doc in Word to writing it in Confluence. Our Word template had a keyboard shortcut for our monospace style, and it was certainly a time saver. The lack of a keyboard shortcut in Confluence isn't a dealbreaker, but it does seem like a relatively low risk feature to introduce. Given the length of time that this feature request has been open, I'm wondering whether there is something more difficult to implementing a new shortcut that I'm understanding. Would anyone from Atlassian be able to comment on why adding a monospace shortcut isn't something that they could "just do" for an upcoming release? Thanks.
This would be a great additional and I am assuming fairly easy to introduce. Anyone used to writing technical/code documentation would use a monospace hotkey for days!
Cheers.
+1 For re-formatting technical documentation, a shortcut for monospaced text would be priceless.
Same here. We do a lot of source code documentation, system documentation etc., so monospace formatting makes it read more easily in a lot of situations. Please introduce a hotkey for it.
Guys, any news on this matter?
The formatting of monospace is one of the most used functions in the editor around here, so a hotkey for it would speed up work by 500%.
Thx for considering
Andreas
Autoformat is so finnicky and impossible to use in a practical sense, especially on existing text and sub-word text. A keyboard shortcut is required. It's so annoying I usually just write my stuff in markdown then paste them from firefox (with a markdown viewer plugin) into confluence.
Autoformat doesn't work for selected text. That really pity when editing / (re)formatting text and not writing new one!
It would be great to see this upcoming in a minor 5.x version soon!
itcampus: translation issue should be filed here: https://translations.atlassian.com/dashboard/translate#/48/0/0/ACCEPTED_TRANSLATIONS/ALL/Monospace
Hey Chris, it does work!! I just expected it to work as soon as I did {{. Not sure why I didn't try closing it out to see. (As that's what * does etc..) I guess because it's two characters I thought it would work straight away.
Not a bug! User error
gommo It should work fine. Could please check whether you have autoformatting disabled in your editor settings? If you can't get it to work it would be awesome to get some exact steps on how to reproduce include environment like browser and Confluence version. Cheers, Chris
The {{ is listed as a shortcut but it doesn't work.
Please fix, a pain and makes our documentation ugly as we skip using it now It used to make /etc/directories so pretty
A fix for this issue is available in Confluence Data Center 9.1.0.
Upgrade now or check out the Release Notes to see what other issues are resolved.