Trying to import a library (TinyMCE) with modules, getting 404 errors

0 favourites
  • 1 posts
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • Hello everyone,

    I'm quite new to scripting in C3, so this is probably some beginner error with JS modules.

    I'm trying to import the TinyMCE text editor in Construct 3. So far I've inserted a HTML element object with a textarea in it (maybe I could use a Text Input instead) and I've added the library's JS files to the Scripts folder this way :

    Then in my main script, I import the library :

    import * as Tiny from "./tinymce/tinymce.min.js" ;
    

    but when I try to use it as shown in Tiny documentation :

    tinymce.init({selector: '#tiny-textarea'})
    

    the library fails to import its modules and I'm getting 404 errors :

    I know I'm probably doing something wrong as I import the library as "Tiny" but don't use this name afterwards. More surprising are the 404 errors for tinymce/tinymce.min.js, while the tinymce.init call works at first (I disabled the Web workers so DOM calls are possible, the textarea disappears as it should with TinyMCE, and Construct doesn't show any error message) and I can't get it to work using the "Tiny" module name.

    Could someone tell me what I'm doing wrong ? Or maybe this isn't the right way to use an external library in C3 ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)