How to use the @kui-shell/plugin-editor/web/css/theme-alignment.css.toString function in @kui-shell/plugin-editor

To help you get started, we’ve selected a few @kui-shell/plugin-editor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IBM / kui / plugins / plugin-editor / src / lib / theme.ts View on Github external
export const injectTheme = () => {
  if (pre) {
    // debug('skipping injectTheme', pre)
    return
  }
  // debug('injectTheme')

  const key = `kui.editor.theme`

  // dangit: in webpack we can require the CSS; but in plain nodejs,
  // we cannot, so have to use filesystem operations to acquire the
  // CSS content
  injectCSS({
    css: require('@kui-shell/plugin-editor/web/css/theme-alignment.css').toString(),
    key
  })
}