Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
blog:2020-11-08:geogebra_plugin [2020/11/08 14:47] – va7fi | blog:2020-11-08:geogebra_plugin [2020/11/09 15:01] – va7fi |
---|
====== Geogebra Plugin ====== | ====== Geogebra Plugin ====== |
[[https://www.geogebra.org/ |Geogebra]] is a graphing and geometry tool I've been using since my teaching days. I always found it to be very useful to display concepts that are hard to visualize on a static page. It is a lot more than a simple animation since people can interact with it and move things around. | [[https://www.geogebra.org/ |Geogebra]] is a graphing and geometry tool I've been using since my teaching days. I always found it to be very useful to display concepts that are hard to visualize on a static page. However, it is a lot more than a simple animation since people can interact with it and move things around. |
| |
In the past, I had to export Geogbra files to html5 to embed them, but the process was pretty clunky and time consuming. I searched the Dokuwiki plugins but all the ones listed are too old and don't work anymore. Finally, I created my own using some general instructions for [[https://wiki.geogebra.org/en/Reference:GeoGebra_Apps_Embedding |embedding Geogebra files]]. This is my first plugin and a bit of a cheat: I basically took the existing [[https://www.dokuwiki.org/plugin:color |Color plugin]] which is pretty simple, studied it to learn a bit of the syntax and modified it until it did what I needed. However, there's still a lot of code that I don't really understand and a few features that are missing. | In the past, I had to export Geogbra files to html5 to embed them, but the process was pretty clunky and time consuming. I searched the Dokuwiki plugins but all the ones listed are too old and don't work anymore. Finally, I created my own using some general instructions for [[https://wiki.geogebra.org/en/Reference:GeoGebra_Apps_Embedding |embedding Geogebra files]]. This is my first plugin and a bit of a cheat: I basically took the existing [[https://www.dokuwiki.org/plugin:color |Color plugin]] which is pretty simple, studied it to learn a bit of the syntax and modified it until it did what I needed. However, there's still a lot of code that I don't really understand and a few features that are missing. |
* need to inherit from this class | * need to inherit from this class |
*/ | */ |
class syntax_plugin_ggb extends DokuWiki_Syntax_Plugin { | class syntax_plugin_ggb2 extends DokuWiki_Syntax_Plugin { |
| |
function getType(){ return 'substition'; } | function getType(){ return 'substition'; } |
function getSort(){ return 306; } | function getSort(){ return 306; } |
function connectTo($mode) { $this->Lexer->addSpecialPattern('{{ggb>.*?}}',$mode,'plugin_ggb'); } | function connectTo($mode) { $this->Lexer->addSpecialPattern('{{ggb>.*?}}',$mode,'plugin_ggb2'); } |
| |
| |