Angular Xeditable input type url

274 Views Asked by At

Using Angular Xeditable is it possible to automatically set the data type to URL (so that <input type="url"> ) within the xeditable?

What's a good way to do this without external libraries using onbeforesave if Xeditable doesn't support it?

2

There are 2 best solutions below

0
On BEST ANSWER

I think you just have to user editable-url and then assign it the name of attribute you want to bind it with. That should do what you want.

<a href="#" editable-url="user.url">{{ user.url || 'empty' }}</a>

Check this fiddle.

0
On

use something like this.....

<a href="" data-e-pattern="^\d+(\.\d{1,2})?$" data-editable-text="conversion_factor" data-e-required data-e-placeholder="Enter Conversion Factor" data-onaftersave="updateConversionFactor()">{{ conversion_factor || error }}</a>

data-e-pattern="^\d+(.\d{1,2})?$" - this pattern is for decimal value

find out your URL pattern...