-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide more customizable formatter and writers #127
Comments
Now I found a workaround with overriding default input reader and writer to add them more custom logic: Backbone.Syphon.InputReaders.registerDefault(function($el) {
var format = $el.data('format');
var value = $el.val();
if(format) {
//custom format logic
}
return value;
});
Backbone.Syphon.InputWriters.registerDefault(function($el, value) {
var format = $el.data('format');
if(format) {
//custom format logic
}
$el.val(value);
}); You can see full example here: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Syphon provides an ability to create custom input readers and writers for different data types. But type is always detected as tag name or
type
attribute. But sometimes I have to deal with custom data stored in the simple<input type="text">
, but I still need to apply custom reader and writer for that fields.Is there a way how to apply input readers and writers in the more customizable way? For example, add extra
data-format
attribute with additional information about field format.The text was updated successfully, but these errors were encountered: