Skip to content

Instantly share code, notes, and snippets.

View franzose's full-sized avatar

Yan Ivanov franzose

View GitHub Profile
@franzose
franzose / epiceditor-reflowing.js
Created May 17, 2014 00:49
EpicEditor reflowing
// Here's an example of using EpicEditor with something like Twitter Bootstrap tabs.
// Thing is that EpicEditor doesn't calculate its dimensions properly when it is nested in a hidden container.
// So, we just need to call 'reflow' method of the EpicEditor. Here is the simple solution:
// Tab link that's clicked
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
// EpicEditor instance recalculates its dimensions.
editor.reflow();
});
@franzose
franzose / routes.php
Created March 21, 2014 02:16
Laravel routes and locales made simple (@barryvdh solution)
$languages = array('nl','fr');
$locale = Request::segment(1);
if(in_array($locale, $languages))
{
\App::setLocale($locale);
}
else
{
$locale = null;