Item13215: html4 attributes not supported by html5

pencil
Priority: Normal
Current State: Confirmed
Released In: n/a
Target Release: minor
Applies To: Engine
Component: FoswikiRender, JQTablePlugin, PatternSkin, TablePlugin, WysiwygPlugin
Branches:
Reported By: MichaelDaum
Waiting For:
Last Change By: CrawfordCurrie
Text aligning in TML tables isn't functional with a css reset of td, th { text-align:left; } as that overruled any html4 attribute. An inline css style now takes highest priority as required.

html4 html5
align="left/right/center" style="text-align:left/right/center"
valign="top/middle/bottom" style="vertical-align="top/middle/bottom"
width="50%" style="width:50%"

More at http://www.tutorialspoint.com/html5/html5_deprecated_tags.htm

-- MichaelDaum - 14 Jan 2015

This will need some adjustments in Wysiwyg as well, align / valign / width are "sticky" and prevent conversion back to TML. style is not.

distro:0718e3734f6d dealt with the same issue for the bgcolor conversion to style.

This type of change definitely needs coverage in the Translator tests.

-- GeorgeClark - 14 Jan 2015

I defered this to 1.2.1

-- MichaelDaum - 23 Mar 2015

This is not as simple as it might sound.

When converting from HTML to TML, you have to have a clear idea how TML will be rendered in order to be able to ignore certain attributes (because you know they will be applied implicitly by TML). There are several problems with this:
  • Plugins can modify the way things are rendered e.g. TablePlugin
  • HTML supports different ways of saying the same thing
  • Some editors generate attributes willy-nilly (HTML editors don't have access to linked CSS, so will sometimes be rather heavy-handed). So refusing to convert back a construct on the basis that it has a style attribute might result in nothing mapping back to TML.

We could improve things by parsing the CSS in style attributes (a limited amount of this is already done) to detect "sticky CSS" but it increases complexity significantly. Without parsing the CSS - and even with it - we are playing "whack the gopher" - every time we hit something, another problem with that fix pops up somewhere else. I really don't want to "over tune" WysiwygPlugin so it only works with TMCE.

So I'm leaving this as confirmed against WysiwygPlugin, but I'm not doing anything about it - for now.

-- Main.CrawfordCurrie - 02 Mar 2017 - 10:06
 
Topic revision: r5 - 02 Mar 2017, CrawfordCurrie - This page was cached on 14 Oct 2020 - 02:37.

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