mukhortov / HESH-WordPress-Plugin

WordPress plugin that adds syntax highlighting to the Post/Page HTML editor
61 stars 17 forks source link

js error when custom post type does not support 'editor' feature #62

Closed Tymvie closed 6 years ago

Tymvie commented 6 years ago

Hello, I registered a custom post type:

function create_post_type() {
  register_post_type( 'acme_product',
    array(
      'labels' => array(
        'name' => __( 'Products' ),
        'singular_name' => __( 'Product' )
      ),
      'public' => true,
      'has_archive' => true,
      'supports' => array( 'title' )
    )
  );
}
add_action( 'init', 'create_post_type' );

and saw this in the console:

Uncaught TypeError: Cannot read property 'value' of null
    at Function.fromTextArea (hesh.js?ver=2.2.3:9340)
    at startEditor (hesh.js?ver=2.2.3:22452)
    at initialise (hesh.js?ver=2.2.3:22497)
arniebradfo commented 6 years ago

fixed in v2.2.4