• When used with Toolset Types v 2.2.19, both plugins try to load codemirror js and css and Amcharts back end has problems with appearance. Numbers are overlapping the code part for HTML and Javascript.

    The simplest thing to do would be to use ‘wp_print_scripts’ hook instead of ‘init’ to enqueue the scripts in ~ includes/setup.php:180

    But ideally, it would be resolved somehow, so that no extra steps are needed.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author martynasma

    (@martynasma)

    Thanks for the heads up.

    Upgrading CodeMirror to the latest version seems to fix the line numbers issue.

    However, color-coding is still gone, which is less experience-wrecking issue, than the line numbers.

    This is happening because Toolset Types is loading their version of CodeMirror after we do. I haven’t found a way to work around that gracefully.

    We could force loading of our scripts after TT, which would fix the colorcoding on our end.

    However, lacking experience with TT and thus not being able to test properly, I’m afraid it might ruin something for TT users.

    If you’re game, you might want to change the following line in amcharts/includes/setup.php:

    add_action( 'init', 'amcharts_enqueue_scripts' );

    Into this:

    add_action( 'admin_enqueue_scripts', 'amcharts_enqueue_scripts', 100 );

    And see if that breaks anything in Toolset Type functionality.

    Meanwhile, make sure to upgrade to amCharts 1.1.6.

    Thread Starter RomSocial

    (@romsocial)

    A?iū Martynai,

    It works and your hook with later triggering is better than using deprecated print hook, so I will apply this fix as well.
    So far, I was not able to find any place where Toolset Types is using code highlighting.
    We use quite a bit of the custom fields etc. but never noticed anything that needed / used highlighting. Closest to it would be Wysiwyg, but it does not highlight HTML syntax there.

    Maybe someone from their team will eventually chime in here.

    Thank you,
    Roman

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Compatibility with types (Toolkit) plugin, two versions of codemirror loaded’ is closed to new replies.