How to Disable Editing in Summernotes?

后端 未结 3 1620
死守一世寂寞
死守一世寂寞 2021-02-13 02:46

I am using summernotes component and what I want to do is I want to stop the user from adding characters if s(he) exceeds 2000 Chars but I couldn\'t figure out how to stop typin

3条回答
  •  抹茶落季
    2021-02-13 03:48

    I know this is an old question, but you could use your container to find the next '.note-editable' and set its 'contenteditable' attribute to false. Worked for me.

    $('#summernote').next().find(".note-editable").attr("contenteditable", false);
    

提交回复
热议问题