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

Console error: kv-Summernote is not a function in jQuery #19

Open
2 tasks
startmd opened this issue Aug 28, 2023 · 0 comments
Open
2 tasks

Console error: kv-Summernote is not a function in jQuery #19

startmd opened this issue Aug 28, 2023 · 0 comments

Comments

@startmd
Copy link

startmd commented Aug 28, 2023

Prerequisites

  • [done] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • [yes ] The issue still exists against the latest master branch of yii2-editors.
  • [yes ] This is not an usage question. I confirm having read the widget documentation and demos.
  • [yes] This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
  • [yes ] This is not a source plugin (summernote) issue. (Those should be directed to the plugin issues repo).
  • [yes ] I have attempted to find the simplest possible steps to reproduce the issue.

Steps to reproduce the issue

  1. Used Yii2-Advance-Project Template along with Kartik Gii, Kartik Widgets and Kartik Editors
  2. Tried to use Summernote in the following way:
    <?= $form->field($model, 'long_description')->widget(Summernote::class, [ 'useKrajeePresets'=>true, 'options'=>[ 'rows'=>15 ] ]); ?>
  3. Getting the following error in browser console:
    Uncaught TypeError: jQuery(...).kvSummernote is not a function at HTMLDocument.<anonymous> (index.php?r=image-post%2Fcreate:1067:39) at e (jquery.min.js:2:30038) at t (jquery.min.js:2:30340)
    The js files are all loaded aptly, here is a snippet:
<script src="/mermaid/backend/web/assets/2f27bcb2/yii.js"></script>
<script src="/mermaid/backend/web/assets/2f27bcb2/yii.activeForm.js"></script>
<script src="/mermaid/backend/web/assets/6a5a6c2b/js/bootstrap.bundle.js"></script>
<script src="/mermaid/backend/web/assets/a1fa85fd/js/activeform.js"></script>
<script src="/mermaid/backend/web/assets/2f27bcb2/yii.validation.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.1/codemirror.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.61.1/mode/xml/xml.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/2.36.0/formatting.js"></script>
<script src="/mermaid/backend/web/assets/a8446441/js/kv-codemirror.js"></script>
<script src="//cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.js"></script>
<script src="/mermaid/backend/web/assets/a8446441/js/kv-summernote.js"></script>
<script src="/mermaid/backend/web/assets/cfc9aeea/js/kv-widgets.js"></script>
<script src="/mermaid/backend/web/assets/594fff17/js/form.js"></script>
<script src="/mermaid/backend/web/vendor/jquery/jquery.min.js"></script>
<script src="/mermaid/backend/web/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/mermaid/backend/web/vendor/jquery-easing/jquery.easing.min.js"></script>
<script src="/mermaid/backend/web/js/sb-admin-2.min.js"></script>
<script src="/mermaid/backend/web/vendor/chart.js/Chart.min.js"></script>
<script src="/mermaid/backend/web/assets/7b3fe00c/dist/js/bootstrap.bundle.js"></script>

Expected behavior and actual behavior

When I follow those steps, I see simple textarea

I was expecting a summernote area with toolbar

Environment

Browsers

  • Google Chrome

Operating System

  • Windows

Libraries

  • jQuery version:
  • yii2-editors version: dev-master
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

1 participant