inlineeditor.html 678 B

123456789101112131415161718192021222324252627282930
  1. <p>
  2. <button id="destroyEditors">Destroy editor</button>
  3. <button id="initEditors">Init editors</button>
  4. </p>
  5. <div id="editor-1" contenteditable="true" class="custom-class" custom-attr="foo">
  6. </div>
  7. <div id="editor-2" class="custom-class" custom-attr="foo">
  8. <h2>Editor 2</h2>
  9. <p>This is another editor instance.</p>
  10. <p>
  11. Unlike Editor 1 it doesn't have contenteditable=true initially.
  12. Check if it's editable after initializing the editors and back to non-editable after destroying them.
  13. </p>
  14. </div>
  15. <style>
  16. body {
  17. width: 10000px;
  18. height: 10000px;
  19. }
  20. .custom-class {
  21. margin-top: 100px;
  22. margin-left: 100px;
  23. margin-bottom: 100px;
  24. width: 450px;
  25. }
  26. </style>