I have problem with tinymce in wordpress. I need to put inside tinymce element . In tinymce editor where are two tabs “Visual” and “HTML”. When I use my code in “HTML” its works. But when I want to use in “Visual” its not working…
I was trying like this:
JavaScript
function insert_tag(text){
var cont = document.getElementById('bbp_topic_content');
cont.value += '<div>' + text + '</div>';
}
HTML
<a onclick="insert_tag('HELLO')" >Insert text</a>
Any help please ?
You may try this
Also use
return
in youra
tagReference.