In FCKeditor/SOURCE, I type this
I have uncommented the lines protecting the php code in fckeditor.config.js
So, as expected, when I save the node, on the page I can see
truc
Perfect ! the php code is recognized and interpreted.
BUT:
Now I need to edit this page again.
When I open the editor, my php code appears in the WYSIWIG window and if I switch to SOURCE it became
If I save again this file, without any modification, the php code is displayed on the page and of course no longer interpreted.
If I cut this "text" in the wysiwyg window, copy it in the SOURCE window and save, the code is no longer interpreted correctly and I get a php warning.
I spent several hours looking for this. I tried adding my code as suggested in some posts, without results.
The problem does not occur when I save the page the first time but only the second time.
Any idea that could help ?
Misange
<?php $fichier="truc"; echo "$fichier"; ?>
I have uncommented the lines protecting the php code in fckeditor.config.js
So, as expected, when I save the node, on the page I can see
truc
Perfect ! the php code is recognized and interpreted.
BUT:
Now I need to edit this page again.
When I open the editor, my php code appears in the WYSIWIG window and if I switch to SOURCE it became
<?php $fichier="truc"; <br /> echo $fichier ?><br />
If I save again this file, without any modification, the php code is displayed on the page and of course no longer interpreted.
If I cut this "text" in the wysiwyg window, copy it in the SOURCE window and save, the code is no longer interpreted correctly and I get a php warning.
I spent several hours looking for this. I tried adding my code as suggested in some posts, without results.
The problem does not occur when I save the page the first time but only the second time.
Any idea that could help ?
Misange
Re: Drupal/FCKeditor and PHP code
How those of you using php code re-edit a node without problem ?
At the moment I had to deactivate FCK editor in drupal because of this whis is painful..
Misange