Skip to content

Commit

Permalink
Better support from elFinder for TinyMCE insert media
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Aug 18, 2015
1 parent b7f7fdd commit 676a2d7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 5 additions & 3 deletions framework/core/forms/controls/bootstrap3/tinymcecontrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,13 @@ function controlToHTML($name, $label)
browser_spellcheck : " . $sc_brw_off . " ,
importcss_append: true,
style_formats: [
{title: 'Image Left', selector: 'img', styles: {
{title: 'Image Left',
selector: 'img', styles: {
'float' : 'left',
'margin': '0 10px 0 10px'
}},
{title: 'Image Right', selector: 'img', styles: {
{title: 'Image Right',
selector: 'img', styles: {
'float' : 'right',
'margin': '0 10px 0 10px'
}},
Expand Down Expand Up @@ -278,7 +280,7 @@ function controlToHTML($name, $label)
// Provide alternative source and posted for the media dialog
if (meta.filetype == 'media') {
callback(url, {poster: alt});
callback(url);
}
}
});
Expand Down
8 changes: 5 additions & 3 deletions framework/core/forms/controls/tinymcecontrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,13 @@ function controlToHTML($name, $label)
browser_spellcheck : " . $sc_brw_off . " ,
importcss_append: true,
style_formats: [
{title: 'Image Left', selector: 'img', styles: {
{title: 'Image Left',
selector: 'img', styles: {
'float' : 'left',
'margin': '0 10px 0 10px'
}},
{title: 'Image Right', selector: 'img', styles: {
{title: 'Image Right',
selector: 'img', styles: {
'float' : 'right',
'margin': '0 10px 0 10px'
}},
Expand Down Expand Up @@ -284,7 +286,7 @@ function controlToHTML($name, $label)
// Provide alternative source and posted for the media dialog
if (meta.filetype == 'media') {
callback(url, {poster: alt});
callback(url);
}
}
});
Expand Down
2 changes: 2 additions & 0 deletions framework/modules/file/views/file/elfinder.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@
// },
{/literal}{if $filter=='image'}{literal}
onlyMimes : ['image'],
{/literal}{elseif $filter=='media'}{literal}
onlyMimes : ['video'],
{/literal}{/if}{literal}
defaultView : '{/literal}{if $smarty.const.FM_THUMBNAILS}icons{else}list{/if}{literal}',
// dateFormat : '{/literal}{$smarty.const.DISPLAY_DATE_FORMAT}{literal}',
Expand Down

0 comments on commit 676a2d7

Please sign in to comment.