how to apply autojs master or jquery.asuggest in summernote editor or ckeditor

769 views Asked by At

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

please flow that link actually i need this in my summernote editor or ckeditor

[http://imankulov.github.io/asuggest/][1] OR [http://atmb4u.github.io/AutoJS/][2]

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" , "doctor" , "document"];
        $("#otTemplateValue").asuggest(suggests);

       //For Ckeditor

        var oTextbox = new AutoSuggestControl("text-area");
    }
});

}

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>

   <p><textarea id="text-area" class="ckeditor" rows="2" cols="50"> </textare></p>


            </div>
1

There are 1 answers

4
norcal johnny On

I believe this method should work on any input field. The key being

spellcheck="true" and spellcheck="false"

and for autosuggest.

autocomplete="off" and autocomplete="on"

<!-- spellcheck everything! -->
<input type="text" spellcheck="true" autocomplete="on"/><br />
<textarea spellcheck="true"></textarea>
<div contenteditable="true" spellcheck="true">I am some content</div>

<!-- spellcheck nothing! -->
<input type="text" spellcheck="false" /><br />
<textarea spellcheck="false"></textarea>
<div contenteditable="true" spellcheck="false">I am some content</div>

Keep in mind that these features can be turned off or on within a user's browser settings or 3rd party apps they chose. So nothing is 100% forcible on a visitor.