Support » Plugin: Custom Post Types and Custom Fields creator - WCK » Removing P tag forn the wysiwyg editor

Viewing 1 replies (of 1 total)
  • Plugin Author Cristian Antohe

    (@sareiodata)

    Hi, please try with small piece of code. Create a new plugin with it or add it to your theme’s functions.php file.

    //add_action('admin_head', 'wck_custom_ckeditor_settings');
    function wck_custom_ckeditor_settings(){
       ?>
    <script type="text/javascript">
        jQuery( function(){
    	if ( typeof (CKEDITOR ) != "undefined" ) {
    	    // don't strip tags and html classes
                //CKEDITOR.config.allowedContent = true;
                CKEDITOR.config.enterMode : CKEDITOR.ENTER_BR,
                CKEDITOR.config.shiftEnterMode: CKEDITOR.ENTER_P
            }
    	});
    </script>
    <?php
    }

    Now you’ll get BR tags instead of P and if you press Shift+Enter you’ll then get a paragraph.

Viewing 1 replies (of 1 total)
  • The topic ‘Removing P tag forn the wysiwyg editor’ is closed to new replies.