【发布时间】:2018-03-06 00:46:46
【问题描述】:
我需要一个应该是的 div 1. 可调整大小和 2. 可编辑。
并且应该可以在 IE 和 Chrome 中运行。
因此,如果我开始在 div 中进行编辑,并且如果我到达该 div 中的行尾,那么光标应该移动到下一行。我如何实现它。
以下是我尝试过的代码,但它确实在 IE 中工作但不能正常工作。 但是它不适用于chrome。任何帮助,将不胜感激。谢谢!
$("#resizable").resizable();
#resizable {
width: 500px;
height: 500px;
background: #ccc;
}
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<body contenteditable="false">
<div id="resizable" contenteditable="true"></div>
【问题讨论】:
标签: jquery html css jquery-ui css-selectors