Is it possible to define user-define default parameter for macros?
How can use faster select a macro parameter without clicking the UI?
Use case:
A user frequently uses the "Cod block" macro. He always sets the "Syntax Highlighting" parameter to "Bash". But this always needs several clicks. The user wishes to get his macro prepared more easily and faster.
Based on the discussion before, the following solution can be suggested; thanks to all contibutors:
You can set macro parameters while typing in the wiki editor. Just type
{macro name:parameter name=parameter value}
for example
{code:language=bash}
Dare I say: use wiki and Insert markup. :)
More seriously, for this particular case they can just type: {code:bash} and it will auto-create
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, you need to close with }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bob, that guides me to the correct solution:
You have to type
{code:language=bash}
in order to autocreate the macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Arnold,
I don't know how to do this programatically, but you could create a page that contains all the macros you want to use, and set up their parameters as required.
Then all you have to do is copy and paste them into the pages where you need them.
You might have to change one or two parameters to suit the page, but you could cut out quite a lot of the work.
Cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another possible approach is to write a User Macro that embeds the macro you want to use. You can pass params to it and possibly set defaults... I haven't looked into it yet, but I might give this a try.
And the nuclear option, of course, is to write your own user macro and set your params, but emulating existing ones can be especially hard with some of them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, Mick. That's an option indeed. However, not the most covenient (that means fast) solution.
I thought more about some settings, autocomplete, keyboard shortcuts or the like.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries. :) As far as I know there isn't any way you can do these things from the keyboard. it might be possible to edit a macro so that it has several defaults automatically, but I wouldn't know how to do that.
It'd be good to find out though.
Cheers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.