Other plugins

  • jExcel CE
    The javascript spreadsheet

Vanilla javascript contextmenu plugin

Integrate a simple contextmenu in your software and give your user a great experience

Examples

Right click inside the container



Source code
<html>
<script src="https://bossanova.uk/jsuites/v2/jsuites.js"></script>
<link rel="stylesheet" href="https://bossanova.uk/jsuites/v2/jsuites.css" type="text/css" />

<input id='colorpicker' name='color'>

<script>
var options = {
    items:[
        {
            title:'Copy',
            shortcut:'Ctrl + C',
            onclick:function() {
                alert('Copy');
            }
        },
        {
            type:'line'
        },
        {
            title:'Visit the website',
            onclick:function() {
                window.open('https://bossanova.uk/jexcel/v3/examples');
            }
        },
        {
            title:'About',
            onclick:function() {
                alert('jSuites v2')
            }
        },
    ],
    onclick:function() {
        contextMenu.close(false);
    }
};

var contextMenu = jSuites.contextmenu(document.getElementById('contextmenu'), options);

document.getElementById('container').addEventListener("contextmenu", function(e) {
    contextMenu.open(e);
    e.preventDefault();
});
</script>
</html>