Now I'm developing a plugin for IE on c # - spell check. There was a need to emphasize the wrong words in the textarea red wavy line. Standard means html, css, js can not be done (or did not think of how?). One way out is to draw programmatically. But not quite imagine how this is implemented. Maybe you have any ideas or a living experience in this issue?

    3 answers 3

    Here I found on the Internet:

     <style type="text/css"> .wavyline { background: url(wavyline.gif) repeat-x 100% 100%; padding-bottom: 2px; text-decoration: none; white-space: nowrap; } </style> <span class="wavyline">ошибок</span> 

    Link to the gif itself http://mike.mchedlishvili.me/my-includes/css/images/wavyline.gif

      Standard textarea does not allow you to superimpose extended formatting on text, and it is unlikely that this is implemented using any javascript features. There are two ways out:

      1. take a ready text editor, like TinyMCE ,
      2. use contenteditable from HTML5 ( Content editable in HTML5 ).
      • You do not understand. I am writing a plugin; it must underscore incorrectly written words with software. Plugin for IE8 (no html5). In the browser, the page is loaded, in it, for example, there is a textarea, so the plugin should emphasize the words with errors. I mentioned html, css, javascript as a variant of embedding the code into the page received from the server, but as you said, you cannot format the text in textarea using these tools. Therefore, to paraphrase the question: "How can you draw a red wavy line from c # under the wrong words in IE8? While maintaining the rendering when scrolling, etc." - likerRr

      If what you are doing is developing a plug-in for Silverlight, then you can create a text entry field inside the plugin itself (richtextbox), then you can use standard methods and control properties to extract and style text.

       textbox.Text = "Это произвольный текст"; textbox.Select(4, 12); textbox.SelectionFont = new Font(textBox.SelectionFont, FontStyle.Underline); 
      • No, development goes on pure c #. There are no controls except for those provided by Internet Explorer itself (that is, html, namely <textarea> </ textarea>)! Yes, and your implementation will emphasize the text of the usual straight line. And I need a wavy, red. - likerRr