I am using the TinyMCE plugin to give users a way to type in HTML content and this gets saved to the database. In some cases, I would like to port this content over to the default email client on the click of a button.
Because this is HTML content, I cannot use mailto
because the only supported MIME type for it is text/plain
.
My next best option is to have a quick copy/paste for the user- perhaps, on the click of a button. TinyMCE does have this as one of the toolbar options but upon clicking it, I see the message:
Currently not supported by your browser, use keyboard shortcuts instead.
I am using the latest version of Chrome.
Is there a way for me to implement this myself using JavaScript ?
I did want to answer and let you know it is possible on other browsers with flash. You must use flash to do this. You will need to create your own button instead of the default copy/cut buttons and have it as a flash copy/cut applicatoin. Example copy/cut with flash (http://active.tutsplus.com/tutorials/actionscript/quick-tip-create-a-copy-to-clipboard-button-in-flash/)
Note: If you do implement this for tinyMCE I suggest posting it to their dev team for addition.