General developer forum
Moodle plugin development
An activity module may not be your best solution if you are wanting to process text in Moodle - you don't say where the text originates.
I wonder if the existing tag cloud block would be a good model for your project?
I'm sure there are people here who can help if you state more clearly the question(s) that you have (not trying to be funny but you didn't actually ask a question )
Thank you for your answer.
My question is following.
a solution that i found was a newmodule template plugin. Following link:
If anybody can suggest me sth that works better, it would be perfect.
Have a look at my code at https://github.com/sharpchi/moodle-filter_syntaxhighlighter for an example.
Put your js in the AMD folders. Create and add your js refs to thirdpartylibs.xml
In your view.php (or whereever you want the cloud to appear, perhaps the renderer) you'll need to put in a call to requires->js_call_amd('yourplugin', 'initfunction');
In my plugin, it's in the filter.php file.
I also have a template for filters that might be useful if you take that route:
It uses very primitive AMD code but at least you can see how it is set up within Moodle.