How to CKEditor In HTML Page using JavaScript

CKEditor is a rich web text editor, which can be used inside your HTML web pages. This HTML text editor allows many of the powerful editing functions found on desktop editors like Microsoft Word to your web. This is featured with many advantages like preparing your mail content, creating your blogs and so on. This post also explains. You may also like How to create text editor in textarea using jquery and Tinymce full featured text editor

HTML and JavaScript Code

<html>
    <head>
        <script src="//cdn.ckeditor.com/4.9.1/standard/ckeditor.js"></script>
        <script type="text/javascript">
            document.addEventListener('DOMContentLoaded', function ()
            {
                CKEDITOR.replace('text_editor');
            });
        </script>
    </head>
    <body>
        <div id="wrapper">

            <div id="editor_div">
                <form method="post" action="display_text.php">
                    <textarea id="text_editor"  name="text_editor"></textarea>
                    <input type="submit" name="get_text" value="SUBMIT TEXT">
                </form>
            </div>

        </div>
    </body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *