0

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?

Mosh Feu
  • 28,354
  • 16
  • 88
  • 135
user3554664
  • 349
  • 2
  • 16

2 Answers2

0

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.

Ashish Singh
  • 739
  • 3
  • 8
  • 21
0

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...