aboutsummaryrefslogtreecommitdiff
path: root/tohtml.js
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-11-16 23:37:24 +0100
committerache <ache@ache.one>2019-11-16 23:38:29 +0100
commitb965cadb4e94bab93b73471621846b2713250aee (patch)
tree6cbcb6aa58d675894f9b21a6712a7c8338765dba /tohtml.js
parentFix install (diff)
Add save button
Diffstat (limited to 'tohtml.js')
-rw-r--r--tohtml.js62
1 files changed, 62 insertions, 0 deletions
diff --git a/tohtml.js b/tohtml.js
index e6d5fee..c1be903 100644
--- a/tohtml.js
+++ b/tohtml.js
@@ -85,4 +85,66 @@ function toHTML(data, fnc) {
.process(data, fnc);
}
+toHTML.defaultValue = `Plugins presentation
+=================
+
+This page is an example of using [remark][remark] with plugins that I created. These plugins are used to parse [lines][remark-line-input] of [text](remark-text-input), [selection boxes][remark-select] and even [MCQs][remark-mcq].
+
+The goal of this project is to propose a set of plugins allowing to create **exercises** easily.
+
+To first let's see somes examples !
+
+Example of exercises
+--------------------
+
+The 151th pokémon [__151th pokémon__]{#pokemon oninput="pokemon(this)"} is one of the two pokemons that can use transform attack (the other one is [ Pikachu | Ditto | Mewtow | Eevee |v] ).
+
+
+Line edit
+---------
+
+You can use line edit like that :
+
+Login : [__email or username__]{#login}
+Passwd: [__Passwd__]{#password type=password}
+
+Text edit
+--------
+
+It's also easy to use text edit :
+
+[______
+
+This is a text zone
+
+______]{rows=13 cols=30}
+
+
+Selection box
+-------------
+
+To use a selection box, just write it in the markdown file.
+
+[ Mario | Peach | Luigi |v]
+
+[remark]: https://github.com/remarkjs/remark "Github of the remark project"
+[remark-line-input]: https://www.npmjs.com/package/remark-line-input
+[remark-text-input]: https://www.npmjs.com/package/remark-text-input
+[remark-select]: https://www.npmjs.com/package/remark-select
+
+
+<script>
+ if( !pokemon ) {
+function pokemon( elem ) {
+ if( elem.value != 'mew' ) {
+ if( elem.classList.contains('valid') )
+ elem.classList.remove('valid')
+ elem['className'] = 'invalid';
+ }else{
+ if( elem.classList.contains('invalid') )
+ elem.classList.remove('invalid')
+ elem.classList.add('valid')
+ }
+}}</script>`;
+
module.exports = toHTML;