Advertisement
kotvalera83

вузиву

Mar 4th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
  2. <script>
  3. window.onload = function () {
  4. var body = document.body;
  5. var limit = 0;
  6.  
  7. for (var i = 0; i < limit; i ++) {
  8. var textarea = document.createElement ("textarea");
  9. textarea.style.height = "100px";
  10. textarea.style.width = "100%";
  11.  
  12. body.appendChild (textarea);
  13. }
  14.  
  15. // The magic
  16. body.addEventListener ("click", function (event) {
  17. var target = event.target;
  18.  
  19. if (target.nodeName === "TEXTAREA") {
  20. var area = new nicEditor ({fullPanel : true}).panelInstance (target);
  21.  
  22. area.addEvent ("blur", function () {
  23. this.removeInstance (target);
  24. });
  25. }
  26. }, false);
  27. }
  28. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement