MIF_E31211891/public/assets/static/js/pages/summernote.js

21 lines
457 B
JavaScript

$("#summernote").summernote({
tabsize: 2,
height: 120,
})
$("#hint").summernote({
height: 100,
toolbar: false,
placeholder: "type with apple, orange, watermelon and lemon",
hint: {
words: ["apple", "orange", "watermelon", "lemon"],
match: /\b(\w{1,})$/,
search: function (keyword, callback) {
callback(
$.grep(this.words, function (item) {
return item.indexOf(keyword) === 0
})
)
},
},
})