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;
I want to exchange RichTextBoxContents
to HTML.
I used aspose.word
, but it was demo version.
ex)
enter image description here
html wpf richtextbox
add a comment |
I want to exchange RichTextBoxContents
to HTML.
I used aspose.word
, but it was demo version.
ex)
enter image description here
html wpf richtextbox
what do you want to do? Display HTML content in your WPF application? If this is the case use aWebBrowser-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
add a comment |
I want to exchange RichTextBoxContents
to HTML.
I used aspose.word
, but it was demo version.
ex)
enter image description here
html wpf richtextbox
I want to exchange RichTextBoxContents
to HTML.
I used aspose.word
, but it was demo version.
ex)
enter image description here
html wpf richtextbox
html wpf richtextbox
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 aWebBrowser-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
add a comment |
what do you want to do? Display HTML content in your WPF application? If this is the case use aWebBrowser-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
add a comment |
1 Answer
1
active
oldest
votes
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
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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