Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6938535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:30:21+00:00 2026-05-27T12:30:21+00:00

I have an MVC3 site that needs to handle user posts. I am trying

  • 0

I have an MVC3 site that needs to handle user posts. I am trying to use MarkItUp for the text edit because I like its full featured, easy to customize, functionality. However, I am using two markdown libraries for the conversion: Pagedown (client side), and MarkdownSharp (server side).

Here’s the scripts within my editing view:

<script type="text/javascript" src="@Url.Content("~/scripts/jquery.markitup.js")"></script>
<script type="text/javascript" src="@Url.Content("~/scripts/jquery.markitup.settings.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/Markdown.Converter.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/Markdown.Sanitizer.js")"></script>
<script type="text/javascript" >
    $(document).ready(function () {
        var converter = new Markdown.Converter();
        $('.editor').markItUp(markdownSettings);
        $('.markdown').live('keyup', function () {
        var md = $('#comment-editor').val();
        var html = converter.makeHtml(md);
        $('#preview').html(html);
    });
    $('.markdown').live('click', function () {
        var md = $('#comment-editor').val();
        var html = converter.makeHtml(md);
        $('#preview').html(html);
    });
});
</script>

And the HTML:

@Html.TextArea("html", "enter your text here", new { id = "comment-editor", @class = "editor" })
<div id="preview" class="markdown"></div>

So far so good. The issue/my question is… when I fire this up and begin typing, everything is groovy in that the preview is converting properly as I type, but Italic is not working. Whether i use the _ notation or single * notation, type or click in editor… it is not italicized.

Is there an issue between the Pagedown converter and the MarkItUp editor? Or did I noob-ishly miss something?

For clarification, here’s what the preview DIV looks like (Firebug):

<div id="preview" class="markdown">
    <p>stuff you <em>dont</em> see <em>every</em> day.</p>
</div>

Note that “dont” is marked with _ chars, and “every” with *.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:30:21+00:00Added an answer on May 27, 2026 at 12:30 pm

    What Matthew wrote is what I was getting at. It sure sounds to me like you simply have a CSS rule which is preventing the italic styling from displaying as you intend it to. There is nothing at all wrong with your Markdown implementation!

    You can fix this without affecting the rest of your site by adding an appropriate CSS rule styling <em> elements within #preview.markdown as italic.

    By the way, the reason that CSS reset scripts remove the styling is this: When you rely on browser defaults to style your content you may be tempted to use tags for their visual effect rather than for their semantic purpose. By doing this you are more likely to encounter issues when browsers interpret the presentation of those elements differently. The resets flip this around and attempt to give you a consistent blank slate within which you can write semantically-valid HTML and then style it to your liking with CSS. You can read more about this in the introduction to Eric Meyer’s reset.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assume we have an ASP.NET MVC3 Web site that makes use of Entity Framework
I have an ASP.NET MVC 3 site that makes use of a ClientDependency framework
We have an MVC3 site that uses the ASP.NET Membership Provider with Forms Authentication
I have a simple form in my MVC3 site that allows users to create
I have a MVC3 site running on IIS 7.5 that has compression enabled. The
I'm building my first MVC3 website and have connected my site to a mdf
I am working on a blog site, upgrading it to MVC3. I have this
I have a mvc3 Ajax.BeginForm. Instead of clicking on the button I would like
I have an MVC3 webapplication which runs as a DOMAIN\USER1 account. This user has
I have published an ASP.NET MVC3 site. It runs great. However, looking back at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.