Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
quill-better-table
Advanced tools
Module for better table in Quill, more useful features are supported.
A module for better table in Quill, more useful features are supported. There is a list of features below. Thanks quilljs for its awesome extensibility. Hope that quill-better-table could help you.
quill-better-table Codepen Demo
Clicking on tables in quill editor will initialize the tools for table, all features are based on it.
Press Enter to add new lines in the table cell now.
Right-click on table to open context menu, you can see the button.
Right-click on table to open context menu, you can see the button.
Right-click on table to open context menu, you can see the button.
Right-click on table to open context menu, you can see the button.
Dragging over the table cells could select the tableCells surrounded by the highlight borders.
Right-click on table to open context menu, you can see the button.
Dragging lines between the top tool for columns could resize width of columns.
Right-click on table to open context menu, you can see the button.
quilljs v2.0.0-dev.3
Since I use webpack externals to bundle, you must expose Quill
to window object, like load quill.js by script tag globally. Or you may need to fork this repo and build what you need.
npm install quill-better-table
Load quill and style dependencies
<script src="https://cdnjs.cloudflare.com/ajax/libs/quill/2.0.0-dev.3/quill.min.js" type="text/javascript"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/quill/2.0.0-dev.3/quill.snow.min.css" rel="stylesheet">
<link href="unpkg.com/quill-better-table@1.1.5/dist/quill-better-table.css" rel="stylesheet">
ES6
import QuillBetterTable from 'quill-better-table'
Quill.register({
'modules/better-table': QuillBetterTable
}, true)
window.onload = () => {
const quill = new Quill('#editor-wrapper', {
theme: 'snow',
modules: {
table: false, // disable table module
'better-table': {
operationMenu: {
items: {
unmergeCells: {
text: 'Another unmerge cells name'
}
}
}
},
keyboard: {
bindings: QuillBetterTable.keyboardBindings
}
}
})
document.body.querySelector('#insert-table')
.onclick = () => {
let tableModule = quill.getModule('better-table')
tableModule.insertTable(3, 3)
}
}
first, you can get quill-better-table module by quill.getModule
let module = quill.getModule('better-table')
get an array with TableContainer, TableRow, TableCell, offset through the given range.
module.getTable() // current selection
module.getTable(range)
// [TableContainer, TableRow, TableCell, 0]
insert table at current position
module.insertTable(3, 3)
quill-better-table only provide operation options now.
const quill = new Quill('#editor', {
theme: 'snow',
modules: {
table: false, // disable table module
'better-table': {
operationMenu: {
items: {
unmergeCells: {
text: 'Another unmerge cells name'
}
}
}
},
keyboard: {
bindings: QuillBetterTable.keyboardBindings
}
}
})
OperationMenu configures the operation list in right-click menu.
operationMenu show all operations as default. false
will remove the operation.
{
operationKey: {
text: 'foo'
},
operationKey: false
}
operationKey
is the name of operation, there is a list below:
You may need to modify the menu text, operationKey.text
will do that.
Send me an email(lw54760187@hotmail.com) or Contribute on Issues, I glad to hear your suggestion.
FAQs
Module for better table in Quill, more useful features are supported.
The npm package quill-better-table receives a total of 12,543 weekly downloads. As such, quill-better-table popularity was classified as popular.
We found that quill-better-table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.