I am using FCKEditor 1.0.
I am trying to put a PHP escape in the both sides of the selection. Why doesnt it work. I think the insertHTML() function only inserts HTML tags ... is that right ? Is there anothey way to do this ?
objContent.DOM.selection.createRange().insertHtml(nota);
consider that I'am working on js/fck_actions.js.
Thanks !
I am trying to put a PHP escape in the both sides of the selection. Why doesnt it work. I think the insertHTML() function only inserts HTML tags ... is that right ? Is there anothey way to do this ?
var nota = "<? pfpinfo(); ?>";
objContent.DOM.selection.createRange().insertHtml(nota);
consider that I'am working on js/fck_actions.js.
Thanks !
RE: Automatic PHP inserts
RE: Automatic PHP inserts
Well ... I created a new button on toolbar, that inserts(should insert) a php comment like <?//NRP?>. This is a mark for the parser that runs on my application. When I submit the form, the parser take out these PHP's comment. The problem is that I am using the insertHtml() function to insert this PHP comment in the text and it doesnt works. But when I tried to use insertHtml('<p>Hello</p>'), works fine. The question is: Is there any function that inserts any string in the cursor position on "source HTML" ? Thanks Very much for your help. Sorry for my amazing English ! :)
RE: Automatic PHP inserts
objContent.DOM.selection.createRange().pasteHTML(html) ;
This function belongs to the html editing object build by Microsoft. So, I really don't know what this functions can do. But I think the name pasteHTML isn't choosen for nothing, so use it only for HTML.
A sollution to paste PHP into the editor isn't know by me. You can try pasteText, instead of pasteHTML, maybe that will work.
Good luck!