KK wrote: I suppose that is what your original query was.
Unfortunately not. I need both modes.
KK wrote: I suppose that is what your original query was.
<h1><cms:show headline/></h1>
<p><cms:show text/></p>
<div class="rte"><cms:show text/></div>
trendoman wrote: How hard is it to attach a new ckeditor instance to an editable textarea with desired setting?
$FUNCS->add_event_listener( 'ckeditor_alter_config', function(&$config, $f){
$classes = explode( ' ', $f->class );
if( count($classes) ){
$arr_enter = array( 'ck-enter-p'=>'CKEDITOR.ENTER_P', 'ck-enter-br'=>'CKEDITOR.ENTER_BR', 'ck-enter-div'=>'CKEDITOR.ENTER_DIV' );
$arr_shift_enter = array( 'ck-shiftenter-p'=>'CKEDITOR.ENTER_P', 'ck-shiftenter-br'=>'CKEDITOR.ENTER_BR', 'ck-shiftenter-div'=>'CKEDITOR.ENTER_DIV' );
foreach( $classes as $class ){
if( array_key_exists($class, $arr_enter) ){
$config['enterMode'] = $arr_enter[$class];
}
if( array_key_exists($class, $arr_shift_enter) ){
$config['shiftEnterMode'] = $arr_shift_enter[$class];
}
}
}
});
<cms:editable type='richtext' name='page_summary' label='Page Summary' class='ck-enter-br' />
ck-enter-p // Default. Creates a new <p>
ck-enter-br // Breaks the line with <br>
ck-enter-div // Creates a new <div>
ck-shiftenter-p //Creates a new <p>
ck-shiftenter-br // Default. Breaks the line with <br>
ck-shiftenter-div // Creates a new <div>
KK wrote: Hope this helps. Do let me know.