I want to replace some words like "php", because when I put PHP code in HTML tags the codes are hiding.
$('#editor').contents().find('<?php').replaceWith('');
or something like this:
$('#editor').contents().find('body').html().replace('<?php', '');
this is my code :
var myEditor = function(Tag){
if (document.selection){
var range = myIFrame.selection.createRange();
range.pasteHTML("<" + Tag + ">" + range + "</" + Tag + ">");
}else if(document.getSelection){
var range = myIFrame.getSelection().getRangeAt(0);
var nnode = myIFrame.createElement(Tag);
range.surroundContents(nnode);
nnode.innerHTML = range;
}
}