Table of Contents
Compatible with DokuWiki
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" unknown
- 2018-04-22 "Greebo" yes
- 2017-02-19 "Frusterick Manners" yes
(Early releases (before 1.0.3) had different download links; so if you have problems with their updating in Extension Manager, just uninstall the plugin and install it afresh.)
After you installed the plugin, the links to pages in your wiki will receive “Edit” button (appears on hover). So you would not need to click first the link to go to that page, and then to click “Edit page” there. With this new popover button you go to the editor window of that other page in one click.
See the popover button in action: Demo.
Hover the links and notice how the button size is adjusting to different font sizes.
Since version 1.1 (2018-11-17) there is correct support for:
- Multi-line links (where top-right of the first line can be different from the right corner of the bounding rectangle).
- Right-click (context menu) and Ctrl-click (open in new window). So you can easily open editing of the linked page in another tab/window, while the original link itself gets restored to its initial value.
- Best contrast & size of the underline wave on hover.
Configuration and Settings
The plugin should work out of the box. If you would like to adjust its looks for your template, then read on please.
2. The sizes of the popover buttons get adjusted with the links font sizes (
=1em). If you want to change the appearance (the size of the popover button, its color etc.), you can apply your styles, for example, in
<your dokuwiki>/conf/userstyle.css or in CSS files of your template. (For the original CSS see
<your dokuwiki>/lib/plugins/editonlink/script.js, and you can overwrite it in
<your dokuwiki>/conf/userscript.js or in JS files of your template).
3. Likewise, overwrite CSS if you like to change the animation of hovered links. (This animation is done via tiny inline SVG).
4. Buttons are automatically added to inner wiki links (CSS classes
wikilink2 – existing and non-existing pages) and to breadcrumbs (CSS class
breadcrumbs). It can be changed via CSS.
5. CSS conflicts are unlikely, but they can happen if you style the inner wiki links in your template with
:after pseudo-elements. That can conflict with the popover button. Then maybe you could change
:before, or something.
6. In order to add the popover button, the inner links get
position: relative. It might happen that you wish to give some of such links in your template
position: absolute or
position: fixed. (For example, if you use those links as dropdowns in navigation toolbars or something).
Then a conflict with this plugin can happen. To avoid it, you can, for example, remove classes
breadcrumbs from those specially positioned links; or wrap them in div's or span's and give special positioning to those instead of the links.
js (at least, in default DokuWiki template and similar). But it appears that links on the page get drawn before
<html> gets class
js set; so I just leave CSS as it is.
- 2019-02-16 v1.3.4. Split by character instead of regex.
- 2019-02-16 v1.3.3. Final polishing & Version up.
- 2019-02-15 v1.3.2. Search narrowed.
- 2019-02-15 v1.3.1. In case there could be other 'do=' parameter in wikilink, let's add search/replace.
- 2019-02-15 v1.3. Bug corrected: when nice URL rewriting is off, link parameters shouldn't be removed.
- 2018-12-12 v1.2. Some workarounds for Firefox invisibility bug.
- 2018-11-17 v1.1. Support for multiline links, ctrl-click, right-click.
- In case of multiline link, clientBoundingRect top-right might not give the correct position of the button; so I use adding another element with the same positioning on the link click, to learn the actual coordinates of the “:after” element (the button).
- Using things like ctrl-click and right-click, the user can stay on the page after clicking the link; so I restore the target link to its original href (onmouseleave).
- 2018-11-16 v1.0.5. More contrast for the hover underline wave
- 2018-11-15 v1.0.4. Underline wave style adjusted
- 2018-11-14 v1.0.3. Style & test improvements; download link changed. Uninstall and then reinstall the plugin in case you have problems upgrading via Extension Manager.
- 2018-11-14 v1.0.2. Removed hash part of the URL when going to editing
- 2018-11-14 v1.0.1. Style fix
- 2018-11-13 v1.0. Initial release
Known Bugs and Issues
To discuss bugs or issues, please use the github tracker.
Due to a bug (at least, in some versions of modern Firefox & clones), in rare cases, some elements can become (intermittently) invisible in the browser window. Apparently, this has nothing to do with this plugin.
Q. Would buttons added to all those links slow down the page?
A. Not at all. In general, there are several reasons why pages can get slower with plugins and other bells and whistles:
- Loading larger contents. In this case, the plugin is very tiny (about 3 kb non gzipped).
- Loading of additional files. For example, if a page requests additional pictures, you need to wait while the request to the server gets there and back. It can slow the page rendering indeed, therefore DokuWiki transforms small pictures into inline CSS (encoded text in CSS), which wouldn't require additional requests. In this plugin, the pictures are already inline CSS – no delay whatsoever.
- CSS styling takes some (small) time, so the more CSS, the slower the page. However, modern browsers are very fast in applying the same styles to many elements; so even if there are hundreds of links on your page, I doubt you could notice any difference.
Conclusion: this plugin just couldn't have any noticeable effect on the performance.
If the link contains a parameter – like “this:page?do=something”, then the button click replaces that parameter with “?do=edit” (for the moment of clicking; then the link gets restored to its original URL). The point is, by this button you go to edit a “core” address, with any additional parameters stripped. I believe it's how the editing works anyway.
An interesting development could be to show a little popup menu when clicking that button. (It would be painted by JS, only by the click, thus having no influence on the speed of the page).