Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 06, 2013 09:15 AM by Nasser Malik
Member
13 Points
14 Posts
Feb 05, 2013 06:18 PM|LINK
Ok, guys. I have no idea how to do it so hope you will help me.
Here is my task in general: edit an artilce via HtmlEditorExtender and show it to an user (without HtmlEditorExtender of course).
So in details then:
1) I need to retreive an article info from DB.
2) Format this article via HtmlEditorExtender.
3) If something was changed during formatting save data into DB.
4) Show generated page to an user.
Is it possible? :-)
I have no clue how to display already formated by HtmlEditorExtender text without HtmlEditorExtender...
I need HtmlEditorExtender only for formattin an article.
Thank you!
Star
12536 Points
1867 Posts
Feb 05, 2013 06:29 PM|LINK
Yes this is possible.
You just make sure what ever formatting/style you applied to article in HtmlEditorExtender donot override on your page.
Feb 05, 2013 07:16 PM|LINK
If I got it right I can retreive info from DB to TextBox.
Then edit/format the content of TextBox and save it with html markup to DB.
Right?
Now how can I show this formated article to users?
Again, they should only read it.
For example, I DB column I have the text: "<b>somethingbold</b>". And now on my page i need to show (in something div for example): somethingbold.
How to do it?
Feb 06, 2013 09:15 AM|LINK
You will edit these things in admin section. Your editor would be in some div or container(div, p etc) and you have applied some css on it
Actually in our css we reset all the tags. Most probably you have done this too. This will change the default behaviour of tags.
Than we define all custom css for tags. You can put all the formatted content in a div and applied css to it. Like
<style type="text/css"> .myArticle { font-family: Tahoma; font-size: 12px; border: 1px solid black; width: 100%; } .myArticle b{font-weight:bold;} .myArticle h1{font-weight:bold; font-size:24px; padding: 5px;} </style>
and your article div would be
<div id="myArticle"> <asp:Literal runat="server" ID="ltrArticle" Text="<h1>My Heading</h1><b>somethingbold</b>"></asp:Literal> </div>
and if you didn't reset css than you dont need to define all the css for tags. Default css would apply to all the tags.
Hope it will help you
The_Immortal
Member
13 Points
14 Posts
Use HtmlEditorExtender for formatting only
Feb 05, 2013 06:18 PM|LINK
Ok, guys. I have no idea how to do it so hope you will help me.
Here is my task in general: edit an artilce via HtmlEditorExtender and show it to an user (without HtmlEditorExtender of course).
So in details then:
1) I need to retreive an article info from DB.
2) Format this article via HtmlEditorExtender.
3) If something was changed during formatting save data into DB.
4) Show generated page to an user.
Is it possible? :-)
I have no clue how to display already formated by HtmlEditorExtender text without HtmlEditorExtender...
I need HtmlEditorExtender only for formattin an article.
Thank you!
Nasser Malik
Star
12536 Points
1867 Posts
Re: Use HtmlEditorExtender for formatting only
Feb 05, 2013 06:29 PM|LINK
Yes this is possible.
You just make sure what ever formatting/style you applied to article in HtmlEditorExtender donot override on your page.
Skype: maleknasser1
The_Immortal
Member
13 Points
14 Posts
Re: Use HtmlEditorExtender for formatting only
Feb 05, 2013 07:16 PM|LINK
If I got it right I can retreive info from DB to TextBox.
Then edit/format the content of TextBox and save it with html markup to DB.
Right?
Now how can I show this formated article to users?
Again, they should only read it.
For example, I DB column I have the text: "<b>somethingbold</b>". And now on my page i need to show (in something div for example): somethingbold.
How to do it?
Nasser Malik
Star
12536 Points
1867 Posts
Re: Use HtmlEditorExtender for formatting only
Feb 06, 2013 09:15 AM|LINK
You will edit these things in admin section. Your editor would be in some div or container(div, p etc) and you have applied some css on it
Actually in our css we reset all the tags. Most probably you have done this too. This will change the default behaviour of tags.
Than we define all custom css for tags. You can put all the formatted content in a div and applied css to it. Like
<style type="text/css"> .myArticle { font-family: Tahoma; font-size: 12px; border: 1px solid black; width: 100%; } .myArticle b{font-weight:bold;} .myArticle h1{font-weight:bold; font-size:24px; padding: 5px;} </style>and your article div would be
<div id="myArticle"> <asp:Literal runat="server" ID="ltrArticle" Text="<h1>My Heading</h1><b>somethingbold</b>"></asp:Literal> </div>and if you didn't reset css than you dont need to define all the css for tags. Default css would apply to all the tags.
Hope it will help you
Skype: maleknasser1