Create lists
Closed this issue · 5 comments
How is it possible to start a list?
Trying to create one on the demo site:
http://ionicabizau.github.io/medium-editor-markdown/
I would expect that beginning a line with '*' would work, but it doesn't.
It should work. I modified the HTML using the developer tools and this is the result:
Also, you may want to add the orderedlist
or unorderedlist
buttons.
Okay, so with the default buttons there is no way for a user to start a list?
I've successfully added the unordered list button but after typing some text then pressing the ordered list button on the third line I've typed in (without selecting any text before hand since I'm using the static toolbar) I get a <span>
in the markdown output.
Here is what my editor looks like:
Here is the markdown I've received for that:
Some text
Generally seems to work
* <span style="line-height: 1.42857143;">Add a list</span>
Instead I expect the following markdown:
Some text
Generally seems to work
* Add a list
I'm using medium-editor 4.1.1 and medium-editor-markdown 1.1.0.
Here is how I'm initializing medium-editor:
var options = { staticToolbar: true, buttons: ['bold', 'italic', 'underline', 'orderedlist', 'unorderedlist', 'anchor', 'header1', 'header2', 'quote'], extensions: { markdown: new MeMarkdown(function (receivedMarkdown) { console.log("got markdown: " + receivedMarkdown); markdown = receivedMarkdown; }), } }; var editor = new MediumEditor('.md-editable', options);
Am I missing something or is this a bug?
Yes, it's a bug. 👍
However, this is because of the to-markdown
library. We're using 0.0.3
here, but I see some recent updates and 1.0.0-rc2
.
The first step would be to upgrade to the latest version and rebuild the dist files.
@axelson Check if this issue is fixed in the to-markdown-1.2.0
branch. The demo website already uses the newest version. For reference, see #5.
After some tests, I see that the conversion is now smoother. 🌟 💫