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

how to apply jquery.autocorrect or jquery.asuggest in summernote editor this jquery lib file dont work on summer note #2156

Closed
shobuz707 opened this issue Dec 11, 2016 · 2 comments

Comments

@shobuz707
Copy link

shobuz707 commented Dec 11, 2016

Note that its working fine on input type "text" or "textarea" but when applying on summernote editor its won't working

please flow that link actually i need this in my summernote editor thanks
http://imankulov.github.io/asuggest/

my js code is :

function showTemplateFrom(){

var ajaxURL = "getTemplateFromOtNote.do";
$.ajax({
url : ajaxURL,
success : function(result) {
$("#dashbordDataDiv").html(result);
}, complete:function (){

    $('.summernote').summernote({
          height: 300,                 // set editor height
          minHeight: null,             // set minimum height of editor
          maxHeight: null

        });

    $('.modal.aside').ace_aside();

    // asuggest
    var suggests = ["hello", "world"];
    $("#otTemplateValue").asuggest(suggests);
    // autocorrect
    $("#otTemplateValue").autocorrect({
        corrections: {
            ab: "about",
            doc: "doctor"
        }
    });
}

});

my html code is :

    <div class="col-xs-12">

        <label for="">OT Note Editor</label>
        <div class="summernote" id="otTemplateValue" style="z-index: -99999"></div>

    </div>
@ghost
Copy link

ghost commented Dec 11, 2016

Another option would be to install something like http://grammerly.com 's addons for Firefox or Chrome, then you wouldn't need to muck around with adjusting anything inside Summernote.

@ghost
Copy link

ghost commented Dec 11, 2016

Also, I just realised why this may not be working for you, and you pretty much answered your own question. AutoCorrect is meant for form elements that allow user input.

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