• Resolved Sarah Lewis

    (@bookchiq)


    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.

    https://www.ads-software.com/extend/plugins/shortcodes-ui/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: ShortCodes UI] Throwing a JS error when the editor isn't present’ is closed to new replies.