Remove Html head and body tags from ckeditor source


If you do not want to have, <html> , <head> </head> </head> , <body> </body> tags in CKEditor's source code then you must set Full Page as false in the configuration javaScript file.

Go to CKEditor folder and open config.js file, Add the following line config.fullPage = false;

/**
 * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md or http://ckeditor.com/license
 */

CKEDITOR.editorConfig = function( config ) {

	 config.fullPage = false;

};

Now when you load CKEditor you would find that there are no HTML, head or body tags!







Author Info:

Rakesh (He/Him) has a Masters Degree in Computer Science with over 15+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright Code2care© 2024 | Privacy Policy | About Us | Contact Us | Search