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. Web Development
  3. JavaScript
  4. converting html into plaintext

converting html into plaintext

Scheduled Pinned Locked Moved JavaScript
htmlhelptutorial
3 Posts 3 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.
  • M Offline
    M Offline
    MalarGayu
    wrote on last edited by
    #1

    hi friends i need to know how to convert html contents into plain text. these html contents are from the ajax editor. any help would be of great benefit to me. K.Gayathri

    R S 2 Replies Last reply
    0
    • M MalarGayu

      hi friends i need to know how to convert html contents into plain text. these html contents are from the ajax editor. any help would be of great benefit to me. K.Gayathri

      R Offline
      R Offline
      R Giskard Reventlov
      wrote on last edited by
      #2

      sTART here[^].

      "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair. nils illegitimus carborundum me, me, me

      1 Reply Last reply
      0
      • M MalarGayu

        hi friends i need to know how to convert html contents into plain text. these html contents are from the ajax editor. any help would be of great benefit to me. K.Gayathri

        S Offline
        S Offline
        sovanM
        wrote on last edited by
        #3

        Here is a sample code to accept the value(HTML) from a text field and gives the Plain text out of it: function Check(){ var pattern = new RegExp("<(.|\\n)*?>","g"); //alert(pattern); alert(document.formName.fieldName.value.replace(pattern,"")); } The HTML Portion :

        String :

        Text field can be replaced by reading the HTML content from .html file also. INPUT: My html page Hello world OUTPUT : My html page Hello world HTH

        Sovan

        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