Skip to content

Repository files navigation

tinymce_class

Class tinymce skeleton/template

Changes:

  • 221213 - Added PC number drop box for PC number
  • 221013 - both tinymce.html & tinymce_submit.html are the same (both hide submit and need ?showsubmit param )
  • 211217 added file=pics option (which loads pic1.jpg ... in each div)
  • 201026 -nocopy v01-adds EXTRA text to copied text (to prevent usage of copu/paste) : eg http://192.168.1.200/tinymce_class/tinymce_template_form.html?file=temp_test01&nocopy
  • 201022 -norightclick v01-disables right click & paste : eg http://192.168.1.200/tinymce_class/tinymce_template_form.html?file=temp_test01&norightclick
  • 200902 - tinymce_submit.html + handle-submit.php (save ergasies to /mnt/home/downloads_linux/word_saved_data )
  • 200115 - added gecko_spellcheck : true, (use browser build-in dictionary) & added plugin "image"
  • 200110 - added gecko_spellcheck : true, (use browser build-in dictionary) & added plugin "image"
  • 200108 - giorti_apokries01.htm
  • 191217c added probeserver for custom file load

Examples:

These will display the file (.htm) specified.

This will show the form& the submit button

These will probe for the file (.htm) every 30seconds

Tip: if you add the word "reload" anywhere in the text file you will get a full page reload.This might be used for lesson/text reseting eg while an hour change.

Notes :

  • Διαλυτικά: [για Linux + Win ] ταυτόχρονα Shift + ‘τόνος’ και μετά το φωνήεν.
  • Διαλυτικά και τόνος όπως “Μαΐου”: [για Linux] ταυτόχρονα Shift+ ‘τόνος‘, μετά ξανά ‘τόνος’ και μετά το φωνήεν.
  • browser_spellcheck: true must replace gecko_spellcheck : true (because it is deprecated)

To Do:

  • maybe need to set browser_spellcheck: false to avoid student confusion
  • add option to send text as a url parameter (instead of file)
  • DONE -remote option : add , add name , class, school and SUMBIT button
  • remote : remote username of sch.gr ,remote sch folder then inside it remote_html file, remote_jpg file , remote index.php file that saves/appends locally ergasies in html
  • DONE gecko_spellcheck is deprecated/replaced by browser_spellcheck: true

Add extra text when copying {&nocopy} (to prevent copy/paste)

// (((((((((((((((((((((((((( Add text to copy 201026a &nocopy parameterfunctionprevent_copy_activate(){window.tinymce.get('text_entered').getWin().document.addEventListener('copy',(event)=>{console.log("DEBUG - INSIDE Add text to copy WWWWWWWWWWWWWWWWWWWWW2="+window.tinymce.get('text_entered').getWin().document.getSelection());constmodified_copy_text=`\n++++++++++++++++++\nΑΝΤΕΓΡΑΜΜΕΝΟ ΚΕΙΜΕΝΟ :\n++++++++++++++++++`;event.clipboardData.setData('text',modified_copy_text+window.tinymce.get('text_entered').getWin().document.getSelection());event.preventDefault();});}varurl_nocopy=location.search.substring(1).indexOf("nocopy");// != to -1 if we have this paramif(url_nocopy!==-1){setTimeout(prevent_copy_activate,2000);}// )))))))))))))))))))))))))) Add text to copy

Disable right click {&norightclick}

Note (maybe nocopy param is better)

// ((((((((((((((( RIGHT CLICK DISABLEfunctionnorightclick_activate(){window.tinymce.get('text_entered').getWin().document.oncontextmenu=function(){console.log("textarea :oncontextmenu right click-DISABLED");returnfalse;};console.log("INSIDE after_tinymce_initzzzzzzzzzzzzzzzzzzzzzzzz");}varurl_norightclick=location.search.substring(1).indexOf("norightclick");// != to -1 if we have this paramif(url_norightclick!==-1){setTimeout(norightclick_activate,2000);}// ))))))))))))))) RIGHT CLICK DISABLE//Alternative #2<script> //OK WORKS !!!
tinymce.init({selector: 'textarea',contextmenu_never_use_native: true});
</script>//Alternative #3:
contextmenu: 'bold italic underline'

tinymce_submit.html + handle-submit.php

Form with name/class entry fields that saves to folder

link__word_saved_data.sh

mkdir -p /mnt/home/downloads_linux/word_saved_data
#delete folder word_saved_data (if exists to create a symlink)
rm word_saved_data
#ln -s ./word_saved_data /mnt/home/downloads_linux/word_saved_data
ln -s /mnt/home/downloads_linux/word_saved_data ./word_saved_data/

Template for numbered table (for lesson with songs etc)

<table><tr><td>
1.
</td><td></td></tr><!-- new row--><tr><td>
2.
</td><td></td></tr><!-- new row--><tr><td>
3.
</td><td></td></tr><!-- new row--><tr><td>
4.
</td><td></td></tr><!-- new row--><tr><td>
5.
</td><td></td></tr></table>

init script for tinymce

<script>tinymce.init({selector:'textarea',language: 'el',entity_encoding: "raw",height: "300",menubar: 'file edit view insert format tools table help',plugins: ["table","image",],toolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | outdent indent | numlist bullist | backcolor removeformat | forecolor | pagebreak | charmap emoticons | fullscreen preview save print | insertfile image media template link anchor codesample | alignleft aligncenter alignright alignjustify | ltr rtl',table_toolbar : "",//Disables the internal table popup toolbarbrowser_spellcheck : true,//gecko_spellcheck : true, //deprecated//toolbar_sticky: true,//table_responsive_width: true,});
</script>

About

Class tinymce skeleton/template

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages