Menu

PatchesForTinyMCE

Anonymous

TinyMCE patches for running Style Library

Here I start collecting information about required patches - work in progress.

Patch related new settings are:

  • *user_css*: selects a special CSS file that defines tables, images, fonts, headings and div styles only. This is edited in Style Library and used to fill table, image class lists.
  • *align_class_left*
  • *align_class_right*
  • *align_class_center*
  • *table_altrow_class*

TODO: since align_classes can be handled by the new Formatter engine, we could try to reduce patching the mutiple-classes handling (form_utils.js and alignment settings above).

Required patches

  • utils/validate.js
    • Add isBorderWidth(), isFontSize(), isMarginWidth(), isLineHeight()
  • utils/form_utils.js
    • New addClassesToList() implemenation for user_css support.
    • getClasPart, setClassPart, getAlignDirection
  • classes/DOMUtils.js
    • getClasses() supports CSS file selection and filter to HTML tag (e.g. tables)
    • TODO: check if getDocumentColors is needed
  • classes/Editor.js
    • Visual aid must ignore whether table has border attribute (we use CSS)
  • editable_selects.js
    • Call original "onchange" of editable selects

advimage/image.htm and image.js
show IMG classes only, and link to open style library

table/table.htm and table.js
show TABLE classes only and link to style library

themes/advanced/editor_template_src.js
importClasses() to support "user_css" setting, so only Style Library font styles are shown

Optional modified plugins

layer
add class, alignment, heading support by making an insert/edit dialog box for it. Removes absolute positioning support, thus DIVs can be aligned left or right float or center, and can be styled.

Optional new plugins

clearfloat
allows adding removing clear:both to block elements for easy formatting

appendafter
adds a paragraph after the current element (sometimes it's impossible to go between two elements or write after the last element) (two tables for example)


MongoDB Logo MongoDB