Hacker News new | past | comments | ask | show | jobs | submit login

You could build a nicer WYSIWYG Wiki interface with one line: contenteditable="on" without any libraries.

Here's my take. WYSIWYG, AJAX, and no libraries in two lines:

    <iframe src="javascript:unescape('%3Cbody%20contentEditable%3E')" style="width: 500px; height: 500px"></iframe>
    <button onclick="var x=new XMLHttpRequest;x.open('POST','/update',1);x.setRequestHeader('Content-type','application/x-www-form-urlencoded');x.send(frames[0].innerHTML)">Save</button>
On JSBin: http://jsbin.com/ebiju3 (don't try saving, there's no server part here!)



Have you actually tried using ContentEditable in a production system? If so, I think you'd withdraw your comment.

It's hairball.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: