we are trying to create a basic system for us. Where we want to create shortcode like [gallery id="1"] we have created this way of shortcodes.
But when it comes between content like:
<h1>Some Title</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer purus purus, scelerisque ut ex non, pharetra interdum tellus. Aenean sed libero a ipsum vestibulum feugiat quis quis magna. Mauris a condimentum mi, et feugiat leo.</p>
[gallery id="1"]
This is how my template looks like from editor. How can i read the perticular [gallery id="1"] and make it a function like this
gallery(1).
Is there any way i can do this? What i am using here is WYSIWYG editor and data is saved in MySQL database.