Comments (7)
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.
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.
Yeah, I've been kinda busy lately. Will try to add it in ASAP.
from reveal-code-focus.
callback: RevealCodeFocus
fails as it's not loaded yet, and should be callback: function() { return RevealCodeFocus; }
or similar?
from reveal-code-focus.
I think your correct there @nemoDreamer
from reveal-code-focus.
I’ve added a Reveal.js slideshow with instructions.
from reveal-code-focus.
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)
- Add tests
- Add support for other package management systems HOT 2
- Add demo HOT 1
- does not seem to work HOT 6
- Scroll to focused code HOT 1
- Code highlighted in single line HOT 6
- Add support for multiple code blocks in the same slide
- Does not bring in highlight.js HOT 2
- Demo site 404s HOT 3
- Markdown generated code line breaks are removed HOT 1
- Will be great if this plugin also adds lines numbers for code HOT 2
- Partial line highlighting HOT 2
- Internal Links not working HOT 1
- Is there a way to highlight different lines on multiple code blocks simultaneously HOT 4
- Printing support
- line indentations/breaks are somewhat broken for xml elements HOT 2
- Switch to Reveal.js v4’s new plugin system. HOT 1
- Support loading of file through URI. Tried using sampler which does this embedding of code but focus did not work.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reveal-code-focus.