codevdesign 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61,20 +61,22 @@
61
61
  props: {
62
62
  modelValue: { type: String, default: '' },
63
63
  langue: { type: String, default: 'fr_FR' },
64
- interdireRedimension: { type: Boolean, default: false },
64
+ redimension: { type: Boolean, default: false },
65
65
  desactiver: { type: Boolean, default: false },
66
+ hauteur: { type: [String, Number], default: '400' },
67
+ hauteurMinimale: { type: [String, Number], default: '200' },
66
68
  plugins: {
67
69
  type: [String, Array],
68
70
  default: 'autoresize table image link fullscreen advlist lists autolink code',
69
71
  },
70
- interdireImage: { type: Boolean, default: false },
72
+ autoriserImage: { type: Boolean, default: false },
71
73
  imageTailleMaximale: { type: Number, default: 5 }, // Mo
72
74
  cacherBarreMenu: { type: Boolean, default: false },
73
75
  cacherBarreOutils: { type: Boolean, default: false },
74
76
  toolbar: {
75
77
  type: [String, Array],
76
78
  default:
77
- 'bold italic underline strikethrough | fontsizeselect | forecolor backcolor | ' +
79
+ 'bold italic underline strikethrough | print | fontsizeselect | forecolor backcolor | ' +
78
80
  'alignleft aligncenter alignright alignjustify | emoticons | bullist numlist | ' +
79
81
  'image | link | outdent indent blockquote | undo redo | fullscreen | removeformat | table | code',
80
82
  },
@@ -102,7 +104,7 @@
102
104
  toolbarEffective() {
103
105
  if (this.cacherBarreOutils) return false
104
106
  const raw = Array.isArray(this.toolbar) ? this.toolbar.join(' | ') : this.toolbar
105
- if (!this.interdireImage) return this._normalizeToolbar(raw)
107
+ if (this.autoriserImage) return this._normalizeToolbar(raw)
106
108
 
107
109
  const sansImage = raw
108
110
  .replace(/\bimage\b/g, '')
@@ -119,7 +121,7 @@
119
121
  const list = (Array.isArray(this.plugins) ? this.plugins : this.plugins.split(/\s+/))
120
122
  .map(p => p.trim())
121
123
  .filter(Boolean)
122
- const filtered = this.interdireImage ? list.filter(p => p !== 'image') : list
124
+ const filtered = !this.autoriserImage ? list.filter(p => p !== 'image') : list
123
125
  return filtered.join(' ')
124
126
  },
125
127
 
@@ -127,24 +129,27 @@
127
129
  const opts = {
128
130
  autolink: !this.desactiver,
129
131
  autoresize: true,
130
- automatic_uploads: !this.interdireImage,
132
+ automatic_uploads: this.autoriserImage,
131
133
  branding: false,
132
134
  browser_spellcheck: true,
133
135
  content_css: 'default',
134
136
  deprecation_warnings: false,
135
137
  emoticons_database: 'emojis',
136
138
  highlight_on_focus: false,
137
- image_dimensions: !this.interdireImage,
139
+ image_dimensions: this.autoriserImage,
138
140
  language: this.langue === 'en' ? 'en_US' : 'fr_FR',
139
141
  license_key: 'gpl',
142
+ height: Number(this.hauteur) || 200,
143
+ min_height: Number(this.hauteurMinimale) || 200,
144
+ max_height: Number(this.hauteur) || 1000,
140
145
  menubar: !this.cacherBarreMenu,
141
- object_resizing: !this.interdireImage,
142
- paste_data_images: !this.interdireImage,
146
+ object_resizing: this.autoriserImage,
147
+ paste_data_images: this.autoriserImage,
143
148
  plugins: this.pluginsEffective,
144
149
  promotion: false,
145
150
  readonly: this.desactiver,
146
- resize: !this.interdireRedimension,
147
- resize_img_proportional: !this.interdireImage,
151
+ resize: this.redimension,
152
+ resize_img_proportional: this.autoriserImage,
148
153
  skin_url: 'default',
149
154
  statusbar: this.cacherBarreOutils === false,
150
155
  theme_advanced_resizing: true,
@@ -152,7 +157,7 @@
152
157
  toolbar: this.toolbarEffective,
153
158
 
154
159
  // --- File picker seulement si images permises ---
155
- ...(this.interdireImage ? {} : { file_picker_types: 'image' }),
160
+ ...(this.autoriserImage ? {} : { file_picker_types: 'image' }),
156
161
 
157
162
  setup: editor => {
158
163
  this._editor = editor
@@ -186,7 +191,7 @@
186
191
  },
187
192
  }
188
193
 
189
- if (!this.interdireImage) {
194
+ if (this.autoriserImage) {
190
195
  opts.file_picker_callback = cb => {
191
196
  const input = document.createElement('input')
192
197
  input.type = 'file'
@@ -234,10 +239,16 @@
234
239
  },
235
240
 
236
241
  // Re-montage propre sur changements des props
237
- interdireImage() {
242
+ autoriserImage() {
238
243
  this._scheduleReinit()
239
244
  },
240
- interdireRedimension() {
245
+ hauteur() {
246
+ this._scheduleReinit()
247
+ },
248
+ hauteurMinimale() {
249
+ this._scheduleReinit()
250
+ },
251
+ redimension() {
241
252
  this._scheduleReinit()
242
253
  },
243
254
  toolbar() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codevdesign",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Composants Vuetify 3 pour les projets Codev",
5
5
  "files": [
6
6
  "./**/*.vue",