How to exchange RichTextBox Contents to HTMLWhat are valid values for the id attribute in HTML?How to horizontally center a <div>?How to change an element's class with JavaScript?Convert HTML + CSS to PDF with PHP?How to make div not larger than its contents?How to check whether a checkbox is checked in jQuery?HTML 5: Is it <br>, <br/>, or <br />?How to create an HTML button that acts like a link?How to disable resizable property of textarea?Why does HTML think “chucknorris” is a color?

Heinlein story regarding suspended animation and reading newspapers?

Gold Battle KoTH

Need help identifying how to open this bolt/screw

Accurately recalling the key - can everyone do it?

Is Norway in the Single Market?

Feedback diagram

How do I safety check that there is no light in Darkroom / Darkbag?

Export economy of Mars

How do people drown while wearing a life jacket?

Word for pulling a punch in karate

What is the most 'environmentally friendly' way to learn to fly?

Matrix condition number and reordering

Why did the United States not resort to nuclear weapons in Vietnam?

What is the reason behind water not falling from a bucket at the top of loop?

Return last number in sub-sequences in a list of integers

Windows del command not working?

What is the white camera in Thelma And Louise '91?

Can I shorten this filter, that finds disk sizes over 100G?

δόλος = deceit in John 1:47

Why are sugars in whole fruits not digested the same way sugars in juice are?

A criterion for finite abelian group to embed into a symmetric group

Does the use of a new concept require a prior definition?

A small reformulation of the Cosmological Argument

Why interlaced CRT scanning wasn't done back and forth?



How to exchange RichTextBox Contents to HTML


What are valid values for the id attribute in HTML?How to horizontally center a <div>?How to change an element's class with JavaScript?Convert HTML + CSS to PDF with PHP?How to make div not larger than its contents?How to check whether a checkbox is checked in jQuery?HTML 5: Is it <br>, <br/>, or <br />?How to create an HTML button that acts like a link?How to disable resizable property of textarea?Why does HTML think “chucknorris” is a color?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I want to exchange RichTextBoxContents to HTML.



I used aspose.word, but it was demo version.
ex)
enter image description here










share|improve this question


























  • what do you want to do? Display HTML content in your WPF application? If this is the case use a WebBrowser-Control

    – Denis Schaf
    Mar 26 at 15:34






  • 1





    No I want to save the input of RichTextBox as an html file

    – Teo
    Mar 26 at 23:42











  • Just look a bit into how HTML works and you should be able to write your own parser pretty easy just a few <p> and <h> should do the trick for something basic as a rtb

    – Denis Schaf
    Mar 27 at 5:16











  • Thanks I got a rough sense.

    – Teo
    Mar 27 at 7:54

















0















I want to exchange RichTextBoxContents to HTML.



I used aspose.word, but it was demo version.
ex)
enter image description here










share|improve this question


























  • what do you want to do? Display HTML content in your WPF application? If this is the case use a WebBrowser-Control

    – Denis Schaf
    Mar 26 at 15:34






  • 1





    No I want to save the input of RichTextBox as an html file

    – Teo
    Mar 26 at 23:42











  • Just look a bit into how HTML works and you should be able to write your own parser pretty easy just a few <p> and <h> should do the trick for something basic as a rtb

    – Denis Schaf
    Mar 27 at 5:16











  • Thanks I got a rough sense.

    – Teo
    Mar 27 at 7:54













0












0








0








I want to exchange RichTextBoxContents to HTML.



I used aspose.word, but it was demo version.
ex)
enter image description here










share|improve this question
















I want to exchange RichTextBoxContents to HTML.



I used aspose.word, but it was demo version.
ex)
enter image description here







html wpf richtextbox






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 0:22







Teo

















asked Mar 26 at 13:47









TeoTeo

12 bronze badges




12 bronze badges















  • what do you want to do? Display HTML content in your WPF application? If this is the case use a WebBrowser-Control

    – Denis Schaf
    Mar 26 at 15:34






  • 1





    No I want to save the input of RichTextBox as an html file

    – Teo
    Mar 26 at 23:42











  • Just look a bit into how HTML works and you should be able to write your own parser pretty easy just a few <p> and <h> should do the trick for something basic as a rtb

    – Denis Schaf
    Mar 27 at 5:16











  • Thanks I got a rough sense.

    – Teo
    Mar 27 at 7:54

















  • what do you want to do? Display HTML content in your WPF application? If this is the case use a WebBrowser-Control

    – Denis Schaf
    Mar 26 at 15:34






  • 1





    No I want to save the input of RichTextBox as an html file

    – Teo
    Mar 26 at 23:42











  • Just look a bit into how HTML works and you should be able to write your own parser pretty easy just a few <p> and <h> should do the trick for something basic as a rtb

    – Denis Schaf
    Mar 27 at 5:16











  • Thanks I got a rough sense.

    – Teo
    Mar 27 at 7:54
















what do you want to do? Display HTML content in your WPF application? If this is the case use a WebBrowser-Control

– Denis Schaf
Mar 26 at 15:34





what do you want to do? Display HTML content in your WPF application? If this is the case use a WebBrowser-Control

– Denis Schaf
Mar 26 at 15:34




1




1





No I want to save the input of RichTextBox as an html file

– Teo
Mar 26 at 23:42





No I want to save the input of RichTextBox as an html file

– Teo
Mar 26 at 23:42













Just look a bit into how HTML works and you should be able to write your own parser pretty easy just a few <p> and <h> should do the trick for something basic as a rtb

– Denis Schaf
Mar 27 at 5:16





Just look a bit into how HTML works and you should be able to write your own parser pretty easy just a few <p> and <h> should do the trick for something basic as a rtb

– Denis Schaf
Mar 27 at 5:16













Thanks I got a rough sense.

– Teo
Mar 27 at 7:54





Thanks I got a rough sense.

– Teo
Mar 27 at 7:54












1 Answer
1






active

oldest

votes


















0














This should guide you in a rough direction:



string output = "";
Foreach( line in richtextbox.text)

output += $"<p style="color:line.color.name;">"
output += line
ouput += "</p>";



should give you something like this:



<p style="color:red;">This is a the line content.</p>


I'm on my phone so have mercy if the syntax is a little bit off






share|improve this answer

























  • In fact, thanks to your hint, I was able to successfully code. I really appreciate it.

    – Teo
    Mar 28 at 13:02












  • Make sure to mark it as answer if this helped you!

    – Denis Schaf
    Mar 29 at 17:16










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358726%2fhow-to-exchange-richtextbox-contents-to-html%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














This should guide you in a rough direction:



string output = "";
Foreach( line in richtextbox.text)

output += $"<p style="color:line.color.name;">"
output += line
ouput += "</p>";



should give you something like this:



<p style="color:red;">This is a the line content.</p>


I'm on my phone so have mercy if the syntax is a little bit off






share|improve this answer

























  • In fact, thanks to your hint, I was able to successfully code. I really appreciate it.

    – Teo
    Mar 28 at 13:02












  • Make sure to mark it as answer if this helped you!

    – Denis Schaf
    Mar 29 at 17:16















0














This should guide you in a rough direction:



string output = "";
Foreach( line in richtextbox.text)

output += $"<p style="color:line.color.name;">"
output += line
ouput += "</p>";



should give you something like this:



<p style="color:red;">This is a the line content.</p>


I'm on my phone so have mercy if the syntax is a little bit off






share|improve this answer

























  • In fact, thanks to your hint, I was able to successfully code. I really appreciate it.

    – Teo
    Mar 28 at 13:02












  • Make sure to mark it as answer if this helped you!

    – Denis Schaf
    Mar 29 at 17:16













0












0








0







This should guide you in a rough direction:



string output = "";
Foreach( line in richtextbox.text)

output += $"<p style="color:line.color.name;">"
output += line
ouput += "</p>";



should give you something like this:



<p style="color:red;">This is a the line content.</p>


I'm on my phone so have mercy if the syntax is a little bit off






share|improve this answer













This should guide you in a rough direction:



string output = "";
Foreach( line in richtextbox.text)

output += $"<p style="color:line.color.name;">"
output += line
ouput += "</p>";



should give you something like this:



<p style="color:red;">This is a the line content.</p>


I'm on my phone so have mercy if the syntax is a little bit off







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 27 at 8:12









Denis SchafDenis Schaf

1,6161 gold badge3 silver badges10 bronze badges




1,6161 gold badge3 silver badges10 bronze badges















  • In fact, thanks to your hint, I was able to successfully code. I really appreciate it.

    – Teo
    Mar 28 at 13:02












  • Make sure to mark it as answer if this helped you!

    – Denis Schaf
    Mar 29 at 17:16

















  • In fact, thanks to your hint, I was able to successfully code. I really appreciate it.

    – Teo
    Mar 28 at 13:02












  • Make sure to mark it as answer if this helped you!

    – Denis Schaf
    Mar 29 at 17:16
















In fact, thanks to your hint, I was able to successfully code. I really appreciate it.

– Teo
Mar 28 at 13:02






In fact, thanks to your hint, I was able to successfully code. I really appreciate it.

– Teo
Mar 28 at 13:02














Make sure to mark it as answer if this helped you!

– Denis Schaf
Mar 29 at 17:16





Make sure to mark it as answer if this helped you!

– Denis Schaf
Mar 29 at 17:16








Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358726%2fhow-to-exchange-richtextbox-contents-to-html%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript