Skip to content
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

question (actually a wish) #13

Open
a-i-m-a-r opened this issue Sep 3, 2021 · 2 comments
Open

question (actually a wish) #13

a-i-m-a-r opened this issue Sep 3, 2021 · 2 comments

Comments

@a-i-m-a-r
Copy link

Would it be easy to modify the code in order to load the required data (item and size) from a file or a database?
I would like to be able to ask an input to the students in real time. Similar to this other plugin (https://github.com/jschildgen/reveal.js-poll-plugin) where a pool is launched.
In this case, instead of a poll, the students would be prompted to enter a word and depending on its recurrence, a size would be applied and the tagcloud generated.

@sebhildebrandt
Copy link
Owner

@a-i-m-a-r ... that would be a big change ... For this use case it would for sure be a new plugin where also a backend is needed (see also https://github.com/jschildgen/reveal.js-poll-plugin that requires a backend).

@a-i-m-a-r
Copy link
Author

of course, I know. I was just exposing my (long term) wish not asking for it.
but anyhow, I think (I am not a dev :-( ) that it should be feasible to load the item/size from a file (maybe .json?) without backend
let's go step by step. Once I have the file I will try to figure how to create it on a live presentation.
so I would like to ask you where is these data loaded.
I figure that I should modify these lines to load the size:
var weights = [].slice.call(cloud.querySelectorAll('[tagcloud-weight]')) .map(function(el){ return el.getAttribute('tagcloud-weight') }) .sort(function(a, b){ return b-a }); // Sort descending
and that these lines are the ones that look for the items:
function formatTags(text) { for(index = 0; index < slideNotes.length; ++index) { text = text.replace(slideNotes[index].textContent, ''); }
am I right?
I will try to rummage into the code and let you know if I am successful
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants