Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this plugin doesn't work on bootstrap v3.3.7 #6

Open
ghost opened this issue May 9, 2017 · 8 comments
Open

this plugin doesn't work on bootstrap v3.3.7 #6

ghost opened this issue May 9, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented May 9, 2017

when i test on example with bootstrap 3.0.3 is work fine .
but when i change bootstrap vertion to 3.3.7 plugin does not work ! and get me this error
`HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy

summernote.js (line 869)`

how can i fix it ?

@heyanlong
Copy link
Owner

@Djary Wait...

@heyanlong
Copy link
Owner

@Djary you use summernote.js version?

@ghost
Copy link
Author

ghost commented May 10, 2017 via email

@heyanlong
Copy link
Owner

heyanlong commented May 10, 2017

im example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>summernote</title>
    <!-- include jquery -->
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>

    <!-- include libraries BS3 -->
    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
    <script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"/>

    <!-- include google-code-prettify -->

    <link rel="stylesheet" href="http://cdn.bootcss.com/prettify/r298/prettify.min.css"/>
    <script type="text/javascript" src="http://cdn.bootcss.com/prettify/r298/prettify.min.js"></script>

    <!-- include summernote -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/summernote/0.8.3/summernote.css">
    <script type="text/javascript" src="http://cdn.bootcss.com/summernote/0.8.3/summernote.min.js"></script>
    <script type="text/javascript" src="../src/summernote-ext-highlight.js"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $('.summernote').summernote({
                height: 200,
                tabsize: 2,
                prettifyHtml: false,
                toolbar: [
                    ['highlight', ['highlight']]
                ],
                lang: 'zh-CN'
            });

            $('.preview-btn').click(function () {
                $('#preview-box').html($('.summernote').summernote('code'));
                $('.summernote').code('');
                prettyPrint();
            });
        });

    </script>
</head>
<body>
<div class="container">
    <p>1 check insert code button</p>
    <p>2 enter the code fragment to editor</p>
    <p>3 check preview button</p>
<textarea class="summernote"><pre class="prettyprint"><code class="language-php">public function index() {
    return 'Hello world';
}</code></pre>
</textarea>
    <hr>
    <button class="btn btn-success preview-btn">preview</button>
    <hr>
    <div id="preview-box">

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

@ghost
Copy link
Author

ghost commented May 14, 2017

where is the problem ?

https://jsfiddle.net/8mmb5z8d/ bootstrap 3.0.3 work fine

https://jsfiddle.net/8mmb5z8d/1/ with bootstrap 3.3.7 and editor doesn't work with plugin

@heyanlong
Copy link
Owner

@Djary jsfiddle code cannot be run

@shaunfreeman
Copy link
Contributor

This is still a problem with bootstrap 3.3.7
JS Fiddle link:
https://jsfiddle.net/8mmb5z8d/2/

Have you any idea whats going wrong?
It would be nice if we could have a fix for this or any idea how to fix it?

heyanlong pushed a commit that referenced this issue Sep 17, 2017
shaunfreeman added a commit to shaunfreeman/summernote-ext-highlight that referenced this issue Sep 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants