-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add reveal.js plugins ? #102
Comments
Currently reveal-md has no support for adding extra reveal.js plugins. For what it's worth: these plugins are already included: reveal-md/lib/template/reveal.html Lines 45 to 53 in 73d1476
I don't know how other (third party) plugins should be added, perhaps this feature is easy to add to reveal-md. |
@webpro Does reveal-md has support for adding extra reveal.js plugins now? |
No, not really. There are two options:
Edit: I forgot to add the option to add custom scripts ( |
I tried to add blow content into
I think if we use js code to config reveal.js options will be better for add, enable or disable plugins. blow is
|
I found a way to add Third Party plugins. First, specify the location of the plugins in the
Then write in
|
work great. |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
@Aircl0wn : To add a config for a plugin, create a Example for the config of the chalkboard plugin: {
"chalkboard": {
"boardmarkerWidth": 10,
"chalkWidth": 10,
"readOnly": false,
"src": "test.json",
"toggleChalkboardButton": { "left": "30px", "bottom": "30px", "top": "auto", "right": "auto" },
"toggleNotesButton": { "left": "30px", "bottom": "30px", "top": "auto", "right": "auto" },
"eraser": {"radius": 50, "src": "plugins/chalkboard/img/sponge.png"}
}
} Note that the options should be in json format, so all strings should have quotations. It would be great to add this to the reveal-md documentation. |
thnx @jvanheugten ! |
Thanks @JohnGuan and @jvanheugten! I added this to the readme the other day: https://github.com/webpro/reveal-md#scripts-preprocessors-and-plugins. |
Excuse me before hand if I'm missing something obvious. However, I cannot enable the TOC-progress plugin https://github.com/e-gor/Reveal.js-TOC-Progress. I've enable other plugins but with this one I fail with every attempt.
Any hint ? Thank you ! |
So that would be |
Hey thanks for the quick answer. However, I think I had tried that too but to no avail. Just to be sure, my
And my
But when I run Thank you for your time ! |
The argument is |
May I know if this way still working or not? I've tried with the following process, but cannot make the menu show up.
"scripts": [
"plugin/reveal.js-menu/menu.js",
"plugin.js"
]
options.plugins.push(
RevealMenu
);
reveal-md slides/Test1.md --scripts plugin.js Would you please tell me if I did something wrong? Thank you. |
@Ouch1978 : is your
|
Yes, I did. It's {
"separator": "\n---\n",
"verticalSeparator": "\n----\n",
"scripts": [
"plugin/reveal.js-menu/menu.js",
"plugin.js"
]
} |
I finally figure it out. Just execute reveal-md slides/Test1.md without |
Yes, that's what I'm doing as well. |
@krillin666 : did the plugin "toc_progress" worked out of the box ? The plugin seems to be loaded but the toc does not appear in the footer. I loaded "RevealMenu" plugin so I think my reveal.json, plugin.json and reveal-md.json are correct toc_progress seems to parse Anyone use also the toc_progress ? |
Sorry for bother you all, but I'm not able to install chalkboard plugin in my reveal-md slide. { then I create plugin.js in the same location of .md file with: options.plugins.push( but when I start the command no chalkboard appears. What is wrong? Thanks for any suggesion, |
Sorry, plugin.js is: |
my solutionMy problem seem could be fix by manual copy the Problems in the past
One interesting thing is that I don't have a way to cover RevealMenu in static output (but I can cover it in direct open by even i have seem the plugins has been include in
and
but it couldn't display the menu buttom(by the ways i have add `console.log("sth") into this js plugins, and it could display in f12, which i guess means that this plugins has been contain in html file successed but not working[i actually not familiar with js]) And as soon as I tried to introduce the RevealChalkboard script into my program, the entire page would not be displayed ~~ |
Hi, I'm trying to add RevealChart plugin to my presentation but got an error in browser console
Below is my complete set-up Project structure
options.plugins.push(
RevealChart,
);
{
"chart": {
"defaults": {
"color": "lightgray",
"scale": {
"beginAtZero": true,
"ticks": { "stepSize": 1 },
"grid": { "color": "lightgray" }
}
},
"line": { "borderColor": [ "rgba(20,220,220,.8)" , "rgba(220,120,120,.8)", "rgba(20,120,220,.8)" ], "borderDash": [ [5,10], [0,0] ] },
"bar": { "backgroundColor": [ "rgba(20,220,220,.8)" , "rgba(220,120,120,.8)", "rgba(20,120,220,.8)" ]},
"pie": { "backgroundColor": [ ["rgba(0,0,0,.8)" , "rgba(220,20,20,.8)", "rgba(20,220,20,.8)", "rgba(220,220,20,.8)", "rgba(20,20,220,.8)"] ]}
}
}
{
"separator": "^\n\n\n",
"verticalSeparator": "^\n\n",
"scripts": [
"plugin/chart/Chart.min.js",
"plugin/chart/plugin.js",
"plugin.js"
]
}
and I run I'm stuck with the error in browser console saying
|
In general, some issues seem to come from the fact that the CLI config ( What also may help is to look in the resulting HTML (use the inspector in the browser) and look for the |
@krillin666 @Thus0 |
Following the Tool link provided in the Readme, I need to add some plugins in my slides (menu, charts,chalkboard...). How to proceed since reveal-md uses its own reveal.js ?
The text was updated successfully, but these errors were encountered: