This question has been answered by donshakespeare. See the first response.
No one uses tinymce-4.3.4-pl Extra anymore, it is dead!
It has 321,105,984 billion downloads, because that particular version came out when dinosaurs used to deliver mail, and when people still scratched their backs with bones.
And also that number is so huge, because people still mistakenly click on the download button thinking it is TinyMCE.
[[*content:cuteLazyImages]]
<?php $content = $input; $dom = new DOMDocument(); $dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8')); //added encoding $imgs = $dom->getElementsByTagName('img'); foreach ( $imgs as $img) { $src = $img->getAttribute('src'); $img->setAttribute('data-original', $src); $img->setAttribute('src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII'); } return $dom->saveHTML();
<?php $content = $input; $content = $modx->newObject('modChunk')->process(null, $content ); //parse those Link tags $dom = new DOMDocument(); //etc etc
You need to parse MODX tags first:
<!--?php $content = $input; $content = $modx--->newObject('modChunk')->process(null, $content ); //parse those Link tags $dom = new DOMDocument(); //etc etc