Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
- <script>
- window.onload = function () {
- var body = document.body;
- var limit = 0;
- for (var i = 0; i < limit; i ++) {
- var textarea = document.createElement ("textarea");
- textarea.style.height = "100px";
- textarea.style.width = "100%";
- body.appendChild (textarea);
- }
- // The magic
- body.addEventListener ("click", function (event) {
- var target = event.target;
- if (target.nodeName === "TEXTAREA") {
- var area = new nicEditor ({fullPanel : true}).panelInstance (target);
- area.addEvent ("blur", function () {
- this.removeInstance (target);
- });
- }
- }, false);
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement