Item9726: How to disable Wysiwyg from an EditTemplate.

pencil
Priority: Enhancement
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: TinyMCEPlugin
Branches:
Reported By: SvenDowideit
Waiting For:
Last Change By: CrawfordCurrie
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 smile -->'); 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 smile

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
 

ItemTemplate edit

Summary How to disable Wysiwyg from an EditTemplate.
ReportedBy SvenDowideit
Codebase 1.1.0 beta1, trunk
SVN Range
AppliesTo Extension
Component TinyMCEPlugin
Priority Enhancement
CurrentState Confirmed
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release01x01Checkins
Topic revision: r4 - 21 Jan 2015, CrawfordCurrie
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