question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

We should document how to check if Summernote already initialized

See original GitHub issue

I didn’t see any docs that lets a user know if a DOM element (e.g. textarea/input) already has summernote initialized on it. So I had to dig some and find that if I call $(el).data() and check if it has a layoutInfo object, then it is already initialized with summernote. Is there a better way to approach this and/or can we document this more for others?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
chiptoecommented, May 5, 2017

I just check class of textarea successor. Is there better way?

if ($textarea.next('.note-editor').length === 0) {
    $textarea.summernote(<your-options>);
}
0reactions
jonathandscommented, May 22, 2018

Don’t know if I’m reoppening this, but the code


if ($textarea.next('.note-editor').length === 0) {
    $textarea.summernote(<your-options>);
}

Conflicts with the .note-codable element inside summernote

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deep dive - Summernote
You can programmatically determine if the Summernote is in Fullscreen mode by using isFullscreen , which will return true or false .
Read more >
How to change options for Summernote after it is initialized?
Option 1: Destroy and reinitialize the note using the destroy method and then re-initializing it. Note, You'll probably need to remember to save ......
Read more >
JavaScript · Bootstrap
If you include plugins individually, make sure to check for these dependencies in the docs. Also note that all plugins depend on jQuery...
Read more >
How to add Summernote Editor in webpage ? - GeeksforGeeks
In this article, we will know about the Summernote Editor & its usage along ... Now in the <body> tag, initialize the summernote...
Read more >
how to initialize value in summernote editor - Laracasts
hii guys i want to initialize value of summernote when i click button then ... to do it here is my code $(document).ready(function()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found