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

Open
shobuz707 opened this Issue Dec 11, 2016 · 2 comments

Projects

None yet

2 participants

@shobuz707
shobuz707 commented Dec 11, 2016 edited

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>
@StudioJunkyard
StudioJunkyard commented Dec 11, 2016 edited

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.

@StudioJunkyard

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