medium-editor icon indicating copy to clipboard operation
medium-editor copied to clipboard

JSPM / SystemJS support

Open martypitt opened this issue 10 years ago • 3 comments

I can't seem to get medium-editor to work with JSPM / SystemJS

Steps to reproduce

$ jspm install npm:medium-editor
     Looking up npm:medium-editor
     Updating registry cache...
     Downloading npm:[email protected]
     Looking up github:jspm/nodelibs-process
     Looking up npm:process
     Looking up github:jspm/nodelibs-assert
     Looking up npm:assert
     Looking up npm:util
     Looking up npm:inherits
     Looking up github:jspm/nodelibs-util
ok   Installed medium-editor as npm:medium-editor@^5.16.1 (5.16.1)
ok   Install tree has no forks.

ok   Install complete.

In my app:

import MediumEditor from 'medium-editor';

var mediumEditor = new MediumEditor()

results in Uncaught ReferenceError: MediumEditor is not defined(…)

martypitt avatar May 02 '16 19:05 martypitt

Seems like medium-editor would need to have another way of defining itself to support JSPM / SystemJS out of the box. Currently, the medium-editor module is only defined via the standard umd pattern (you can see the definition here.

Anyone have a recommendation for a simple way to do this?

nmielnik avatar May 04 '16 01:05 nmielnik

Have the same problem. Is there any progress on this issue? @martypitt, @nmielnik have you managed to make it working?

TetianaP avatar Feb 13 '17 01:02 TetianaP

Already work for me as import MediumEditor from 'medium-editor'; Packages' versions:

  • systemjs: 0.20.9
  • typescript: 2.1.6
  • medium-editor: 5.22.2

TetianaP avatar Feb 22 '17 04:02 TetianaP