From 8f2c39fda7406ecc56465834c2ad5255950a2055 Mon Sep 17 00:00:00 2001 From: Mats Mikkel Rummelhoff Date: Thu, 28 Mar 2024 15:21:32 +0100 Subject: [PATCH] Fix README --- README.md | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/README.md b/README.md index bfd4c08..8f013d2 100644 --- a/README.md +++ b/README.md @@ -23,26 +23,6 @@ This plugin requires Craft CMS 5.0+ Retcon uses PHP's native [DOMDocument](http://php.net/manual/en/class.domdocument.php) class to parse and modify HTML. Additionally, [Masterminds' HTML5 library](https://github.com/Masterminds/html5-php) is used for HTML5 support, and Symfony's [DomCrawler](https://symfony.com/doc/3.3/components/dom_crawler.html) and [CssSelector](https://symfony.com/doc/3.3/components/css_selector.html) components are used to enable the powerful jQuery-like selector syntax. -## Changes in Retcon 2.x - -Retcon 2.x is almost completely backwards compatible with Retcon 1.x. These are the big changes: - -* Symfony's [DomCrawler](https://symfony.com/doc/3.3/components/dom_crawler.html) and [CssSelector](https://symfony.com/doc/3.3/components/css_selector.html) components have been added for _much_ more powerful selector capabilities (almost all CSS selectors work). Retcon is basically jQuery now! **Note: all existing selectors in your code will still work, if you're upgrading from Retcon 1.x.** - -* Retcon now has full HTML5 support, courtesy of [Masterminds](https://github.com/Masterminds/html5-php). - -* The `autoAlt` method now uses the Asset's native `alt` (Craft 4 only) or `title` attributes for the `alt` attribute, if Retcon is fed HTML with Craft CMS [reference tags](https://docs.craftcms.com/v2/reference-tags.html) (typically, content from a Redactor or CKEditor field). - -* The `transform`, `lazy` and `srcset` now takes an optional `$selector` parameter (`'img'` by default) - -* The `lazy` method has new default values for its `$className` and `$attributeName` parameters. The new defaults are `'lazyload'` and `'src'` (i.e. `'data-src'`). This change is done to mirror the defaults in the popular [lazysizes](https://github.com/aFarkas/lazysizes) library. - -* The new `removeEmpty` method removes empty nodes (i.e., nodes that have no text content). Those pesky clients hitting Enter again and again won't know what hit them. - -* The `replace` method has been removed. So sorry, it just didn't belong... - -* A new `dimensions` filter has been added, which can add missing `width` and `height` attributes to image nodes (Retcon 2.7+). - ## Basic usage Retcon exposes a series of different [methods](#methods) for modifying HTML. Most methods take a `selector` parameter (i.e. the selector(s) for the elements you want to modify, e.g. `'img'`, `'p'` or `'div.foobar'`), and some take additional parameters for further configuration.