Plugin Author
Ickata
(@ickata)
Hello @degas ,
Thanks for the good words 🙂
Your use case is very specific and in that case I’d recommend to directly integrate Pixo into your front-end rather than to use this plugin. The plugin solves some general use cases, for example editing images in wp-admin -> Media. In the front-end it attaches to file input form fields and allows end users to edit images before posting them into a form. Every other front-end case is specific.
That’s why I recommend to directly integrate Pixo without the plugin. The documentation is quite good and has some examples.
Based on your description, something similar should do the job (you should edit the code example before embedding it to your front-end – change the HTML selector, add your api key, etc.):
<script src="https://pixoeditor.com/editor/scripts/bridge.m.js"></script>
<script>
window.addEventListener('load', function () {
const pixo = new Pixo.Bridge({
apikey: 'yourapikey',
type: 'modal',
// other options go here
// ...
onSave: function (image) {
// this will trigger download of the image
image.download();
}
})
// this queries your page for the elements which by click will
// open the images in Pixo
const selector = 'body a'; // update this to properly match your elements
document.querySelectorAll(selector).forEach(function (link) {
link.addEventListener('click', function (e) {
pixo.edit(e.target.href)
})
})
})
</script>
About this:
we’ve updated the feature list and added a logo but are still seeing the default set in the editor
Custom features list is a Premium feature of Pixo and won’t work if your 30-day trial expired. You can write to Pixo support sending them your API key and they will tell you if that’s the case.
Thread Starter
Degas
(@degas)
Thanks @ickata. We deleted the plugin and integrated via js; this works perfectly for half a second before the editor drops out due to being blocked. I’ve asked on the main site for further advice so hopefully will have this working shortly.