DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:jdraw

jDraw Plugin

Compatible with DokuWiki

2011-05-25b

plugin Create and edit diagrams in the browser using a Java Applet. The plug-in also features off-line diagram editor.

Last updated on
2012-02-09
Provides
Syntax

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to draw, svgedit

Tagged with applet, diagram, images, java, media

This plugin was derived from the draw plug-in.

jDraw plug-in homepage contains additional information, including detailed installation and configuration instructions. It is strongly recommended to follow instructions on the plug-in home page as they are more complete and up to date!

Download and Installation

Download and install the plugin using the Plugin Manager using the URL (http://www.hammurapi.com/products/jdraw/jdraw.zip) given above. Refer to Plugins on how to install plugins manually.

You should manually add mxe text/xml to dokuwiki/conf/mime.conf file.

Syntax and Usage

DokuWiki Syntax:

{{jdraw>[namespace:]name}}

Examples:

{{jdraw>mynamespace:mydiagram}}
{{jdraw>mydiagram}}

Permissions

It should be noted that this plugin, to be enabled on a wiki page requires at least a Delete permission on the page/namespace.

* Added by Liran Tal

* Added by HK (20121213): I can confirm that displaying also works for read only groups (tested with Adora Belle). The “edit” button is not shown for the read only groups. There exists one group with “upload” permissions on the namespace (besides admin with delete rights).

Bug Reports

  1. The plugin doesn't load the saved .mxe file due to a typo of the .mxe filename, edit line 103 and replace $name with $namespace
    1. Which file is this in? I haven't been able to find where to make the change. By just removing the &isNew=yes from the URL, I'm able to load old files. And it seems like the code that controls this is in lib/plugins/jdraw/syntax.php between lines 100 - 102, but changing that $name with $namespace doesn't do the trick.

* Added by Liran Tal

  1. Seems the solution is easy, you just need to add in your page
    ~~NOCACHE~~

    in order to prevent caching and with this trick you can edit the page without problem. (Added by Luc Patiny)

    1. This trick worked for me. Thanks. (Andreone 20110322)

* Added by Pekka Savolainen

  1. I love this plugin, however there are currently bug which renders it unusable. With certain diagrams (large enough) if i try modify them browser throws error:

Could not load diagram com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceExeption: Invalid byte 2 of 3-byte UTF-8 sequence.

  • However i can save them ok in first place, problem occurs when i try reopen them later.
  • Figured reason: You cant use any “ä”, “ö” like letters in diagram, it crashes it. This could be nice if it will be fixed :)

* Added by Martijn B.

  1. See post above by Pekka Savolainen. If you get this error and you have direct access to the server, you can open the .mxe file that is in data/media with a text editor (Notepad / PSPad / … ) and save it utf8 encoded. That way you can get your work back.
  2. Seems that the the plugin saves the .mxe files as ANSI

* Added by HK (20121213) I'm currently running a test-setup on windows localhost with xampp. Using the plugin gives me several “notices” in the editing window, but editing and saving etc. seems to work without any problems. The notices are:

 Notice: Use of undefined constant AUTH_DELETE - assumed 'AUTH_DELETE' in C:\xampp\htdocs\dokuwiki\lib\plugins\jdraw\jdraw.php on line 11
 Notice: Undefined index: HTTPS in C:\xampp\htdocs\dokuwiki\lib\plugins\jdraw\jdraw.php on line 12
 Notice: Undefined variable: cookies in C:\xampp\htdocs\dokuwiki\lib\plugins\jdraw\jdraw.php on line 16

* Added by Red (20130720) I tried on both Firefox and Safari 6 using the latest Java download (7). Did the mime.conf edit and also put int the NOCACHE option as well. I am able to click on the “edit” link and open the JDraw java application and view all the tools and shapes, etc. HOWEVER, I am unable to actually insert a shape onto the drawing canvas. I tried dragging, clicking, right clicking, etc etc. Just won't work.

Feature Request

* Added by Brad White (20110228)

  1. It would be nice to be able to upload my own graphic icons.
    1. (Andreone 20110322) I second this one, it would be really cool. Even by just dropping png into a subfolder of the plugin. (Pavel Vlasov 20120208) This is implemented, instructions on how to create additional palettes are on the plugin home page.

* Added by steveg (20110503)

  1. We are looking for a way to add a button to automatically add the {{jdraw tag with a prompt for namespace:diagname but couldn't come up with a good solution. (this is using fckg). that would be fantastic! (Pavel Vlasov 20120208) This one is implemented, there is no prompt - it just inserts {{jdraw>jDrawDiagram}} text at the cursor with jDrawDiagram selected.
plugin/jdraw.txt · Last modified: 2016-01-24 19:03 by Aleksandr