currently I’m formatting a lot of pages and I have to mark a lot of text as code. And to be honest this is quite tedious.
Is there any way to mark a piece of text in the editor and surround it by a macro/the code macro?
It would be nice if I could mark a text and have it copied to the macro content.
@ClemensRobbenhaar thanks for your answer. It’s not that there is a real problem, it’s just quite an inconvenience and an inconsistency in workflows.
Compare these two workflows (as they really occur to me, not the ideal world):
“Bolden text”:
Type the text
mark it
press the bold button
done
“Mark as code”:
Type the text,
mark it
press the macro button
select the Code macro
curse ()
cancel
copy the text
press the macro button
select the Code macro
paste the code/text
press submit
done
This very forum for example (I understand that the editor is more limited than the xwiki one) can be used with following only the “type, mark, format”-workflow.
I think it would be a great enhancement for the editor to have a more consistent workflow.
click the dedicated macro button from the tool bar
press submit
done
The question is what should happen if you select rich text (formatted text, lists, tables, etc.). We could probably try to convert that to wiki syntax and paste it into the macro content text area, but it’s more complex.
In any any case, prefilling the macro content text area with the selected plain text is easy to do as a first step if that helps you. Can you report an improvement on Loading... ?