ember.jsjstreeember-cli-addons

Implementing a custom theme with ember-cli-jstree?


I'm trying to make my own theme for jstree by way of ember-cli-jstree. I thought I would start by using the proton theme. I copied the proton directory from this link into my public directory in my app and added the name of the theme to my jsconfig blob in my controller:

  jsTreeConfig: {
    themes: {
      name: 'proton',
      dots: false,
      icons: false,
      variant: 'large',
    },
  },

However, this causes the styles to break completely. I haven't found great documentation for creating a custom theme using the ember-cli-jstree addon so any pointers in the right direction there would be helpful.


Solution

  • You can't link directly to the public directory in ember because of the way that directory is treated in the build process. I deleted the public directory from my URL and it worked.

     jsTreeConfig: {
        themes: {
          name: 'my-theme',
          url: '../../my-theme/style.css',
        },
      },