Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

102
Visualizações
Uncaught TypeError: $(...).summernote is not a function is seen when trying to obtain the code from the summernote

I am trying to obtain the code from one summernote(which has loaded fine) but I am facing the error mentioned in the title. You have a code snippet here: In the body I have declare one of my summernotes like this: <div class="summernote1" name="intro_summer_note" id="intro_summer_note"></div>

Then under the script tags I am trying the following:

                   $('.summernote1').summernote({
                    placeholder: 'Write your intro',
                    tabsize: 2,
                    height: 250,
                    toolbar: [
                      ['style', ['style']],
                      ['font', ['bold', 'underline', 'clear']],
                      ['color', ['color']],
                      ['para', ['ul', 'ol', 'paragraph']],
                      ['table', ['table']],
                      ['insert', ['link', 'picture', 'video']],
                      ['view', ['fullscreen', 'codeview', 'help']]
                    ]
                  }); 

                  function submitSummerNote()
                  {
                    console.log('Entered here')
                    var markupStr = $('.summernote1').summernote('code');
                    console.log(markupStr);
                  }

I have tried the examples from the summernote page and I am getting into the exactly same issue. I have also tried updating the jQuery version. Right now I am trying the following versions for jQuery and Bootstrap: <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.js"></script>

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I think that you are messing with positioning, i've launched the code and it ran without any problem, be sure to put both Bootstrap and jQuery before your script, like:

<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.css" rel="stylesheet">  
<div class="summernote1" name="intro_summer_note" id="intro_summer_note"></div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>    
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-lite.min.js">
 </script>
<script>
    $('.summernote1').summernote({
    placeholder: 'Write your intro',
    tabsize: 2,
    height: 250,
    toolbar: [
      ['style', ['style']],
      ['font', ['bold', 'underline', 'clear']],
      ['color', ['color']],
      ['para', ['ul', 'ol', 'paragraph']],
      ['table', ['table']],
      ['insert', ['link', 'picture', 'video']],
      ['view', ['fullscreen', 'codeview', 'help']]
    ]
  }); 

  function submitSummerNote()
  {
    console.log('Entered here')
    var markupStr = $('.summernote1').summernote('code');
    console.log(markupStr);
  }
</script>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda