Cloud Development Kit

Myscript integration in mvc application


I tried to integrate myscript js in a core mvc application. Followed the readme in this

I am getting the following error "MyScript.register is not a function"

Html content

<!DOCTYPE html>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Home Page - WebApplication1</title>
        <link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.css" />
        <link rel="stylesheet" href="/css/site.css" />
        <link rel="stylesheet" href="/lib/myscript/dist/myscript.min.css" />
        <script src="/lib/q/q.js"></script>
        <script src="/lib/cryptojslib/components/core.js"></script>
        <script src="/lib/cryptojslib/components/hmac.js"></script>
        <script src="/lib/pepjs/dist/pep.js"></script>
        <script src="/lib/myscript/dist/myscript.js"></script>
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                <a class="navbar-brand" href="/">WebApplication1</a>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a href="/">Home</a></li>
                    <li><a href="/Home/About">About</a></li>
                    <li><a href="/Home/Contact">Contact</a></li>
    <div class="container body-content">
<div id="editor"></div>
    var editorElement = document.getElementById('editor');

    MyScript.register(editorElement, {
        triggers: {
            exportContent: 'QUIET_PERIOD'
        recognitionParams: {
            type: 'TEXT',
            protocol: 'REST',
            apiVersion: 'V3',
            server: {
                scheme: 'https',
                host: '',
                applicationKey: 'XXXXXXXXX',
                hmacKey: 'XXXXXXXXX'

        <hr />
            <p>&copy; 2017 - WebApplication1</p>
        <script src="/lib/jquery/dist/jquery.js"></script>
        <script src="/lib/bootstrap/dist/js/bootstrap.js"></script>
        <script src="/js/site.js?v=EWaMeWsJBYWmL2g_KkgXZQ5nPe-a3Ichp0LEgzXczKo"></script



Dear Kumaran,

Can you please try to replace <script src="/lib/myscript/dist/myscript.js"></script> by <script src="/lib/myscript/dist/myscript.min.js"></script> ?

Let us know if this doesn't work.

Best regards,


I was referring min.js earlier. To exactly know the issue, i linked myscript.js The issue remains same with both versions



Dedar Kumaran,

can you please do again a bower update?

Best regards,

Login or Signup to post a comment