Example
Here is an example, how to use jquery.emathtable.js
(new version).
<div class="box">
</div>
<script type="text/javascript">
jQuery('.box').emathtable({
"type": "emathtable",
"settings": {
"username": "user1234",
"mode": "edit",
"lang": "fi"
},
"metadata": {
"creator": "Name",
"created": "2012-04-23T18:25:43.511Z",
"modifier": null,
"modified": null,
"tags": ["tag1", "tag2"]
},
"data": {
rows: 5,
cols: 2,
values : [["x","f(x)"],["0","2"],["1","3"],["2","4"],["3","5"]]
}
});
</script>
Here is an example, how to use jquery.emathtable.js
(older version).
<div class="box">
</div>
<script type="text/javascript">
jQuery('.box').emathtable({
editable: true,
rows: 5,
cols: 2,
values: [["x","f(x)"],["0","2"],["1","3"],["2","4"],["3","5"]]
});
</script>
Click the checkbox to toggle between edit mode and show mode.
Usage
In edit mode you can:
- Change the style of the table from the menu behind the gear button.
- Add or remove rows and columns in add/remove mode which is started and stopped with plus/minus button.
- Edit the cells. Cells are in math mode as default, but one can toggle between math mode and text mode with $ (dollar) key.
- Move between cells:
- Up and down arrows go up and down respectively.
- Left and right arrows together with ctrl-key or alt-key (or command in Mac) move the focus to the cell on the left or right respectively.
- Enter moves the focus downwards to the next cell.
- Tabulator key moves the focus to the next cell (left to right, top to bottom) and shift+tab to the previous cell.
- Esc-key loses the focus.