Change value on autocomplete completion pick


I’ve created my own hint function where I return the completion object. It’s working fine.

But I need what it’s shown on the autocomplete dropdown to be different than what’s actually rendered on the editor.

Appears in list <customTag -> renders <customTag id="" type="link"></customTag>

I’m listening to the ‘pick’ event, but there I can’t prevent it or change the value. Is there any way to achieve this?


You can put a hint method on a completion object to override the behavior when it is picked. See the docs.

Perfect! I miss that part on the docs. Thanks so much :wink: