How to use the @simonwep/pickr/dist/pickr.min.create function in @simonwep/pickr

To help you get started, we’ve selected a few @simonwep/pickr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kromitgmbh / titra / imports / ui / pages / editproject.js View on Github external
opacity: false,
      hue: true,
      interaction: {
        hex: false,
        input: false,
        clear: false,
        save: false,
      },
    },
  }
  if (!FlowRouter.getParam('id')) {
    templateInstance.color = `#${(`000000${Math.floor(0x1000000 * Math.random()).toString(16)}`).slice(-6)}`
    $('#color').val(templateInstance.color)
    pickrOptions.default = templateInstance.color
  }
  templateInstance.pickr = Pickr.create(pickrOptions)
  templateInstance.pickr.on('change', (color) => {
    $('#color').val(color.toHEXA().toString())
  })
  import('quill').then((quillImport) => {
    import('quill/dist/quill.snow.css')
    templateInstance.quill = new quillImport.default('#richDesc', {
      theme: 'snow',
    })
    if (Projects.findOne() && Projects.findOne().desc instanceof Object && templateInstance.quill) {
      templateInstance.quill.setContents(Projects.findOne().desc)
    } else if (Projects.findOne() && Projects.findOne().desc && templateInstance.quill) {
      templateInstance.quill.setText(Projects.findOne().desc)
    }
  })

  templateInstance.autorun(() => {

@simonwep/pickr

Flat, Simple, Hackable Color-Picker.

MIT
Latest version published 6 months ago

Package Health Score

75 / 100
Full package analysis