javascript - Enable resize for div inside contenteditable div -


i have div contenteditable set true. want enable resize div inside contenteditable div.

in example html insert works fine how make inserted html div resizable?

code:

function inserthtml() {     var sel = document.selection;     if (sel) {         var textrange = sel.createrange();         document.execcommand('inserthtml', false, "<div><img src='https://www.google.com/images/srpr/logo11w.png'  height='42' width='42'></div>");         textrange.collapse(false);         textrange.select();     } else {         document.execcommand('inserthtml', false, "<div><img src='https://www.google.com/images/srpr/logo11w.png'  height='42' width='42'></div>");     } } 

fiddle: http://jsfiddle.net/q6q05f1b/


Comments

Popular posts from this blog

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -