Getting selected (highlighted) html from the Visual Editor on Edit Post page?

The visual editor (TinyMCE) has its own API and since its a JavaScript Based editor you can get the selection using JavaScript very easily

tinyMCE.activeEditor.selection.getContent();

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