Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. WebBrowser Selected [modified]

WebBrowser Selected [modified]

Scheduled Pinned Locked Moved C#
htmlquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jammmie999
    wrote on last edited by
    #1

    Hi Guys. I am working on a HTML editor. How do I retrieve the code from the selected element. e.g. The user selects some text on the HTML editor, how do I retrieve the code

    p> the selected text /p>

    Thank you

    modified on Thursday, May 28, 2009 6:32 AM

    M 1 Reply Last reply
    0
    • J jammmie999

      Hi Guys. I am working on a HTML editor. How do I retrieve the code from the selected element. e.g. The user selects some text on the HTML editor, how do I retrieve the code

      p> the selected text /p>

      Thank you

      modified on Thursday, May 28, 2009 6:32 AM

      M Offline
      M Offline
      molesworth
      wrote on last edited by
      #2

      ... maybe "whateverYourEditControlIsCalled.SelectedText" ?

      There are three kinds of people in the world - those who can count and those who can't...

      J 1 Reply Last reply
      0
      • M molesworth

        ... maybe "whateverYourEditControlIsCalled.SelectedText" ?

        There are three kinds of people in the world - those who can count and those who can't...

        J Offline
        J Offline
        jammmie999
        wrote on last edited by
        #3

        A webbrowser does not support SelectedText

        M 1 Reply Last reply
        0
        • J jammmie999

          A webbrowser does not support SelectedText

          M Offline
          M Offline
          molesworth
          wrote on last edited by
          #4

          In your original post you said :-

          jammmie999 wrote:

          The user selects some text on the HTML editor

          From which I guessed meant he was selecting some text area in the editor you're writing. However, if you're looking for a way to copy text from a browser window, including the HTML formatting tags that go with it, then I'm not too sure about that, as it's not an area I've looked at. I think (but may be wrong) that using drag and drop you might be able to specify that you want to keep HTML formatting. Possibly paste operations can do something similar.

          There are three kinds of people in the world - those who can count and those who can't...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups