add color picker
This commit is contained in:
@ -172,6 +172,9 @@ function oninput() {
|
||||
this.previousPlaceholder = this.placeholder
|
||||
refreshBox(this)
|
||||
}
|
||||
if (penColor) {
|
||||
this.style.setProperty("color", penColor)
|
||||
}
|
||||
}
|
||||
|
||||
function refreshBox(box) {
|
||||
@ -321,6 +324,12 @@ function insert(radio) {
|
||||
}
|
||||
}
|
||||
|
||||
let penColor
|
||||
|
||||
function changeColor() {
|
||||
penColor = colorPicker.value
|
||||
}
|
||||
|
||||
function undo() {
|
||||
if (history.length) {
|
||||
const previousState = history.pop()
|
||||
|
Reference in New Issue
Block a user