vendor/assets/javascripts/parser_rules/advanced_unwrap.js in wysihtml5x-rails-0.4.4 vs vendor/assets/javascripts/parser_rules/advanced_unwrap.js in wysihtml5x-rails-0.4.5

- old
+ new

@@ -34,10 +34,11 @@ */ var wysihtml5ParserRules = { /** * CSS Class white-list * Following CSS classes won't be removed when parsed by the wysihtml5 HTML parser + * If all classes should pass "any" as classes value. Ex: "classes": "any" */ "classes": { "wysiwyg-clear-both": 1, "wysiwyg-clear-left": 1, "wysiwyg-clear-right": 1, @@ -86,11 +87,11 @@ "wysiwyg-float-left": 1, "wysiwyg-float-right": 1 }, "styles": { "float": ["left", "right"], - "textAlign": ["left", "right", "center"] + "text-align": ["left", "right", "center"] } }, "valid_image_src": { "attrs": { @@ -148,14 +149,19 @@ * The following options are available: * * - add_class: converts and deletes the given HTML4 attribute (align, clear, ...) via the given method to a css class * The following methods are implemented in wysihtml5.dom.parse: * - align_text: converts align attribute values (right/left/center/justify) to their corresponding css class "wysiwyg-text-align-*") - * <p align="center">foo</p> ... becomes ... <p> class="wysiwyg-text-align-center">foo</p> + * <p align="center">foo</p> ... becomes ... <p class="wysiwyg-text-align-center">foo</p> * - clear_br: converts clear attribute values left/right/all/both to their corresponding css class "wysiwyg-clear-*" * <br clear="all"> ... becomes ... <br class="wysiwyg-clear-both"> * - align_img: converts align attribute values (right/left) on <img> to their corresponding css class "wysiwyg-float-*" - * + * + * - add_style: converts and deletes the given HTML4 attribute (align) via the given method to a css style + * The following methods are implemented in wysihtml5.dom.parse: + * - align_text: converts align attribute values (right/left/center) to their corresponding css style) + * <p align="center">foo</p> ... becomes ... <p style="text-align:center">foo</p> + * * - remove: removes the element and its content * * - unwrap removes element but leaves content * * - rename_tag: renames the element to the given tag \ No newline at end of file