0.5.0 • Published 2 years ago
mdmodal v0.5.0
mdModal
The mdModal library provides a modal functionality that utilizes Markdown to display content.
Acknowledgments
Special thanks to Zerodevx for creating the repository that inspired this project. The original repository, Zero-md, served as a valuable resource in the development of this modal.
How to Use
To use mdModal in your project, you can include it via a CDN or install it using npm:
CDN
<script src="https://cdn.jsdelivr.net/npm/mdModal/mdModal.js"></script>NPM
npm i mdmodalTo utilize mdModal, follow these simple steps:
- Obtain the Markdown file you wish to display, for example, a file named
ReadMe.md. - Incorporate the Markdown file into the function as shown below, specifying the language direction if necessary:
mdModal.new('ReadMe.md')Customization
Customization features on the modal
language
default: ar
mdModal.currentLanguage = "en" // dir = ltrBackground
default: #fff
mdModal.currentColor = "#000" // background will be black and it'll use dark mode themeModal Style
default: mdModal Style file
mdModal.style = "/css/style.css" will replace the design of md modalHeader
If you want to add a header to the modal, include the 'header' parameter in the function:
default: NONE
mdModal.new('ReadMe.md').header("The Header")Footer
If you want to add a footer to the modal, include the 'footer' function like this:
default: NONE
mdModal.new('ReadMe.md').footer("the footer")0.5.0
2 years ago