i added this to my config to protect all kind of code inside [foo][/foo] (tags for all kind of languages, php, java and so on)
when i now paste something like
and then switch from source view back to normal view and back to source view i get:
i do not EVER want ckeditor to kill all my formatting inside the tags. it makes unreadble source code
thanks for heling.
config.protectedSource.push( %\[.*\].*\[/.*\]%i );
when i now paste something like
[php]
/**
* Implements hook_entity_info().
*/
function wysiwyg_entity_info() {
$types['wysiwyg_profile'] = array(
'label' => t('Wysiwyg profile'),
'base table' => 'wysiwyg',
'controller class' => 'WysiwygProfileController',
'fieldable' => FALSE,
// When loading all entities, DrupalDefaultEntityController::load() ignores
// its static cache. Therefore, wysiwyg_profile_load_all() implements a
// custom static cache.
'static cache' => FALSE,
'entity keys' => array(
'id' => 'format',
),
);
return $types;
}
[/php]
and then switch from source view back to normal view and back to source view i get:
[php]
/** * Implements hook_entity_info(). */ function wysiwyg_entity_info() { $types['wysiwyg_profile'] = array( 'label' => t('Wysiwyg profile'), 'base table' => 'wysiwyg', 'controller class' => 'WysiwygProfileController', 'fieldable' => FALSE, // When loading all entities, DrupalDefaultEntityController::load() ignores // its static cache. Therefore, wysiwyg_profile_load_all() implements a // custom static cache. 'static cache' => FALSE, 'entity keys' => array( 'id' => 'format', ), ); return $types; }
[/php]
i do not EVER want ckeditor to kill all my formatting inside the tags. it makes unreadble source code
thanks for heling.

Re: Preserver source code formatting in protected source
Re: Preserver source code formatting in protected source