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
var x =window.innerWidth||document.documentElement.clientWidth||document.getElementsByTagName('body')[0].clientWidth;
109
112
var y =window.innerHeight||document.documentElement.clientHeight||document.getElementsByTagName('body')[0].clientHeight;
110
113
111
114
var cmsURL =editor_config.path_absolute+'midia/open/tinymce4?field_name='+ field_name;
112
115
113
116
tinyMCE.activeEditor.windowManager.open({
114
-
file: cmsURL,
115
-
title:'Filemanager',
116
-
width: x *0.8,
117
-
height: y *0.8,
118
-
resizable:"yes",
119
-
close_previous:"no"
117
+
file: cmsURL,
118
+
title:'Filemanager',
119
+
width: x *0.8,
120
+
height: y *0.8,
121
+
resizable:"yes",
122
+
close_previous:"no"
120
123
});
121
124
}
122
125
};
@@ -230,24 +233,23 @@ You can also use the configuration in `.midia()`. The following is the default c
230
233
load_ajax_type:'get', // default ajax type to fetch files is 'get', you can change with 'post' http method
231
234
}
232
235
```
233
-
or you can use data-attributes to change the settings, use `data-midia` followed by your setting attributes, i.e. `data-midia-your_setting_want_to_change`:
236
+
or you can use data-attributes to change the settings, use `data-midia` followed by your setting attributes, i.e. `data-midia-your_setting_want_to_change`:
@@ -256,12 +258,12 @@ You can also change to settings on the fly but you have to refresh after that :
256
258
```
257
259
258
260
# Getter
259
-
You can get the the value from this following Midia Attributes:
260
-
- el: get the dom elements
261
-
- settings: get the settings
262
-
- value: get the value, after you pick a file
261
+
You can get the the value from this following Midia Attributes:
262
+
- el: get the dom elements
263
+
- settings: get the settings
264
+
- value: get the value, after you pick a file
263
265
264
-
with this way:
266
+
with this way:
265
267
```javascript
266
268
var midiaObj =$(".midia-toggle").midia();
267
269
midiaObj.midia('el');
@@ -270,12 +272,12 @@ with this way :
270
272
```
271
273
272
274
# Methods
273
-
Midia has this following methods:
274
-
- refresh: refresh your midia, including empty the value, and implement the settings you change before.
275
-
- open: open the midia dialog modal
276
-
- close: close the midia dialog modal
275
+
Midia has this following methods:
276
+
- refresh: refresh your midia, including empty the value, and implement the settings you change before.
277
+
- open: open the midia dialog modal
278
+
- close: close the midia dialog modal
277
279
278
-
with this way:
280
+
with this way:
279
281
```javascript
280
282
var midiaObj =$(".midia-toggle").midia();
281
283
midiaObj.midia('refresh');
@@ -344,4 +346,4 @@ return [
344
346
This package was first initialized by [@nauvalazhar](https://github.com/nauvalazhar) and maintained by [@itskodinger](https://github.com/itskodinger). Then, it became extraordinary by all contributors: [@rizalfakhri12](https://github.com/rizalfakhri12)[@mrofi](https://github.com/mrofi)[@captainspain](https://github.com/captainspain)[@zeroseed](https://github.com/zeroseed)
0 commit comments