Hi,
I am looking to modify the html code of the TinyMCE editor for inserting images.
By default, the code of the image tag with the TinyMCE editor is of the type:
<img src="assets/images/image.jpg" alt="test" title="test" width="280" height="158" />
I would like the html code written by the TinyMCE editor to be:
<amp-img class="respons-loader" src="assets/images/image.jpg" alt="test" title="test" width="280" height="158" />
<img class="responsive" src="assets/images/image.jpg" alt="test" title="test">
</amp-img>
Comparing we see that it is necessary:
1) Add "amp-" before "img":
so instead of having the opening of the image tag "<img" we would get "<amp-img"
2) Add the class I named: "respons-loader":
so we would get
<amp-img class ="respons-loader" src ="assets/images/image.jpg" alt ="test" width="280" height="158"/>
3) And finally add the following two lines of code:
<img class="responsive" src="assets/images/image.jpg" alt ="test" title ="test">
</Amp-img>
Regards