
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
writing-pad
Advanced tools
var container = document.querySelector("#container");
var board = writingPad.build(container);
board.show()
board.resize()
Create an instance of writingPad class.
Append to element container.
This is some optional settings.
Drawing 、 Eraser 、 Grid 、 ExtendVertical 、 Close 、 Reset 、 Undo 、 Redo 、 Color and so on.Set
colororlineWidthif you useDrawing. (ie{Drawing:{color:'rgba(0, 0, 255, 1)', lineWidth:'5'}}). TheResetfeature is able to setdisabledConfirmationandconfirmationText. (ie{Reset:{confirmationText:'Do you want to clear board?'}})
See this if you want to use drawingboard.js controls.
Resize canvas width.
Show a container.
Hide a container.
Return true if current container's display is none.
Get a image of base64.
Get a blob.
board.toBlob().then(function(blob){
//do something
});
Load a image to draw canvas, the resource can be url or img.
You must set img.crossOrigin and cross domain headers If your canvas need be exported what to use toBlob or toImage.
Save current canvas to history by key.
Draw a canvas from history's key.
Delete history by key.
Return true if this key exist history.
Remove images from storage
Show the grid background.
Hide the grid background.
Show or hide the grid background.
Get the container's height.
Increase container's height.
slide height/200px if value is true.450.slideEl is element or css selector string which slides scroll top.Reset canvas height.
Resize canvas width when resize event is triggered by browser.
Open hint that is able to write area.
Close hint that is able to write area.
Get a control object by id. Be able to set id in opts.controls like this:
writingPad.build(container, {
controls:[
{
Drawing: {
id:'1'
}
}
]
})
FAQs
The writing-pad support some basic features.
The npm package writing-pad receives a total of 39 weekly downloads. As such, writing-pad popularity was classified as not popular.
We found that writing-pad demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.