[Please describe in as much detail as possible how we can replicate this bug]
Soo, not sure if intentional or not but when copy/pasting via the clipboard, the code element wipes out some of the content. I’m seeing this mostly with SVG’s (font awesome svg’s as well as custom ones), when pasting an element that has these the svg code that lives in a HTML block goes away…
Might there be a workaround to keep it?
Here is how I’m using it:
Create section I want to re-use in the future.
Copy section to clipboard.
Paste clipboard content into custom field
Link custom field to button
Copy custom field content using clipboard.js
Paste content onto new page
Everything comes across correctly except for the SVG code.
I don’t think it’s the ACF field that’s causing the error. It looks like the content there is being saved correctly, just what is being copied to clipboard through the clipboard.js script is sanitized.
Not sure if this is what bricks is pushing via the custom field or something built into clipboard.js
The content is being pulled through an acf text field and then embedded as an attribute on a button (image attached below). When I then look at that content on the front-end (via inspecting the button and seeing the attribute-data, that data is once again missing the SVG code.
Unfortunately this is about where my development skills end, and am getting into new territory, might the attribute data be changed in any way by bricks?
It disables code from rendering, but ive now just discovered that its no longer supported… sad.
Oh well will have to be a temporary solution and bring someone onboard to code something that can copy to clipboard without rendering it (assuming its possible, unfortunately it’s beyond my dev skills). Its been replaced by the "<“pre”> and <“code”> elements in html5 but they dont support “<” characters which is preventing me from using them.