django summernote create custom buttons -


i'd add custom button similar one:

$('#makesnote').click(function(event) {  var highlight = window.getselection(),      spn = document.createelement('span'),    range = highlight.getrangeat(0)     spn.innerhtml = highlight;    spn.classname = 'snote';      spn.style.color = 'blue';     range.deletecontents();    range.insertnode(spn); }); 

js fiddle

http://jsfiddle.net/ypweuw1l/

i'm not sure how go adding django app? don't see in django-summernote docs.

i don't know django-summernote well. can create custom button , use on toolbar options.

for more details... http://summernote.org/deep-dive/#custom-button


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -