Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
dokuwiki:button [2008/05/20 11:27] – angelegt gerald | dokuwiki:button [2024/02/29 13:36] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== Toolbar ====== | ||
+ | |||
+ | To add a button on the edit-toolbar: | ||
+ | --- // | ||
+ | (newer versions of DokuWiki) | ||
+ | |||
+ | To add a buttom for < code> | ||
+ | edit / | ||
+ | Add to the array (eg. after the last one with the signature sig.png) | ||
+ | |||
+ | < | ||
+ | | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ), | ||
+ | </ | ||
+ | ( < slash code> SHOULD BE A SINGE / !!!) | ||
+ | |||
+ | |||
+ | Save. Nothing happens. This is because of the caches of the javascript. | ||
+ | To clean cache, call: https:// | ||
+ | |||
+ | |||
+ | Clean the browser-cache too (by shift-reload to force reload). | ||
+ | |||
+ | Done. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Alt: | ||
+ | |||
+ | |||
Um einen Button bei der Editpage oben hinzuzufügen: | Um einen Button bei der Editpage oben hinzuzufügen: | ||
Zeile 23: | Zeile 60: | ||
}</ | }</ | ||
Button types: | Button types: | ||
- | format | ||
- | insert | + | * format |
- | picker | + | * insert |
- | mediapopup | + | * picker |
- | signature | + | * mediapopup |
+ | * signature | ||
- | < | + | |
+ | < | ||
/* format: subscript */ | /* format: subscript */ | ||
Zeile 76: | Zeile 114: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | If anyone knows a way to insert a button instead of adding it at the end would be great… | ||
+ | |||
+ | This can be done by editing the inc/ | ||
+ | <code php> | ||
+ | | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ), | ||
+ | | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | | ||
+ | To add a button which inserts the text “Hi there”, add a new array element like so: | ||
+ | <code php> | ||
+ | | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ), | ||
+ | | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ), | ||
+ | | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | | ||
+ | Note that you can use \n for a new line… | ||
+ | |||
+ | Also note that when playing around with it, cacheing was tricky. I had to keep manually deleting the cached version of the file. | ||
+ |