From 46526fee1bca8614974377cba496b05b306797a1 Mon Sep 17 00:00:00 2001 From: MichaelTempest Date: Sun, 28 Jun 2009 18:58:17 +0000 Subject: [PATCH] Item1778: Notify WysiwygPlugin about markup, so that it is protected in the WYSIWYG editor. git-svn-id: http://svn.foswiki.org/trunk/DirectedGraphPlugin@4316 0b4bb1d4-4e5a-0410-9cc4-b2b747904278 --- data/System/DirectedGraphPlugin.txt | 10 ++++++---- lib/Foswiki/Plugins/DirectedGraphPlugin.pm | 9 ++++++++- lib/Foswiki/Plugins/DirectedGraphPlugin/Config.spec | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/data/System/DirectedGraphPlugin.txt b/data/System/DirectedGraphPlugin.txt index 4cb469a..e9c0fcc 100644 --- a/data/System/DirectedGraphPlugin.txt +++ b/data/System/DirectedGraphPlugin.txt @@ -1,6 +1,7 @@ %META:TOPICINFO{author="ProjectContributor" date="1238965436" format="1.1" reprev="1.7" version="1.7"}% ---+!! Directed Graph Plugin + %TOC% ---++ Introduction @@ -10,7 +11,7 @@ This plugin uses [[http://www.graphviz.org/][Graphviz's]] applications to create Visit the [[http://www.graphviz.org/Gallery.php][Graphviz gallery]] to see some examples on what can be achieved with this plugin and Graphviz. Full documentation is available at http://graphviz.org/Documentation.php. -| %X% *Caution* =<dot>= syntax is not currently compatible with the WYSIWYG editor. Raw editing is recommended, or use <sticky> tags to protect the dot tags. | +| %X% *Caution* =<dot>= syntax is not compatible with versions of Foswiki:Extensions.WysiwygPlugin prior to 28 June 2009. It is recommended that you upgrade !WysiwygPlugin if you are running an older version. If that is not practical then raw editing is recommended, or use <sticky> tags to protect the dot tags. | ---+++ Attachment Handling | %X% *By default, this version of the plugin uses the Foswiki API to manipulate the attached graphs. The first user to view a topic containing a directed graph will be denied access if they do not have update permission. If defaults or DOT parameters have changed, viewing the topic may modify attachments, which will require update permission.* | @@ -18,7 +19,7 @@ Each generated file is attached to the topic using the Foswiki attachment API. T Direct file I/O results in a considerable performance improvement. Initial rendering of this topic on a test system resulted in a reduction of time to generate the attachments and initially display from 60 seconds down to approximately 8 seconds. -| %X% *Caution* The plugin will also update attached files during __Preview__. if the edit is subsequently canceled, the attachments will be regenerated again. | +| %X% *Caution* The plugin will also update attached files during __Preview__. If the edit is subsequently canceled, the attachments will be regenerated again. | The output of the <dot> command is cached as attachments to the topic. Any change to the <dot> input will result in the attachments being updated. @@ -475,8 +476,9 @@ Details on how to install cairo, graphviz and imagemagick are beyond the scope o | Home: | http://foswiki.org/Extensions/%TOPIC%Dev | | Support: | http://foswiki.org/Support/%TOPIC% | | Change History: | | -| 5 Apr 2009: | Foswikitask:Item8102 - Improve defaults, configure settings now optional --Foswiki:Main.GeorgeClar | -| 25 Mar 2009: | Foswikitask:Item1201, Foswikitask:Item1360 - Configure script fails on perl 5.10. %BR% Foswikitask:Item8086 - Direct File I/O failis. -- Foswiki:Main.GeorgeClark | +| 28 Jun 2009: | Foswikitask:Item1778 - Notify !WysiwygPlugin about <dot> markup so that it is protected in WYSIWYG editors --Foswiki:Main.MichaelTempest | +| 5 Apr 2009: | Foswikitask:Item8102 - Improve defaults, configure settings now optional --Foswiki:Main.GeorgeClark | +| 25 Mar 2009: | Foswikitask:Item1201, Foswikitask:Item1360 - Configure script fails on perl 5.10. %BR% Foswikitask:Item8086 - Direct File I/O fails. -- Foswiki:Main.GeorgeClark | | 8 Jan 2009: | Foswikitask:Item8035: Uninitialized variables reported in server Error log.-- Foswiki:Main.GeorgeClark | | 14 Dec 2008: | Foswikitask:Item8031: Port to Foswiki -- Foswiki:Main.GeorgeClark | | 11 Oct 2008: | TWikibug:Item6058: Incompatibilities with Windows, improved some error messages. --TWiki:Main.GeorgeClark | diff --git a/lib/Foswiki/Plugins/DirectedGraphPlugin.pm b/lib/Foswiki/Plugins/DirectedGraphPlugin.pm index f3231d9..63abf81 100644 --- a/lib/Foswiki/Plugins/DirectedGraphPlugin.pm +++ b/lib/Foswiki/Plugins/DirectedGraphPlugin.pm @@ -53,7 +53,7 @@ our $VERSION = '$Rev: 17659 $'; # # This is a free-form string you can use to "name" your own plugin version. # # It is *not* used by the build automation tools, but is reported as part # # of the version number in PLUGINDESCRIPTIONS. -our $RELEASE = '1.4'; +our $RELEASE = '1.5'; # # # Short description of this plugin @@ -231,6 +231,13 @@ sub initPlugin { Foswiki::Func::clearSessionValue('DGP_newhash') ; # blank slate for new attachments + # Tell WyswiygPlugin to protect ... markup + if (defined &Foswiki::Plugins::WysiwygPlugin::addXMLTag) { + # Check if addXMLTag is defined, so that DirectedGraphPlugin + # continues to work with older versions of WysiwygPlugin + Foswiki::Plugins::WysiwygPlugin::addXMLTag('dot', sub { 1 } ); + } + # Plugin correctly initialized &_writeDebug( "- Foswiki::Plugins::${pluginName}::initPlugin( $web.$topic ) initialized OK" diff --git a/lib/Foswiki/Plugins/DirectedGraphPlugin/Config.spec b/lib/Foswiki/Plugins/DirectedGraphPlugin/Config.spec index 7d172f3..8734e3d 100644 --- a/lib/Foswiki/Plugins/DirectedGraphPlugin/Config.spec +++ b/lib/Foswiki/Plugins/DirectedGraphPlugin/Config.spec @@ -9,7 +9,7 @@ $Foswiki::cfg{Plugins}{DirectedGraphPlugin}{enginePath} = ''; # **PATH** # Path to the ImageMagick convert utility.
# - This is used to support antialias output
-# (Required if GraphViz doesn't have Cario rendering support.) +# (Required if GraphViz doesn't have Cairo rendering support.) $Foswiki::cfg{Plugins}{DirectedGraphPlugin}{magickPath} = ''; # **PATH** # Path to the Foswiki tools directory .