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

Add browser usage to README. #414

Merged
merged 1 commit into from Sep 19, 2014

Conversation

Projects
None yet
2 participants
@cirosantilli
Contributor

cirosantilli commented May 6, 2014

  • makes it clear that it is possible to embed
  • gives a copy paste for people to embed

Specially important for Node newbs like me who want want to add it to a browser =)

README.md Outdated
<title>Marked in browser</title>
<script src="lib/marked.js"></script>
<script>
document.write(marked('# Marked in browser\n\n**Rendered** by marked.'))

This comment has been minimized.

@scottgonzalez

scottgonzalez Sep 19, 2014

Contributor

I'm not sure that using document.write() is a great idea in the README.

This comment has been minimized.

@cirosantilli

cirosantilli Sep 19, 2014

Contributor

Agreed. I'll fix if we agree that a browser example should be added.

@scottgonzalez

This comment has been minimized.

Contributor

scottgonzalez commented Sep 19, 2014

Is the actual usage necessary to show sine the full API is already described? Is it not enough to simply state that marked works in browsers?

@scottgonzalez

This comment has been minimized.

Contributor

scottgonzalez commented Sep 19, 2014

Closes #367.

@cirosantilli

This comment has been minimized.

Contributor

cirosantilli commented Sep 19, 2014

The reason I came to marked is that it runs on a browser. So I felt like copy pasting an example and seeing it work.

The snippet also contains the (semi obvious) information that the file you need to source is "lib/marked.js".

But I can understand if you think it's too obvious for the readme, those things are hard to decide upon.

@scottgonzalez

This comment has been minimized.

Contributor

scottgonzalez commented Sep 19, 2014

I'm fine including a small HTML sample if it's providing value. Go ahead and update the example.

@cirosantilli cirosantilli force-pushed the cirosantilli:usage-browser branch from e792546 to 81373b3 Sep 19, 2014

@cirosantilli

This comment has been minimized.

Contributor

cirosantilli commented Sep 19, 2014

Changed example to be a minimal valid and sane document (closing tags, etc.)

@scottgonzalez

This comment has been minimized.

Contributor

scottgonzalez commented Sep 19, 2014

Thanks. That looks good to me.

scottgonzalez added a commit that referenced this pull request Sep 19, 2014

@scottgonzalez scottgonzalez merged commit 3e02a69 into markedjs:master Sep 19, 2014

@cirosantilli cirosantilli deleted the cirosantilli:usage-browser branch Sep 19, 2014

Fogetti pushed a commit to Fogetti/marked that referenced this pull request May 13, 2016

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