dokuwiki_plugin_wrap icon indicating copy to clipboard operation
dokuwiki_plugin_wrap copied to clipboard

Add possibility to incorporate overwriting <box>es

Open selfthinker opened this issue 13 years ago • 0 comments

It might be a good idea give the possibilty to overwrite existing <box>es [https://www.dokuwiki.org/plugin:box] and make them compatible to the wrap plugin boxes. That would have the advantage that it would make it easier for people using the box plugin to convert to the wrap plugin. The same is true for the note plugin [https://www.dokuwiki.org/plugin:note]. As the wrap plugin shouldn't conflict with the box plugin by default, it should only be done when a configuration option is set.

There are four difficulties though:

  1. The classes "round", "left" and "right" exist in both plugins, so will be easy to take over. But the classes "blue", "red", "green" und "orange" don't exist in the wrap plugin (or at least not anymore). I wouldn't want to take over those less semantic classes. I would rather "swallow" those classes and just use the default "box" class instead.
  2. The box plugin uses a "colours" option with which you can set various colours either through their hex or rgb notation. I wouldn't want to implement those either. Users needing that functionality should rather use the block plugin.
  3. The concept of title and caption doesn't exist in the wrap plugin. I'm not quite sure what to do with those... On the one hand I can imagine that people find it useful and use it quite often, on the other hand I can imagine they only exist because headings in syntax plugins weren't possible at the time the plugin was written.
  4. It might confused users that <box> = <WRAP box> and <note> = <WRAP info>. They are not really equivalent. That also means the wrap plugin can nearly completely replace boxes and notes, but it doesn't work the other way around. So, you wouldn't be able to use <box tip>.

So, here are some ideas how to solve the title/caption issue:

  • Use box title as a normal heading (or, even better, the wrap-specific "emulated heading") above the text within the box and box caption as a normal paragraph below the text within box.
  • Swallow them as well. (I never liked how the title/caption are not part of the content of the box although they should be.)
  • Or replace the title but not the caption. (While I was searching for wikis using the box plugin, I found from about 100 boxes, only maybe 3 were using captions, but about 42 were using titles.)

selfthinker avatar Aug 19 '12 11:08 selfthinker