Statusbar

This example shows how the statusbar works with Counter plugin.


Play with the statusbar API:

Code

<!--element -->
<textarea id="content"></textarea>

<!-- call -->
<script>
$R('#content', { plugins: ['counter'] });
</script>

<!-- api buttons and functions -->
<button onclick="addItem();">Add</button>
<button onclick="updateItem();">Update</button>
<button onclick="removeItem();">Remove</button>

<script>
function addItem()
{
    $R('#content', 'statusbar.add', 'my-item', '<b>added</b> item!');
}

function updateItem()
{
    $R('#content', 'statusbar.update', 'my-item', '<b>updated</b> item!');
}

function removeItem()
{
    $R('#content', 'statusbar.remove', 'my-item');
}
</script>