Quantcast
Channel: SIL Language Software Community - Latest topics
Viewing all articles
Browse latest Browse all 649

Experimenting with "Add KeymanWeb to a Website" + "Add custom keyboard to a Website"

$
0
0

I am testing the possibility of adding a custom keyman keyboard to a web page (so all javascript). I used the code from this page :
https://keyman.com/developer/keymanweb/

My custom keyboard seems OK when tested in the keyman environment bu when I add it as a parameter, javascript complains:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘setTitleFromKeyboard’)
TypeError: Cannot read properties of undefined (reading ‘startHide’)

Here is the code (the language code is rubbish, I am only testing at this stage) :

<script src='https://s.keyman.com/kmw/engine/17.0.326/keymanweb.js'></script>
<script src='https://s.keyman.com/kmw/engine/17.0.326/kmwuitoggle.js'></script>
<script>
  (function(kmw) {
    kmw.init({attachType:'auto'});
    kmw.addKeyboards('@en'); // Loads default English keyboard from Keyman Cloud (CDN)
    kmw.addKeyboards('@th'); // Loads default Thai keyboard from Keyman Cloud (CDN)
  })(keyman);
</script>


<script>
keyman.addKeyboards({
          id:'testpierre',
          name:'Sava de Esperantujanismo',
          languages:{
            id:'tdd-Latf-AS',
            name:'Eujao'
          },
          filename:'./testpierre.js'
        });
</script>


<H1>TEST</H1>
 <h1>KeymanWeb Sample 1</h1>
    <textarea cols="20" rows="5"></textarea>

Would you have any hint?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 649

Trending Articles