reveal_external icon indicating copy to clipboard operation
reveal_external copied to clipboard

Reveal.getConfig is not a function

Open SylvainSimplonGit opened this issue 4 years ago • 11 comments

Hi, I upgraded reveal.js to v4.0.1 and now I've this message in browser console :

VM2524 external.js:28 Uncaught TypeError: Reveal.getConfig is not a function
    at VM2524 external.js:28
    at VM2524 external.js:193

My configuration in index.html :

<script src="../reveal.js/plugin/external/external.js"></script>
 ...
<script>
Reveal.initialize({
dependencies: [
{
   src: '../reveal.js/plugin/external/external.js',
   condition: function () {
      return !!document.querySelector('[data-external],[data-external-replace]');
   }
},
...
]
...
});
</script>

Have you an idea ?

SylvainSimplonGit avatar May 27 '20 07:05 SylvainSimplonGit

Hi, it seems that Reveal.getConfig should also be working in Reveal.js Version > 4.0.0. Could you maybe provide an online demo of this error?

janschoepke avatar May 27 '20 07:05 janschoepke

Hi, I'm sorry but I can't host my presentation. Do you know a free temporary host?

SylvainSimplonGit avatar Jun 01 '20 14:06 SylvainSimplonGit

Hi, maybe you could try some services like jsfiddle.net or similar ones. Just put in an example presentation.

janschoepke avatar Jun 02 '20 06:06 janschoepke

I did not manage to launch my code on stackblitz but you can find it either:

  • https://github.com/SylvainSimplonGit/reveal.js-external
  • https://stackblitz.com/edit/js-ihakns

the error message : VM2690 external.js:28 Uncaught TypeError: Reveal.getConfig is not a function at VM2690 external.js:28 at VM2690 external.js:193 (anonymous) @ VM2690 external.js:28 (anonymous) @ VM2690 external.js:193

SylvainSimplonGit avatar Jun 02 '20 13:06 SylvainSimplonGit

Had the same issue and managed to work around the problem by using dependencies to register the plugin rather than plugins:

Reveal.initialize({
  // ...
  dependencies: [{
    src: 'node_modules/reveal_external/external/external.js', 
    condition: function() { 
       return !!document.querySelector( '[data-external],[data-external-replace]' ); 
     } 
  }, ],
});

From the documentation it seems they changed the API for plugins, so this plugin would actually need to be adapted.

SirkoS avatar Jun 03 '20 11:06 SirkoS

@SirkoS , this is that i did, see my first comment. And it's not working for me.

SylvainSimplonGit avatar Jun 07 '20 07:06 SylvainSimplonGit

Any solution to this.I am facing same issue

mvalahtv avatar Jun 26 '20 04:06 mvalahtv

Same here :-(

Reveal.getConfig as well as Reveal.addEventListener does Not work anymore

martinbe1io avatar Mar 14 '21 20:03 martinbe1io

Hi Jan - Do you have plans to update reveal_external to Reveal.js v4? Would you be open to collaboration? Thanks =)

textreme avatar Mar 23 '21 19:03 textreme

Hi textreme, currently I sadly don't have any time maintaining this repository. I am totally open to contributions! If you should have any improvements, you can easily send me a push request. Jan

janschoepke avatar Apr 07 '21 18:04 janschoepke

I also sent you a collaboration request. Feel free to join this repository! :)

janschoepke avatar Apr 07 '21 18:04 janschoepke