How to include WYSIWYG text editor in an HTML usin

2019-05-30 17:52发布

问题:

This is just a simple html page and I only need to have a WYSIWYG text editor on it so the admin can simply add a content on the site.

I tried to include a WYSIWYG text editor in my Web page using google script, However when I am trying to run it, it will on show a textarea it will not include the editing tool/icons.

Here's the code I tried:

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="robots" content="noindex, nofollow">
    <title>Classic editor with default styles</title>
    <script src="http://cdn.ckeditor.com/4.6.2/standard-all/ckeditor.js"></script>
</head>

<body>

    <textarea cols="80" id="editor1" name="editor1" rows="10" >
    </textarea>

    <script>
        CKEDITOR.replace( 'editor1', {
            height: 260,
            width: 700,
        } );
    </script>
</body>

</html>

The out put should be like this

However, when I try to run it with google script this is the output

回答1:

As written here,

"Active" content like scripts, external stylesheets, and XmlHttpRequests must be loaded over HTTPS, not HTTP.