You are here: Foswiki>Tasks Web>Item1915 (19 Mar 2011, MichaelDaum)Edit Attach

Item1915: Ask WysiwygPlugin to protect <latex> markup

pencil
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: MathModePlugin
Branches:
Reported By: MichaelTempest
Waiting For:
Last Change By: MichaelDaum
WysiwygPlugin can now protect XML-like markup, such as MathModePlugin's <latex> markup.

This is the change that is needed:

Index: Foswiki/Plugins/MathModePlugin.pm
===================================================================
--- Foswiki/Plugins/MathModePlugin.pm   (revision 4636)
+++ Foswiki/Plugins/MathModePlugin.pm   (working copy)
@@ -32,8 +32,14 @@
 ###############################################################################
 sub initPlugin {
   ($topic, $web) = @_;
-   
+
   undef $core;
+
+  # Tell WyswiygPlugin to protect <latex>...</latex> markup
+  if (defined &Foswiki::Plugins::WysiwygPlugin::addXMLTag) {
+    Foswiki::Plugins::WysiwygPlugin::addXMLTag('latex', sub { 1 } );
+  }
+
   return 1;
 }

-- MichaelTempest - 10 Aug 2009

Excellent.

-- MichaelDaum - 10 Aug 2009

The change is checked in.

I do not think any documentation needs to be updated, besides updating the version, release and change history. I assume you would like to do that (since it is your (Michael Daum's) plugin), and I don't know if you have any other changes you would want to include before releasing this plugin. I've marked this task for your attention, so that you can include this change in the change history, if you wish.

-- MichaelTempest - 10 Aug 2009

Published finally in 4.02

-- MichaelDaum - 19 Mar 2011

ItemTemplate edit

Summary Ask WysiwygPlugin to protect <latex> markup
ReportedBy MichaelTempest
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component MathModePlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins MathModePlugin:70e303719360
TargetRelease n/a
ReleasedIn n/a
Topic revision: r5 - 19 Mar 2011, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy