XTRUST.ORG
XTRUST.ORG

Reputation: 3392

html | Extra tabs in textarea

I'm trying to load markdown from my database to a textarea:

<textarea class="wmd-input" id="wmd-input" name="question" required="required"> 
<?php echo '**This is a header**    1. List 2. List 3. List ----------'; ?>
</textarea>
<script type="text/javascript">
    (function () {
        var qa_converter = Markdown.getSanitizingConverter();
        var qa_editor = new Markdown.Editor(qa_converter);
        qa_editor.run();
    })();
</script>

And as you can see on the picture I have broken first line (extra tabs at the beginning of string).

enter image description here

I'm using this markdown editor: https://code.google.com/p/pagedown/

Where is a problem?

Upvotes: 0

Views: 83

Answers (1)

ryu
ryu

Reputation: 312

Try writing the following in one line:

<textarea class="wmd-input" id="wmd-input" name="question" required="required"><?php echo '**This is a header**    1. List 2. List 3. List ----------'; ?></textarea>

Upvotes: 1

Related Questions