You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What about having a readonly property in the schema? This could be read inside each editor and each editor would handle it differently.
schema: {
name: { readonly: true }
}
For instance, maybe the text editor will just add the readonly attribute via jQuery in the initialize function, whereas editors that have templates (e.g., radio) can add another template readonlyTemplate which would be chosen in case the readonly property is there.
Perhaps it would be even nicer to always have this getTemplate, template, readonlyTemplate in all editors so it becomes easily overridable. Maybe some people would like to show the readonly text editor not as a deactivated text input but rather as a label or something else.
Should work across editors.
Example use case: Making it easy to create the 'show' view for a model in a CRUD app.
The text was updated successfully, but these errors were encountered: