ShortCodes UI
[resolved] Throwing a JS error when the editor isn't present (2 posts)

  1. bookchiq
    Posted 3 years ago #

    This plugin works very well for me most of the time, but I ran into an edge-case today: I have a custom post type that specifically doesn't use the editor. However, ShortCodes UI is still trying to add a button to the editor, and as a result, there's a Javascript error (edButtons not defined).

    I was able to eliminate the error by wrapping that small section of code (lines 278-286) in an if check:

    if (\'undefined\' !== typeof edButtons) {

    Let me know if you need any more info to debug (the custom post declaration, etc.), and thanks for making this plugin available. It's been a great help in making shortcodes more useable for my clients.


  2. Bainternet
    Plugin Author

    Posted 3 years ago #

    fixed on 1.8.5


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • ShortCodes UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic