Item9726: How to disable Wysiwyg from an EditTemplate.
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: n/a
NOWYSIWYG
is a setting on an individual topic
HOWEVER I just noted that if you make a simplistic topic based
EditTemplate, even if there's no textarea for wysiwyg to prettify, we're loading tinymce.js
so... how should an Edit template tell wysiwyg to not happen?
this also seems to cause tinymce.js to fall over - which is also bad.
(yes, I'm making an
EditTemplate to use svg-edit for
WikiDrawPlugin)
--
SvenDowideit - 21 Sep 2010
Options:
- Use a macro (JQREQUIRE) to require WYSIWYG into the page, put it in a TMPL:DEF in
foswiki.tmpl
which is TMPL:P'd in edit.tmpl
which can be overridden by skin authors
-
Foswiki::Func::setPreferencesValue('NOWYSIWYG', '1')
in your earlyInitPlugin (to avoid pluginsorder issues)
-
Foswiki::Func::addToZone('script', 'TinyMCEPlugin', '<!-- nothing
-->');
to override the TinyMCEPlugin's script markup with a nop (from initPlugin or later, to avoid pluginsorder issues, but W comes after T so you should be okay
It's a bit lame, but I'm working on it, hopefully in svn any week now (draft editor api, which btw I hope
WikiDrawPlugin could one day use it to implement an editor for svg content type)...
--
PaulHarvey - 21 Sep 2010
The main point of a common EditorAPI - including for non-text content types - is being able to switch between different editors on the fly, and provide a common framework that is applicable to editing content (which turns about to be not-so-unify-able, but useless abstractions are a hobby of mine)
--
PaulHarvey - 21 Sep 2010