XF 1.5 Parse images when dynamically changing the content of the WYSIWYG editor

ungovernable

Active member
I use this code to set the content of the WYSIWYG editor based on the $_GET['content'] value

Code:
<script>
var parts = window.location.search.substr(1).split("&");
var $_GET = {};
for (var i = 0; i < parts.length; i++) {
var temp = parts.split("=");
$_GET[decodeURIComponent(temp[0])] = decodeURIComponent(temp[1]);
}

document.getElementById("ctrl_message_html").value = $_GET['content'];
</script>

This URL:
Code:
/create-thread/?content=[IMG]test.png[/IMG]

Will set the content of the editor with the code above. But how can I parse the real image in the editor instead of just the code?

Thanks
 
Top Bottom