This isn’t the way shortcode works. When you use shortcode it isn’t processed in the editor, it is processed when someone views the page.
It sounds like what you really want is to add a custom button to TinyMCE and from there the user can select a table template (or whatever) that gets insert into the editor.
Here are some good resources for this:
Related Posts:
- How to manually fix the WordPress gallery code using PHP in functions.php?
- Encode text string being appended as query to URL [closed]
- How do I use Shortcodes inside of HTML tags?
- WordPress Shortcode and Dynamic CSS
- Display a text message if the shortcode is not found?
- Run shortcode at certain resolution
- How to create shortcodes that pull custom field data from general settings
- post meta value as shortcode parameter
- How to protect own PHP code from WordPress updates
- Creating a WordPress shortcode
- the_title() & the_content() are retrieving Post details inside a Page, after calling a shortcode
- Get list of shortcodes from content
- Audio tags around Mp3 URL in content
- Loading page template into shortcode
- How to add Shortcode (font awesome) in widget title?
- has_shortcode() – how to detect nested shortcode
- Wrap each shortcode in array to div
- Placing the_content inside shortcode not working
- Put php variable in shortcode
- Autogenerate shortcodes from an array of strings
- Placing raw HTML inside a WordPress shortcode
- How do I add text in a shortcode?
- How to Insert Shortcodes into Theme?
- Template part inside shortcode, unexpected reult
- Shortcode Inside Class Not Working
- Shortcode API: How to get name that matched shortcode RegEx?
- Shortcode content filter?
- Custom Theme, Custom shortcode not working
- Why is file_get_contents returning page source?
- Plugin CSS not enqueing
- Showing content from one page on another
- Create own WordPress shortcode gallery
- Get value from shortcode to do something
- Custom shortcode outputs plain text instead of HTML at top of post
- How to use wp_add_inline_style for custom CSS added via shortcode?
- Embedding PHP in shortcode $content
- Shortcode with PHP issue “Undefined index”
- Excecuting php function in shortcode
- Returning data instead of echoing/printing
- List taxonomy term slugs within shortcode (do_shortcode)
- Is There A Way To Make Theme Files Accept Shortcodes?
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- Create a WordPress shortcode using PHP [duplicate]
- do_action(), iFrame Gets Displayed Despite Password Protection [closed]
- Using Shortcode to Grab Archive Listing, Separate by Year
- calling a custom field value inside functions.php
- Using ob_start and ob_get_clean with wordpress shortcode
- List all blogs, but exclude the main site
- Shortcode to pull posts
- PHP code inside Shortcode
- Help Fallback (thumbnail)
- How to return a string that has a jQuery and Ajax inside in a shortcode?
- Action Hook Inside WordPress Plugin Shortcode
- How can I include the user id inside of a shortcode php output?
- PHP Helper Class to create shortcodes
- Change Spaces to Dashes?
- how to get sentence values from wordpress shortcode parameter?
- Updating Metadata with Shortcode
- using shortcodes inside gravity forms
- How to Create custom block for displaying information in content section which act like shortcode
- Create shortcode for metabox gallery
- couldnt show short code atts in category
- Time Stamp In A WordPress Post Title That Does Not Keep Refreshing
- Advanced Custom Forms PHP formatting for do_shortcode
- overwrite wordpress gallery with custom gallery shortcode
- How to use Contact Form 7 shortcode value in a page?
- How can I create a shortcode from an html and php code written together
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- CPT in a shortcode
- PHP/CSS: Shortcode won’t display correctly, and only displays in the head (before content)
- Show products per shortcode
- Open/closed function [closed]
- What is wrong with this shortcode? to include external php file in WordPress posts
- Need to Echo A Url path to show on a wordpress page
- WordPress Shortcode based on other shortcode
- Force ‘permanent’ post cache of shortcode results
- Wrapping shortcode content in a span or link
- Formatting Shortcode to Display in Visual Mode
- How to pass parameter that ends up being part of a class name with wordpress shortcode
- Overwriting a Shortcode
- Where to place PHP for shortcodes
- How to wrap a text with shortcode into php file?
- PHP Widget and do_shortcode
- Shortcode not passing variable to included file
- A next page function with shortcode?
- using a shortcode in a hyperlink
- Display Current Time using shortcode
- How to create shortcode of this PHP code
- WP Custom tables query
- Display total count of products in orders of a specific order status
- Display terms on product page with shotrcode
- Redirect loop upon installation of my plugin
- Custom plugin with shortcode not working
- How to edit a widget code?
- Adding a css class to the gallery
- Strip and print only the numbers found in current’s post excerpt (even if they are without space)
- Woocomerce custom add to cart button edit functionality [closed]
- I have a php function with a shortcode to add share buttons, but I’m having an error!
- Nav Menu Short code Not working When non Login
- How to make this shortcode not refresh the whole page when i use it on frontend