Hi,
Thanks for the answer, where should I put the code ?
Here is the HTML code for the text editor, on the submit page
#html1 :
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="//cdn.ckeditor.com/4.6.2/basic/ckeditor.js"></script>
<script type="text/javascript">
function init() {
window.onmessage = (event) => {
if (event.data == "save") {
window.parent.postMessage(CKEDITOR.instances.CK1.getData(),"*");
} else {
CKEDITOR.instances.CK1.setData(event.data);
window.parent.postMessage("set","*");
}
}
}
</script>
</head>
<body onload="init();">
<textarea placeholder ="test" name="editor1" id="CK1"></textarea>
<script>
CKEDITOR.replace("editor1");
window.parent.postMessage("ready", "*");
</script>
</body>
</html>
I want the link to be recognizable on the “content” page (as I said, it works just like a forum, there is a page to post the message, then a page to see your post.)