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. html editor

html editor

Scheduled Pinned Locked Moved C#
csharphtmlwpfwinformsquestion
8 Posts 4 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
    MemberDotNetting
    wrote on last edited by
    #1

    how can I insert an html editor in a windows forms or wpf thank you in advance

    L M 2 Replies Last reply
    0
    • M MemberDotNetting

      how can I insert an html editor in a windows forms or wpf thank you in advance

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See my answer below.

      Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

      B 1 Reply Last reply
      0
      • M MemberDotNetting

        how can I insert an html editor in a windows forms or wpf thank you in advance

        M Offline
        M Offline
        Montasser Ben Ouhida
        wrote on last edited by
        #3

        Hi, My idea is converting an RTF document to HTML because the rich text control offers the RTF output result. 1)You can use this article to create an advanced rich text box: RicherTextBox 2)To convert the RTF result, you can use the

        "SautinSoft.RtfToHtml"

        . For the trial version you can convert over 30000 words :^)

        private string GetHtmlText(string strRtfText)
        {
        if (string.IsNullOrEmpty(strRtfText)) return "";

                string result = "";
        
                #region Version SautinSoft
        
                SautinSoft.RtfToHtml r = new SautinSoft.RtfToHtml();
                //this property is necessary only for registered version
                //r.Serial = "XXXXXXXXXXXXX";
        
                //specify some options
                r.OutputFormat = SautinSoft.RtfToHtml.eOutputFormat.HTML\_5;// SautinSoft.eOutputFormat.XHTML\_10;
                r.Encoding = SautinSoft.RtfToHtml.eEncoding.UTF\_8;// SautinSoft.eEncoding.UTF\_8;
        
                //specify image options
                r.ImageStyle.ImageFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\\\TempFiles";      //this folder must exist
                r.ImageStyle.ImageSubFolder = "webs";   //this folder will be created by the component
                r.ImageStyle.ImageFileName = "picture"; //template name for images
                r.ImageStyle.IncludeImageInHtml = true;//false - save images on HDD, true - save images inside HTML
        
        
                result = r.ConvertString(strRtfText);
        
                #endregion
        
                return result;
            }
        
        M B 2 Replies Last reply
        0
        • M Montasser Ben Ouhida

          Hi, My idea is converting an RTF document to HTML because the rich text control offers the RTF output result. 1)You can use this article to create an advanced rich text box: RicherTextBox 2)To convert the RTF result, you can use the

          "SautinSoft.RtfToHtml"

          . For the trial version you can convert over 30000 words :^)

          private string GetHtmlText(string strRtfText)
          {
          if (string.IsNullOrEmpty(strRtfText)) return "";

                  string result = "";
          
                  #region Version SautinSoft
          
                  SautinSoft.RtfToHtml r = new SautinSoft.RtfToHtml();
                  //this property is necessary only for registered version
                  //r.Serial = "XXXXXXXXXXXXX";
          
                  //specify some options
                  r.OutputFormat = SautinSoft.RtfToHtml.eOutputFormat.HTML\_5;// SautinSoft.eOutputFormat.XHTML\_10;
                  r.Encoding = SautinSoft.RtfToHtml.eEncoding.UTF\_8;// SautinSoft.eEncoding.UTF\_8;
          
                  //specify image options
                  r.ImageStyle.ImageFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\\\TempFiles";      //this folder must exist
                  r.ImageStyle.ImageSubFolder = "webs";   //this folder will be created by the component
                  r.ImageStyle.ImageFileName = "picture"; //template name for images
                  r.ImageStyle.IncludeImageInHtml = true;//false - save images on HDD, true - save images inside HTML
          
          
                  result = r.ConvertString(strRtfText);
          
                  #endregion
          
                  return result;
              }
          
          M Offline
          M Offline
          MemberDotNetting
          wrote on last edited by
          #4

          I will try thank you, thank you

          1 Reply Last reply
          0
          • L Lost User

            See my answer below.

            Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

            B Offline
            B Offline
            BillWoodruff
            wrote on last edited by
            #5

            Richard MacCutchan wrote:

            See my answer below.

            Did you intend to leave out an answer here ? thanks, Bill

            "Every two days we create as much information as we did from the dawn of civilization up until 2003". Eric Schmidt of Google.

            L 1 Reply Last reply
            0
            • M Montasser Ben Ouhida

              Hi, My idea is converting an RTF document to HTML because the rich text control offers the RTF output result. 1)You can use this article to create an advanced rich text box: RicherTextBox 2)To convert the RTF result, you can use the

              "SautinSoft.RtfToHtml"

              . For the trial version you can convert over 30000 words :^)

              private string GetHtmlText(string strRtfText)
              {
              if (string.IsNullOrEmpty(strRtfText)) return "";

                      string result = "";
              
                      #region Version SautinSoft
              
                      SautinSoft.RtfToHtml r = new SautinSoft.RtfToHtml();
                      //this property is necessary only for registered version
                      //r.Serial = "XXXXXXXXXXXXX";
              
                      //specify some options
                      r.OutputFormat = SautinSoft.RtfToHtml.eOutputFormat.HTML\_5;// SautinSoft.eOutputFormat.XHTML\_10;
                      r.Encoding = SautinSoft.RtfToHtml.eEncoding.UTF\_8;// SautinSoft.eEncoding.UTF\_8;
              
                      //specify image options
                      r.ImageStyle.ImageFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\\\TempFiles";      //this folder must exist
                      r.ImageStyle.ImageSubFolder = "webs";   //this folder will be created by the component
                      r.ImageStyle.ImageFileName = "picture"; //template name for images
                      r.ImageStyle.IncludeImageInHtml = true;//false - save images on HDD, true - save images inside HTML
              
              
                      result = r.ConvertString(strRtfText);
              
                      #endregion
              
                      return result;
                  }
              
              B Offline
              B Offline
              BillWoodruff
              wrote on last edited by
              #6

              fyi: SautinSoft RTF=>HTML full version which can handle > 30k words is a US $239 component, on SautinSoft's web-site. Has the OP searched here on CP for RTF to HTML conversion ? On StackOverFlow, on Google, for other free controls ? best, Bill

              "Every two days we create as much information as we did from the dawn of civilization up until 2003". Eric Schmidt of Google.

              M 1 Reply Last reply
              0
              • B BillWoodruff

                Richard MacCutchan wrote:

                See my answer below.

                Did you intend to leave out an answer here ? thanks, Bill

                "Every two days we create as much information as we did from the dawn of civilization up until 2003". Eric Schmidt of Google.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                No, I was referring to my answer to OP's earlier question below this one.

                Unrequited desire is character building. OriginalGriff I'm sitting here giving you a standing ovation - Len Goodman

                1 Reply Last reply
                0
                • B BillWoodruff

                  fyi: SautinSoft RTF=>HTML full version which can handle > 30k words is a US $239 component, on SautinSoft's web-site. Has the OP searched here on CP for RTF to HTML conversion ? On StackOverFlow, on Google, for other free controls ? best, Bill

                  "Every two days we create as much information as we did from the dawn of civilization up until 2003". Eric Schmidt of Google.

                  M Offline
                  M Offline
                  Montasser Ben Ouhida
                  wrote on last edited by
                  #8

                  Hi all, I found an article contains an other solution: Zeta HTML Edit Control[^] enjoy :)

                  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