2014-07-16, 01:43
Tutorial: Expand SCEditor (Full screen) |
In this tutorial, we add a Javascript function that will make possible to expand the SCEditor (Forumotion editor) so that typing box is in full screen.
--> Tutorials, tips and tricks <--
Expand SCEditor (Full screen)
Expand SCEditor (Full screen)
1º - Javascript:
Placement: In topic
- Code:
[panda=js] // SCEDITOR
jQuery(document).on("ready",function(){
jQuery('head').append('<style>.fullscreen_sce {background: url(http://i35.servimg.com/u/f35/15/64/85/86/fullsc10.png) center no-repeat;background-color: transparent !important;width: 16px;height: 16px;position: absolute;margin-top: 3px;right: 3px;opacity: 0.3;border: none;display: inline-block;}.fullscreen_sce:hover {opacity: 0.6;}.fullscreen_sce.down {background: url(http://i35.servimg.com/u/f35/15/64/85/86/scale_10.png) center no-repeat;}.fullsc_sce{width: 100% !important;height: 100% !important;position: fixed !important;top: 0;left: 0;border: none !important;z-index: 100000 !important;border-radius: 0 !important;max-width: initial !important;} #gquickreply .sceditor-container.fullsc_sce, #gquickreply .fullsc_sce * {max-width: initial !important;}.fullsc_sce_edit {width: calc(100% - 10px) !important;height: calc(100% - 48px) !important;}.no_scoll {overflow: hidden !important;}</style>');
jQuery('.sceditor-toolbar').after('<span class="fullscreen_sce"></span>');
jQuery('.fullscreen_sce').live('click', function() {
jQuery(this).toggleClass('down');jQuery('body').toggleClass('no_scoll');jQuery('.sceditor-grip').toggle();
jQuery(this).next('iframe').toggleClass('fullsc_sce_edit').next('textarea').toggleClass('fullsc_sce_edit');
jQuery(this).parent('.sceditor-container').toggleClass('fullsc_sce');
});
});
2º - Preview:
© PunBB Design
If you have any questions related to this topic create a topic with the following title: Expand SCEditor (Full screen) |