How can I use clippy to copy an iframe embed code without the iframe displaying
I have an embed code that users will use to display content hosted on my website on their own site (e.g. <iframe src="mysite/feed"></iframe>
).
I want to use clippy to allow them to copy the embed code to their clipboard but in firefox this results in the iframe actually getting embedded in the page beside the clippy icon.
My site is written in PHP and I'm also using jquery.
Is there any way of escaping the embed cod开发者_Go百科e so that it doesn't get embedded in my page but still copies to the clipboard correctly for the user?
Chrome is behaving correctly and not displaying the iframe, not tested in ie.
In order to display the html you'll have to convert some characters to their entities 'less than' and 'greater than' on that line.
<iframe src="mysite/feed"></iframe>
This is the output of the above text:
<iframe src="mysite/feed"></iframe>
精彩评论