我们使用contenteditable属性进行内联编辑。
在内联编辑中,我们尝试复制&将任何内容粘贴到“HTML和CSS”本身。
例如:
在列表项中,我们尝试复制&粘贴HTMl& CSS内容本身。
<a contenteditable="true" ng-model="content" ng-paste="handlePaste($event.clipboardData.getData('text/plain'))" class="ng-pristine ng-valid ng-touched">one 1
<a ng-model="content" ng-paste="handlePaste($event.clipboardData.getData('text/plain'))" class="ng-pristine ng-untouched ng-valid" style="color: rgb(42, 100, 150); outline: -webkit-focus-ring-color auto 5px; outline-offset: -2px; background-color: rgb(255, 255, 255);">one 1</a>
</a>
我们尝试使用ng-paste =&#34; handlePaste($ event.clipboardData.getData(&#39; text / plain&#39;))&#34;避免html内容以避免HTML和CSS内容但未按预期工作的方法。
任何人都可以指导我