Skip to content

Commit 30b7296

Browse files
authored
Merge pull request #2206 from tf/alt-max-length
Increase max length of alt texts to 5000
2 parents d22097a + de27416 commit 30b7296

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

package/src/editor/initializers/setupFileTypes.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ app.addInitializer(function(options) {
8585
}
8686
};
8787

88+
var altConfigurationEditorInput = {
89+
name: 'alt',
90+
inputView: TextInputView,
91+
inputViewOptions: {
92+
maxLength: 5000
93+
}
94+
};
95+
8896
editor.fileTypes.register('image_files', {
8997
model: ImageFile,
9098
metaDataAttributes: [
@@ -93,10 +101,7 @@ app.addInitializer(function(options) {
93101
],
94102
matchUpload: /^image/,
95103
configurationEditorInputs: [
96-
{
97-
name: 'alt',
98-
inputView: TextInputView
99-
}
104+
altConfigurationEditorInput
100105
]
101106
});
102107

@@ -111,10 +116,7 @@ app.addInitializer(function(options) {
111116
],
112117
matchUpload: /^video/,
113118
configurationEditorInputs: [
114-
{
115-
name: 'alt',
116-
inputView: TextInputView
117-
}
119+
altConfigurationEditorInput
118120
],
119121
settingsDialogTabs: [
120122
textTracksSettingsDialogTab
@@ -131,10 +133,7 @@ app.addInitializer(function(options) {
131133
],
132134
matchUpload: /^audio/,
133135
configurationEditorInputs: [
134-
{
135-
name: 'alt',
136-
inputView: TextInputView
137-
}
136+
altConfigurationEditorInput
138137
],
139138
settingsDialogTabs: [
140139
textTracksSettingsDialogTab

0 commit comments

Comments
 (0)