Releases: GetmeUK/ContentTools
More HTML copy & paste fixes/improvements
This release fixes and issue where pasting inline content would force inline elements to be stripped and text to be placed across multiple paragraphs.
Fixes
- Fix for #452 where thead was (re)inserted at the end of the table rather than at the start when using the table tool (thanks to @ccqgithub for the report).
- Fix for #469 additional HTML big fixes, spans are now removed from copied in content and styles applied are no longer being inserted within the page content on paste.
Additional fixes for HTML Copy and Paste
- Fixes issue #463 where pasting HTML into fixtures would fail (thanks to @a-komarev for the report).
- Fixes issue #467 where passive save calls (typically used for autosave) would blur the currently focused element (thanks to @darksnake747 for the report).
- Improved the cleansing of deeper HTML structures which previously meant copy/paste of deeper structures (for example div > div > p) would result in nothing being pasted.
Fix for copy > paste issue with plain text
Thanks to @evromalarkey for reporting the bug initially (#458), this release resolves the issue.
HTML copy & paste support
HTML copy and paste of HTML content is now supported.
Sanitising HTML and ensuring that what ends up in the page is safe (especially when copying in from Word docs) isn't a small task, we've spent a couple of weeks testing this across a number of sites and it feels stable - but there's bound to be cases we've missed, please flag issues (with instructions/resources to reproduce) and we'll address them as a priority.
Fix for empty paragraphs not being removed on save
This release only resolves a single issue (#398) where if you save the document with an empty text element selected that element wont be removed from the output (the region HTML typically saved). To resolve this I now blur any focused element on save which triggers the default blur behaviour for an element (which for empty text elements is to remove themselves).
Bug fixes and a couple of new events
Bug fixes (both reported by @capr 👍)
- #444 Fixed issue where attempting to save a empty content fixture (e.g Text element) caused the editor to crash.
- #443 Fixed issue where the
_domRegion
attribute against the editor became out of sync with fixtures on init, save and revert.
New features
- The editor now supports
started
andstopped
events (to complement thestart/stop
events).
Removed an erroneous console.log
1.5.4 merge
Upgraded to ContentEdit 1.3.1
1.5.3 Upgrade to CE
Updated link tool to support fixed content
This upgrade makes it easier to manage fixed editable buttons within your content. For example if our content contains the following HTML:
<a
data-ce-tag="p"
data-fixture
data-name="my-button"
href="/test"
class="button"
>
CLICK HERE!!!
</a>
Pre 1.5.0 this would have been mostly pointless because you wouldn't have been able to modify the HREF attribute, in 1.5.0 it became possible to edit the HREF using the tag inspector, and this little release means you can edit the HREF using the standard link tool which is a more user friendly approach.