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

Add global config feature #14

Merged
merged 5 commits into from
Apr 21, 2019
Merged

Add global config feature #14

merged 5 commits into from
Apr 21, 2019

Conversation

zerodevx
Copy link
Owner

Referencing #12, this PR adds ability to set global configs that apply to all instances of zero-md in the document. To use, set the ZeroMd.config global with the respective overrides before importing the element definition.

For example, to set custom themes,

<head>
  ...
  <script>
    var ZeroMd = {};
    ZeroMd.config = {
      cssUrls: ['my-theme-one.css', 'my-theme-two.css']
    };
  </script>
  <script src="https://cdn.jsdelivr.net/gh/zerodevx/zero-md@1/src/zero-md.min.js"></script>
  ...
</head>

@zerodevx zerodevx merged commit 57d3c68 into master Apr 21, 2019
@zerodevx zerodevx deleted the feature/global-config branch October 6, 2020 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant