Open a-i-m-a-r opened 2 years ago
@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).
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.
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.