Hi,
I would like to copy my CKeditor content into my Clioboard. When i select with my mouse the whole text and make ctrl+c then ctrl+v into word or outlook. It works fine.
However when i use a javascript function to replace ctrl+c by a simple click. I also copy into the clipboard the html code like <br>, <strong>, therefore it's isn't what i want. I've spent hours to find a way to make it, but it was without sucess.
Here is parts of my code:
function copyToClipboardModif(){
if (window.clipboardData) {
CKEDITOR.instances.titre.updateElement();
var message = CKEDITOR.instances.titre.getData();
window.clipboardData.setData("Text", message);
}
}
<textarea name="titre" id="titre" class="ckeditor" rows="2" cols="75">Titre sugere par la BDD </textarea> <br/>
<a onclick="copyToClipboardModif();" href="#">Copier le titre</a> <br/>
Looking forward to find some help here.
Thanks in advance.
PS: Sorry but english isn't my native language. Hello from France ;)