Hi,
I’ve added a toolbar button to quickly access the code macro in the wysiwyg editor following this guide.
Code I added looks like this:
> config['xwiki-macro'] = config['xwiki-macro'] || {};
> config['xwiki-macro'].insertButtons = [
> {
> commandId: 'xwiki-macro-insert-code-sql',
> macroCall: {
> name: 'code',
> parameters: {
> language: "sql"
> }
> }
> }
> ];
Problem is, when I mark text on the wikipage and click on the button, it doesn’t use that marked text on the macro.
For example:
If I mark “Lorem ipsum dolor” --> press the standard xwiki-macro-button (not my added one) --> select code-macro --> then “Lorem ipsum dolor” is already filled in, when the macro popup opens.
When I do this with my button, the contents of the popup window are empty (except for language=sql).
Is there a way, I can achieve this? couldnt find a solution searching.
Greetings