Basic Syntax
Here is the syntax to integrate modal popups into your content. Write the code in your article where you want to show the plugin.
Simple Modal
{reveal text="Click Here" width="500px" height="400px"}Your HTML Contents{/reveal}
Example:
{reveal text="Click Here" width="500px" height="400px"}This is the content of the popup.{/reveal}
Modal with Custom CSS Class
{reveal text="Open Modal" class="btn btn-primary" width="600px" height="500px"}Modal Title
Your content here...
{/reveal}
Media Modal
Use type and src to let the plugin generate responsive media markup for you:
{reveal text="Watch Video" type="youtube" src="https://www.youtube.com/watch?v=VIDEO_ID" width="90%" height="80%"}{/reveal}
{reveal text="Watch Video" type="mp4" src="https://example.com/video.mp4" width="90%" height="80%"}{/reveal}
{reveal text="View Map" type="map" src="https://www.google.com/maps/embed?pb=YOUR_EMBED_CODE" width="90%" height="80%"}{/reveal}
Deep Link Modal
{reveal text="Watch Video" id="watch-video" type="mp4" src="https://example.com/video.mp4" width="90%" height="80%"}{/reveal}
When deep linking is enabled, the modal can be opened from #watch-video.
Available Parameters
- text: The text that appears as the clickable link/button (required)
- width: Modal width in pixels or percentage (default:
500px)
- height: Modal height in pixels or percentage (default:
500px)
- class: Custom CSS class to add to the trigger link (optional)
- type: Media type for generated embeds:
youtube, vimeo, mp4, video, map, googlemap, or googlemaps (optional)
- src: Media URL, video ID, or Google Maps embed URL used with
type (optional)
- id: Custom modal ID for deep linking and stable URLs (optional)
Content
Between {reveal} and {/reveal}, you can add any HTML content including:
- Text and formatted content
- Images
- Forms
- Videos (embedded iframes or generated media shortcodes)
- Lists, tables, and other HTML elements
When type and src are used, the plugin generates the media markup automatically and the modal body can be left empty.