Giter Site home page Giter Site logo

How to install about reveal-code-focus HOT 7 CLOSED

joelpittet avatar joelpittet commented on June 13, 2024
How to install

from reveal-code-focus.

Comments (7)

Delapouite avatar Delapouite commented on June 13, 2024

Hi Joel.

Yes you need to add the script to the dependencies list. Something roughly like that :

Reveal.initialize({
   // …
    dependencies: [
        { src: 'node_modules/reveal-code-focus/code-focus.js', async: true, callback: RevealCodeFocus }
 // …
});

from reveal-code-focus.

joelpittet avatar joelpittet commented on June 13, 2024

Oh I was close I had this.

{ src: 'plugin/reveal-code-focus/code-focus.js',
    async: true,
    condition: function() { return !!document.querySelector( 'pre code' ); },
    callback: RevealCodeFocus
},

Which kinda worked. Worth adding to the readme?

from reveal-code-focus.

bnjmnt4n avatar bnjmnt4n commented on June 13, 2024

Yeah, I've been kinda busy lately. Will try to add it in ASAP.

from reveal-code-focus.

nemoDreamer avatar nemoDreamer commented on June 13, 2024

callback: RevealCodeFocus fails as it's not loaded yet, and should be callback: function() { return RevealCodeFocus; } or similar?

from reveal-code-focus.

joelpittet avatar joelpittet commented on June 13, 2024

I think your correct there @nemoDreamer

from reveal-code-focus.

bnjmnt4n avatar bnjmnt4n commented on June 13, 2024

I’ve added a Reveal.js slideshow with instructions.

from reveal-code-focus.

nemoDreamer avatar nemoDreamer commented on June 13, 2024

Brilliant, @D10 !

Linking to the highlight.js and not the plug-in is key, since otherwise, all code blocks' added style markup gets escaped and displayed... I finally gave up for the presentation I needed to give, but now that I've got the trick, I'll definitely give reveal another go!!

from reveal-code-focus.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.