Search results

Accessibility in JavaScript (ES5) Signature control

08 May 2023 / 1 minute to read

Keyboard interaction

The following list of keys can be used to interact with the Signature control.

Properties Functionality
Ctrl + Z Undo the last user action.
Ctrl + Y Redo the last user action.
Ctrl + S To save the signature.
delete Erases all the signature strokes signed by user.
Source
Preview
index.js
index.html
styles.css
Copied to clipboard
ej.base.enableRipple = true;

var signature = new ej.inputs.Signature({}, '#signature');
Copied to clipboard
<!DOCTYPE html><html lang="en"><head>
            
    <title>EJ2 Signature</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="TypeScript Signature Component">
    <meta name="author" content="Syncfusion">
    <link href="styles.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/21.2.3/ej2-base/styles/material.css" rel="stylesheet">
    <link href="//cdn.syncfusion.com/ej2/21.2.3/ej2-inputs/styles/material.css" rel="stylesheet">
    
    
<script src="https://cdn.syncfusion.com/ej2/21.2.3/dist/ej2.min.js" type="text/javascript"></script>
</head>
<body>
    
    <div id="container">
        <h4>Sign here</h4>
        <div id="signature-control">
            <canvas id="signature"></canvas>
        </div>
    </div>

<script>
var ele = document.getElementById('container');
if(ele) {
    ele.style.visibility = "visible";
 }   
        </script>
<script src="index.js" type="text/javascript"></script>
</body></html>
Copied to clipboard
#container {
    visibility: hidden;
}

#loader {
  color: #008cff;
  font-family: 'Helvetica Neue','calibiri';
  font-size: 14px;
  height: 40px;
  left: 45%;
  position: absolute;
  top: 45%;
  width: 30%;
}

#signature {
  border: 1px solid lightgray;
  height: 100%;
  width: 100%;
}

#signature-control {
  height: 300px;
  width: 650px;
}