Contenteditable div vs. iframe in making a rich-text/wysiwyg editor

First of all… Don’t try to make your own WYSIWYG editor if you’re thinking about commercial use. It’s a cool idea for a personal project, because you can learn a lot, but it will take you years to create editor that you will be able to sell to someone that cares about if it really … Read more

Javascript trick for ‘paste as plain text` in execCommand

It will intercept the paste event, cancel the paste, and manually insert the text representation of the clipboard: http://jsfiddle.net/HBEzc/. This should be the most reliable: It catches all kinds of pasting (Ctrl+V, context menu, etc.) It allows you to get the clipboard data directly as text, so you don’t have to do ugly hacks to … Read more

execCommand() is now obsolete, what’s the alternative?

I created the Rich Editor for my platform’s XML (HTML5 + XHTML) editing purposes. I would not say that document.execCommand() is completely dead because some parts of it still work fine. Unfortunately the primary issue for me was that browsers use a lot of different code to generate those styles which are not recognized by … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)