WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. bookchiq
    Member
    Posted 1 year 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.

    http://wordpress.org/extend/plugins/shortcodes-ui/

  2. Bainternet
    Member
    Plugin Author

    Posted 1 year ago #

    fixed on 1.8.5

    thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic