How can I implement MarkDown Editor as a usercontrol ?
Good morning,
I'm trying to get up the markdown editor as a user control and use it in the umbraco backend, the thing is I've used 'MarkItUp' in visual studio to have this editor available in my web and I can't found anything to carry on with the idea, I know umbraco has a tool that do what I want, but I need to create it from scratch so , any suggestion ?
Thanks jeroen for your quickly answer, but I mentioned it, I know there is a package done , but I need to do it from scratch, I know is a bit weird but I need it.
protected override void OnInit(EventArgs e) { var skin = new Literal { Text = "<link href=\"/scripts/markitup/skins/simple/style.css\" type=\"text/css\" rel=\"stylesheet\" />" }; var set = new Literal { Text = "<link href=\"/scripts/markitup/sets/markdown/style.css\" type=\"text/css\" rel=\"stylesheet\" />" };
How can I implement MarkDown Editor as a usercontrol ?
Good morning,
I'm trying to get up the markdown editor as a user control and use it in the umbraco backend, the thing is I've used 'MarkItUp' in visual studio to have this editor available in my web and I can't found anything to carry on with the idea, I know umbraco has a tool that do what I want, but I need to create it from scratch so , any suggestion ?
Cheers,
Alejandro.
Before you try to create it yourself did you have a look at the Markdown Editor package? Sounds like it's what you're looking for.
Jeroen
Thanks jeroen for your quickly answer, but I mentioned it, I know there is a package done , but I need to do it from scratch, I know is a bit weird but I need it.
Cheers,
Alejandro.
The source code is available here so if you want to start from scratch you can use that as an example: https://markdown4umb.codeplex.com/
Jeroen
Thanks jeroen , I'll have a look on this, anyway I'm still open to suggestions.
Cheers,
Alejandro.
I could solve it but I forget to post my solution maybe is useful for someone:
I've use MarkItUp to get this out, this is my usercontrol:
<asp:TextBox ID="TextBox1" TextMode="MultiLine" CssClass="markItUp" runat="server"></asp:TextBox>
<!-- markItUp! -->
<script type="text/javascript" src="/scripts/markitup/jquery.markitup.js"></script>
<!-- markItUp! toolbar settings -->
<script type="text/javascript" src="/scripts/markitup/sets/markdown/set.js"></script>
<script type="text/javascript">
$(function () {
$('.markItUp').markItUp(mySettings);
});
</script>
and this is the .acsx.cs file :
protected override void OnInit(EventArgs e)
{
var skin = new Literal { Text = "<link href=\"/scripts/markitup/skins/simple/style.css\" type=\"text/css\" rel=\"stylesheet\" />" };
var set = new Literal { Text = "<link href=\"/scripts/markitup/sets/markdown/style.css\" type=\"text/css\" rel=\"stylesheet\" />" };
Page.Header.Controls.Add(skin);
Page.Header.Controls.Add(set);
}
public object value
{
get
{
return TextBox1.Text;
}
set
{
if (value != null)
{
TextBox1.Text = value.ToString();
}
}
Thanks.
is working on a reply...