Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create lists #4

Closed
axelson opened this issue Apr 2, 2015 · 5 comments · Fixed by #5
Closed

Create lists #4

axelson opened this issue Apr 2, 2015 · 5 comments · Fixed by #5
Assignees

Comments

@axelson
Copy link

axelson commented Apr 2, 2015

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.

@IonicaBizau
Copy link
Owner

It should work. I modified the HTML using the developer tools and this is the result:

image

Also, you may want to add the orderedlist or unorderedlist buttons.

@axelson
Copy link
Author

axelson commented Apr 3, 2015

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:
screenshot 2015-04-02 17 11 31

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?

@IonicaBizau IonicaBizau added the bug label Apr 3, 2015
@IonicaBizau
Copy link
Owner

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.

@IonicaBizau IonicaBizau self-assigned this May 8, 2015
@IonicaBizau
Copy link
Owner

@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.

@IonicaBizau
Copy link
Owner

After some tests, I see that the conversion is now smoother. 🌟 💫

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants