It's better when it's simple

User Tools

Site Tools



Question: What about macros with arguments? I'd like - for example - substitute @#google(DokuWiki)#@ with

This has now been addressed. See syntax for expanded version above.


I get the following error message: ksort() expects parameter 1 to be array, boolean given in C:\xampp\htdocs\testdoku\lib\plugins\TextInsert\admin.php on line 98

and: Invalid argument supplied for foreach() in C:\xampp\htdocs\testdoku\lib\plugins\TextInsert\admin.php on line 139

can you help?



I've uploaded a possible fix to github. But it may merely get rid of the error message, while the plugin itself may still not work properly. See the latest version. But truthfully, I'm not sure why this is happening, unless the macro database file is not saving correctly. This may be a Windows issue and I'll have to look into that further if you don't have any success.


Buttons don't toggle visibility of plugin config interface sections with sprintdoc template

(2020-07-16) I'm using sprintdoc on The buttons to toggle visibility do nothing. Browser console shows this error:

start?do=admin&page=textinsert:542 Uncaught TypeError: Cannot read property 'style' of null
  at replace_show (start?do=admin&page=textinsert:542)
  at HTMLButtonElement.onclick (start?do=admin&page=textinsert:577)

The plugin doesn't seem to work using the latest Dokuwiki release (Weatherwax). A new “insertext” page appears on the admin board, but clicking on the buttons doesn't do anything.

I think you will find that this is now fixed. I was using a discontinued jquery-like function that Dokuwiki previously provided.

The info text in the Administration → Plugins has some gotchas! (namely the site is misspelled, and there is no link to this page)

Thanks. Some of that was left over from the initial development. I've cleaned up the Info and all should be OK now.

Much better. Nice work.

When searching, macros aren't being replaced, so if I have COMPANY macro set to “Example Corp.”, I'll find nothing for “example” term while will succeed with “COMPANY” term. This is quite inconvenient and not user-friendly at all.

This has nothing to do with textinsert.
Myron Turner 2013/12/05 03:01

When using TextInsert with a plugin that adds syntax, such as Wrap, any of the new syntax defined in macro definitions is not processed, instead displaying as-is, possibly due to TextInsert processing the page after Wrap does. Anything to be done here?

My test does not show this: wrap_with_textinsert

Myron Turner 2014-11-14 11:34

Try it the other way around. Define some Wrap syntax inside a macro, as if trying to simplify making an infobox.

Macro substitution not working inside of a header. Given MYMACRO defined as neat stuff!:

====== #@MYMACRO@# Woo! ======
#@MYMACRO@# Woo!

Renders as

#@MYMACRO@# Woo!

neat stuff! Woo!

You can't put markup inside a header:

This is a header **trying** to be bold

Myron Turner 2015-01-11 04:51

Feature Request

:!: Hy, regarding the macro not working in headings. I am using numbered headings plugin and it works perfectly. I am not sure what is the difference in code, but it would be awesome if this plugin could do the same.

The numberedheadins plugin doesn't add markup; it just adds text – the numbering. And the indentation levels shown on the plugin page are a function of the old dokuwiki default template, which indented headings according to the heading levels. — Myron Turner 2016-02-13 04:48

:!: It would be awesome if this plugin could process wiki syntax and be combined with other plugins

A previous user asked a similar question (above). You can include textinsert in other plugins, such as the wrap plugin, but this would have to be tested for each plugin. The question would be whether the other plugins accept nested plugins. As for including markup, for most syntax features you don't need another plugin since you can already include html in textinsert macros. — Myron Turner 2015-06-17 15:51
I'd also like to use Wiki markup in textinsert macros - in my case to use the include plugin; I'd like to have the macro contents be something like:
At the moment, this is rendered as raw text; can textinsert process its replacements before the Wiki markup is rendered? — Iain Hallam 2017-04-22 03:39
No, afraid not. — Myron Turner 2017-04-22 14:06
plugin/textinsert/discussion.txt · Last modified: 2020-07-17 04:01 by clairelyclaire