Ticket #9055 (closed Bug: invalid)

Opened 2 years ago

Last modified 2 years ago

CKEDITOR.config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP Code

Reported by: shantanubhattacharya@… Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description

Hello,

I am using CKEditor from the Hero Framework available at www.heroframework.com .

I tried putting this as the last line of the config.js file of the \ckeditor\_source\core directory.

After changing the config.js file, I restart the CKEditor by restarting the file publishing URL by logging out and logging back in.

I enter the following code in the editor:

{php_code}{literal}<?php

print "Hello, world!";

?>{/literal}{/php_code}

It changes to:

<p>

{php_code}{literal}<!--?php

print "Hello, world!";

?-->{/literal}{/php_code}</p>

Can you help me to overcome this problem?

Regards SB

Change History

comment:1 in reply to: ↑ description Changed 2 years ago by shantanubhattacharya@…

Replying to shantanubhattacharya@…:

Forgot to put the code that I put in the CKEditor:

CKEDITOR.config.protectedSource.push( /<\?[\s\S]*?\?>/g ); PHP Code

Hello,

I am using CKEditor from the Hero Framework available at www.heroframework.com .

I tried putting this as the last line of the config.js file of the \ckeditor\_source\core directory.

After changing the config.js file, I restart the CKEditor by restarting the file publishing URL by logging out and logging back in.

I enter the following code in the editor:

{php_code}{literal}<?php

print "Hello, world!";

?>{/literal}{/php_code}

It changes to:

<p>

{php_code}{literal}<!--?php

print "Hello, world!";

?-->{/literal}{/php_code}</p>

Can you help me to overcome this problem?

Regards SB

comment:2 Changed 2 years ago by j.swiderski

  • Status changed from new to closed
  • Resolution set to invalid

You should put this code in config file like shown below:

CKEDITOR.editorConfig = function( config )
{
	config.protectedSource.push( /<\?[\s\S]*?\?>/g ); 



For the future
Please note that the CKEditor development website is not the right place for support requests.

Please refer to the following article for information on where to get support for all issues related to CKEditor: http://docs.cksource.com/CKEditor_3.x/Howto/Support

Also try using our forums for advice: http://cksource.com/forums/

If you are looking for professional assistance, the CKEditor development team is available via a dedicated support channel that is included in all our commercial licenses: http://ckeditor.com/license

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy