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 7769915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:16:39+00:00 2026-06-01T16:16:39+00:00

I downloaded markdown from http://code.google.com/p/wmd/ (well, in fact I cloned the hg repository), in

  • 0

I downloaded markdown from http://code.google.com/p/wmd/ (well, in fact I cloned the hg repository), in order to have a client-side highlighter for static text, i.e. I don’t need the editor.

However, I tried to instantiate the converter, essentially like in the demo:

  <script type="text/javascript">
  (function () {
    var conv = Markdown.getSanitizingConverter();
    var ed = new Markdown.Editor(conv);
    ed.run();
  })();
  </script>

However, if I run this, the JS error console tells me:

Error: text is undefined
Source File: http://bitmask.de/markdown_test/Markdown.Converter.js
Line: 149

Which I traced to the call of ed.run().

I put the whole minimal demo on http://bitmask.de/markdown_test/js.html

I didn’t modify the js files or anything (basically because I have very very limited js knowledge), just did what the demo does. What’s wrong here?

  • 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-06-01T16:16:40+00:00Added an answer on June 1, 2026 at 4:16 pm

    You can’t use <div> element for the input, it has to be something editable (e.g. <textarea> or <input type="text">):

    <div class="wmd-panel">
      <div id="wmd-button-bar"></div>
      <textarea id="wmd-input" class="wmd-input">`hello` *cruel* world</textarea>
    </div>
    

    Be also carefull about spaces in the HTML source. Your second sample has a line starting with more than four spaces, which means “code” in Markdown:

      <!-- this will be formated as <pre> element -->
      <textarea class="wmd-input" id="wmd-input">
      `hello` *cruel* world
      </textarea>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i downloaded a demo application from http://code.msdn.microsoft.com/Authorization-based-aa2c0185/view/SourceCode I run it on my Visual Studio
I downloaded the latest source of mod_wsgi from https://code.google.com/p/modwsgi/source/checkout , but I can’t compile
I downloaded GCC 4.5 from http://www.netgull.com/gcc/releases/gcc-4.5.0/ but when I try to setup / build
Downloaded ASE from google code, and was looking through tutorials, and available scripts. I
I downloaded MobileTerminal sources from http://mobileterminal.googlecode.com/svn . I compiled it and it works perfect
I downloaded HTTP::Daemon::SSL for Strawberry Perl 5.10 from CPAN and ran this example: use
I downloaded example code of an Android project featuring AdMob ads from here .
I downloaded and linked all the jars beginning with google-...-client and all the jars
I downloaded android source from source.android.com and followed the instruction to setup build environment
I downloaded the latest android sdk from Google and unzipped it in my home

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.