Latest topics
» Reputation System - Only want the plus sign to Show
by Jlh73 Today at 21:13

» How to install the color on all pages
by white Today at 14:02

» AWC chat in the FM Toolbar on Edge
by Samantha Today at 08:07

» Star in navbar
by Samantha Today at 04:47

» Mobile Version
by  Yesterday at 21:03

» Icons
by  Yesterday at 21:03

» Change the style of tooltips with tooltipster !
by white Yesterday at 05:25

» [GAME] What are you doing right now?
by Valoish Mon 16 Jan 2017, 21:24

» Chit Chat Thread
by  Mon 16 Jan 2017, 12:25

» Starred Forums
by Milouze14 Mon 16 Jan 2017, 12:11

» [GAME] Post a random picture
by  Sun 15 Jan 2017, 22:31

» [GAME] Count to 999 using odd numbers Van-Helsing Edition
by Valoish Sun 15 Jan 2017, 17:23

» [GAME] What are you listening to right now?
by Valoish Sun 15 Jan 2017, 17:23

» Flat Browser Buttons
by  Sun 15 Jan 2017, 12:15

» #12 Pick a Theme
by SLGray Sat 14 Jan 2017, 20:07

Recent Tutorials
Top posting users this month
Who is online?
In total there are 11 users online :: 0 Registered, 0 Hidden and 11 Guests :: 1 Bot

None

[ View the whole list ]


Most users ever online was 172 on Fri 19 Feb 2016, 05:17

Add maximize to the editor

View previous topic View next topic Go down

Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4202
Points : 8668
Reputation : 2108
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Tue 10 Mar 2015, 16:33

This simple trick will allow you to add an existing button to the editor; a button to maximize the editor so it takes up the whole screen.




Installation

Go to Administration panel > Modules > JavaScript codes management and create a new script

Title : SCE Maximize
Placement : In all the pages
Code:
$(function(){
  if (!$.sceditor || !toolbar) return;
  toolbar = toolbar.replace(/source/,'maximize,source');
 
  $(function() {
    var sce = $('#text_editor_textarea').sceditor('instance'), fa = document.getElementById('fa_toolbar');
    $('.sceditor-button-maximize')[0].onclick = function() {
      if (!fa) return;
      sce.maximize() && (fa.style.display = 'none');
      !sce.maximize() && (fa.style.display = '');
    };
  });
});

Save the script and you should now have the maximize button to the left of source mode !


Information

The maximize button already exists in the editor code, but was filtered out by Forumotion. Adding it back in is simple. Once the document is ready a global called toolbar is declared which contains all the toolbar options. We then replace source by maximize,source, splicing in the maximize button. The other code included in the script is to hide the forumotion toolbar during maximization.

You can also redeclare the entire toolbar yourself. For example instead of :
Code:
toolbar = toolbar.replace(/source/,'maximize,source');

We can write :
Code:
toolbar = 'bold,italic|color,font';

Which only gives us the bold, italic, color, and font buttons.


Other default options can also be added in. For a full list I recommend checking out the SCEditor documentation.
http://www.sceditor.com/documentation/options/


Notice
Tutorial written by Ange Tuteur.
Reproduction not permitted without consent from the author.


Last edited by Ange Tuteur on Mon 20 Jun 2016, 09:36; edited 2 times in total
Juny Thoang
New Member
Title :
Gender : Male
Age : 20
Posts : 1
Points : 753
Reputation : 0
Location : HaNoi, Vietnam
Language : Vietnamese
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile http://www.teenvi.com/ https://www.facebook.com/thoang.idol

PostJuny Thoang on Thu 19 Mar 2015, 07:11

Code:
bold,italic,underline,strike|left,center,right,justify|bulletlist,orderedlist,horizontalrule|quote,code,faspoiler,fahide,table|servimg,image,email,link,unlink|youtube,dailymotion,flash|size,color,font,removeformat|date,time,pastetext,cut,copy,paste|more|subscript,superscript,fascroll,faupdown,fawow,farand|print,maximize,source
Michael_vx

Title :
Gender : Male
Age : 25
Posts : 291
Points : 1414
Reputation : 74
Language : Arabic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Other
Awards :
View all awards
View user profile http://miccsoft.net https://www.facebook.com/Michaelvx2008

PostMichael_vx on Thu 19 Mar 2015, 14:50

nice trick
this code is good
thanks My Master Ange
Ch@lo Valdez

Title :
Hello!!
Gender : Male
Age : 41
Posts : 63
Points : 1041
Reputation : 5
Location : Mexico
Language : eng spa
Browser : Browser : Google Chrome Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile

PostCh@lo Valdez on Tue 28 Apr 2015, 19:16

SLGray
Valued Member
Title :
Owner of 2 Forums
Gender : Male
Age : 43
Posts : 2242
Points : 4203
Reputation : 263
Location : United States
Language : English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://www.fmthemes.forumotion.com https://www.facebook.com/FM-Themes-655055824604957 https://twitter.com/FMThemes https://pinterest.com/FMThemes

PostSLGray on Sat 05 Dec 2015, 23:49

I love this tutorial.
Prometheus
Member
Title :
Just Me
Gender : Male
Age : 45
Posts : 12
Points : 104
Reputation : 7
Location : The Netherlands
Language : Dutch / English
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile http://rhtestforum.actieforum.com

PostPrometheus on Wed 30 Nov 2016, 13:55

Hello. I'm interested. This is for your edge too? I want to have 100% editor and few buttons. Is it possible? And everything in the buttons say English. Why? When Samantha installed your edge her choice was Dutch. I am surprised.
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4202
Points : 8668
Reputation : 2108
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Wed 30 Nov 2016, 14:00

@Prometheus yes, this plugin should work regardless of forum version. The language of the buttons is based on the language chosen in your forum profile settings ; Profile > Preferences > Board Language. If the tooltips are still in English, then the problem comes from Forumotion not providing a full translation.
Samantha

Title :
CSS Admirer
Gender : Female
Age : 28
Posts : 454
Points : 951
Reputation : 117
Location : Wherever God wants me
Language : Cryptic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile

PostSamantha on Wed 07 Dec 2016, 12:57

@Ange Tuteur wrote:@Prometheus yes, this plugin should work regardless of forum version. The language of the buttons is based on the language chosen in your forum profile settings ; Profile > Preferences > Board Language. If the tooltips are still in English, then the problem comes from Forumotion not providing a full translation.

I just had a quick look at the Quick Reply box, but it doesn't resize to 100% on Edge ...

--------


Lovely, Satisfy, World
Samantha

Title :
CSS Admirer
Gender : Female
Age : 28
Posts : 454
Points : 951
Reputation : 117
Location : Wherever God wants me
Language : Cryptic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile

PostSamantha on Wed 21 Dec 2016, 10:47

Sorry, but there are no JS errors. I checked yesterday. The Quick reply box just won't resize to 100% ...

--------


Lovely, Satisfy, World
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4202
Points : 8668
Reputation : 2108
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Wed 21 Dec 2016, 11:39

It appears to take up the whole screen on my end ?


You're referring to the maximize button, yes ?
Samantha

Title :
CSS Admirer
Gender : Female
Age : 28
Posts : 454
Points : 951
Reputation : 117
Location : Wherever God wants me
Language : Cryptic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile

PostSamantha on Wed 21 Dec 2016, 11:59

No, I mean... look at the QR (Quick Reply):



and the normal reply:




See the difference? We'd like the QR to have max width, spread all to the right. scratch I had something for that on my friendcodes.nl before. Guess this topic just don't apply to the QR...

--------


Lovely, Satisfy, World
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4202
Points : 8668
Reputation : 2108
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Google Chrome Forum Version : Forum Version : Forumactif Edge
Awards :
View all awards
View user profile https://github.com/SethClydesdale https://twitter.com/sethc1995

PostAnge Tuteur on Wed 21 Dec 2016, 13:50

Oh, this rule should allow you to adjust the quick reply width :
Code:
#quick_reply #textarea_content {
  width:100% !important;
}
Samantha

Title :
CSS Admirer
Gender : Female
Age : 28
Posts : 454
Points : 951
Reputation : 117
Location : Wherever God wants me
Language : Cryptic
Browser : Browser : Mozilla Firefox Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile

PostSamantha on Wed 21 Dec 2016, 14:04

Thanks, @Ange Tuteur. That worked perfectly Smile Good

--------


Lovely, Satisfy, World

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum