cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
This question about Topic Markup Language and applications: Answered

WYSIWYG editor removes additional img attributes

I wanted to implement basic image zooming functionality using MojoMagnify.

It requires adding additional attribute inside <img> tag: data-magnifysrc="UrlForBigImage.jpg"

I've stumbled upon 2 issues:

1. When I add the tag in Raw Edit mode, save, works OK. But editing again removes the attribute from the <img> tag.

I suppose the case is that wysiwyg plugin is parsing the attributes during reading of the html source, but doesn't save back.

Which leads to another question:

2. How to ("for dummies version" please) modify wysiwyg plugin (or macro or whatever) to be able to add this attribute to images "automatically"?

Accepted Answer

The WysiwygPlugin "dumbs down" the HTML in an attempt to make it fit into TML (Topic Markup Language). This includes discarding unrecognisable attributes. You can discourage WysiwygPlugin from doing this to a fine degree of control, which can include individual attributes on individual tags. See the WysiwygPlugin documentation on WYSIWYG_STICKYBITS for more details. All the documentation is written by dummies.

-- CrawfordCurrie - 10 Oct 2009

Thanks, it helped! And I don't agree that documentation is written by dummies. At least not Foswiki's one smile

-- DanielKownacki - 15 Oct 2009

QuestionForm edit

Subject Topic Markup Language and applications
Extension WysiwygPlugin
Version Foswiki 1.0.6
Status Answered
Topic revision: r5 - 22 Oct 2009, AndrewJones - This page was cached on 17 Aug 2018 - 10:12.

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