0.5.0 • Published 1 year ago

mdmodal v0.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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 mdmodal

To utilize mdModal, follow these simple steps:

  1. Obtain the Markdown file you wish to display, for example, a file named ReadMe.md.
  2. 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 = ltr

Background

default: #fff

mdModal.currentColor = "#000" // background will be black and it'll use dark mode theme

Modal Style

default: mdModal Style file

mdModal.style = "/css/style.css" will replace the design of md modal

Header

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

1 year ago