Hi, I know this has been raised before.. probably many times, but I have read all the posts I can find and still do not have a working solution.
How can a php statement be included inside ckeditor?
I have read this article and after hours of trying still do not have anything working.
posting.php?mode=reply&f=11&t=16851
Example:
Hello <?php echo 'World'; ?>
Before ckeditor changed the php wrappers to...
Hello <!--?php echo 'World'; ?-->
But now adding to the config.js
config.protectedSource.push( /<\?[\s\S]*?\?>/g );
I can get my output displayed in the webpage, but exactly as written..
"Hello <?php echo 'World'; ?>"
The php code is not processed to show... "Hello World".
Very frustrated person.
Tue, 09/04/2012 - 08:59
#1
Re: Php inside ckeditor
Uhmm if I understood correctly, you do want to have:
in source mode:
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Almost same problem here. I
Almost same problem here. I've added in my config.js config.protectedSource.push( /<\?[\s\S]*?\?>/g ); and I can see perfect my php code inside the ckeditor (source mode) but it does not executed on the page.
<?php echo "Test"; ?> does not ouput anything.
Any ideas how I can run php code inside the editor?
I'm looking to do the same
I'm looking to do the same thing. Not as worried about the hacking part, as only admins (who could do all of the same damage) have access to the editor. So, is this possible?
I end up using iframe and a
I end up using iframe and a .php file with my code. This is the only way that it works 100%.