Fix for copy-pasting formatted text to markdown area

We (@nmcalabroso) fixed the bug for pasting a formatted text to the markdown area. This PR is a fix for [#7032](https://github.com/gitlabhq/gitlabhq/pull/7032). Hoping for the feedbacks.