Я пытаюсь инициализировать jquery интерфейс изменяемого размера для contenteditable div, но затем я не могу редактировать содержимое пустого div
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> </head> <body> <link href="https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" /> <script src="https://code.jquery.com/jquery-3.1.0.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <div style="width: 100%; height: 100px;" contenteditable=true></div> <script> $('div').resizable() </script> </body> </html>
https://jsbin.com/wakowes
Добавьте тег к пустому элементу div, и тогда он будет работать
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> </head> <body> <link href="https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" /> <script src="https://code.jquery.com/jquery-3.1.0.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <div style="width: 100%; height: 100px;" contenteditable=true> </div> <script> $('div').resizable() </script> </body> </html>
https://jsbin.com/dulelox