Updated readme

This commit is contained in:
Eugene 2023-07-25 15:38:47 +03:00
parent 3edf35415b
commit 9e25b2869c
2 changed files with 25 additions and 23 deletions

View File

@ -1,38 +1,40 @@
# Modern Spreadsheet
- High performance spreadsheet based on CanvasAPI.
- TypeScript supported
- High performance spreadsheet based on CanvasAPI.
- TypeScript supported
Basic usage
```js
## Basic usage
```ts
import Spreadsheet from 'modern_spreadsheet'
import 'modern_spreadsheet/style.css' // <= this is required
import 'modern_spreadsheet/style.css' // <= this is required
const target = document.getElementById('spreadsheet')
const sheet = new Spreadsheet(target)
//...
```
Save and load data
```js
function saveData() {
const serialized = sheet.serializeData()
## Save and load data
```ts
function saveData() {
const serialized = sheet.serializeData()
localStorage.setItem('sheet_data', JSON.stringify(serialized))
}
function loadData() {
const data = localStorage.getItem('sheet_data')
const json = JSON.parse(data)
function loadData() {
const data = localStorage.getItem('sheet_data')
const json = JSON.parse(data)
if(!json) return;
sheet.loadData(json)
}
```
</div>
## Roadmap
- Custom event functions (ex.: onSelectionChange, onCellEdit...). Full list of supported events will available on this page
- Rows number and columns heading render
- Rows and columns resizing
- Toolbar
- Context menu
- Formulas support
- Selected cell depends cells highlight
- Async formulas support
- Mutlisheets (?)
-

View File

@ -1,7 +1,7 @@
{
"name": "modern_spreadsheet",
"private": false,
"version": "0.0.23",
"version": "0.0.25",
"exports": {
".": {
"import": "./dist/main.js",