Plugin Embedover for Dokuwiki

You may want to embed external pages over Dokuwiki, and see it by clicking on the text. This can be useful by example to add some extra informations on a word, by linking with a dictionnary, a database, or whatever could add information to this word.

See plugin page on dokuwiki : https://www.dokuwiki.org/plugin:embedover

Pre-requisites

Installation

Use automatic installation from the plugin database or download.
More instructions on this page.

Usage

Embedover uses these delimiters {( and )}. You must first define the url which will be used when clicking on the keywords by using {(url:http://your.url.here/the/page.html?query=)}. Then you can use it in keywords {(keyword)} : a click on the keyword will display a popup with the url http://your.url.here/the/page.html?query=keyword.

In addition, you may want to mix several urls. You can do that with modes. The syntax is mode!. So to define a url for the mode ‘modetest’, {(url:modetest!yoururlhere)} and to use it in a keyword : {(modetest!keyword)}. Note that the url definition must take place before its first utilisation.

If you want to display another text than the keyword, you can use | as in regular dokuwiki link syntax : {(keyword|displayed text)}.

You can also specify the style of the popup displayed, as its width, or any valid css style, by using {(style: width: 400px; )}.

Example :

Note : if the page you link is on the same domain, the height will be automatically set according to the real height of the included content. This is not allowed by javascript for other domains, for security reasons.

Plugin code

syntax.php

script.js
style.css

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu