Latest topics
» FM Themes
by SLGray Today at 16:48

» User - Made Creations
by SLGray Today at 16:48

» The Football Forums
by Mati Today at 15:22

» [BUG] Avatar doesn't resize when reading the profile
by Samantha NL Today at 12:33

» Search Bar Options
by Samantha NL Today at 11:38

» Chit Chat Thread
by Jazeon Today at 05:42

» Christmas logo
by Teo! Today at 03:56

» SyncEditor
by keko_ferkeko Today at 00:31

» Private message bg color
by Mr.Alam Yesterday at 22:54

» Multi-step Login Form
by Samantha NL Yesterday at 12:54

» Member of the Month
by Samantha NL Yesterday at 12:38

» Forumactif Edge - Dutch Translation
by Samantha NL Yesterday at 10:49

» Widget : Staff Online
by Samantha NL Yesterday at 10:39

» Questions about styling the Main Search Box
by Samantha NL Yesterday at 10:24

» Found a typo in your default Edge CSS
by Samantha NL Yesterday at 03:07

Recent Tutorials
Who is online?
In total there are 8 users online :: 0 Registered, 0 Hidden and 8 Guests :: 1 Bot

None

[ View the whole list ]


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

Change the button icons of the editor

View previous topic View next topic Go down

Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8395
Reputation : 2010
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 Mon 28 Apr 2014, 07:18

Hello,

This quick trick will teach you how to change the icons of buttons for the editor of your Forumotion forum.


This will work for all versions so long as you're using the default editor.


Modifying the stylesheet

So you get an idea of how to change the icons, we'll modify the buttons that were in the demonstration above. Go to Administration Panel ► Display ► Colors ► CSS stylesheet and add the codes below to your sheet and submit.
Code:
.sceditor-button-bold div {
    background-image:url('http://i57.servimg.com/u/f57/18/21/41/30/b10.png') !important;
    background-position:0 !important;
}

.sceditor-button-italic div {
    background-image:url('http://i57.servimg.com/u/f57/18/21/41/30/i10.png') !important;
    background-position:0 !important;
}

.sceditor-button-underline div {
    background-image:url('http://i57.servimg.com/u/f57/18/21/41/30/u10.png') !important;
    background-position:0 !important;
}

.sceditor-button-strike div {
    background-image:url('http://i57.servimg.com/u/f57/18/21/41/30/s10.png') !important;
    background-position:0 !important;
}


Explanation

background-image : Applies a background image to the button. Use url('/myimage.gif') to set a background image, replace /myimage.gif by the URL of your image.

background-position : Sets the background position back to 0. Since most of the default images use an image map you must reset the background position, otherwise your image may not appear.

Below you will find a list of CSS rules which you can use to change the buttons icons for the editor. Each rule is marked with a comment so you know which button it modifies. So, find the CSS rule for the button you want to modify, apply your image URL, and add it to your stylesheet.
Code:
/* bold */
.sceditor-button-bold div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* italic */
.sceditor-button-italic div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* underline */
.sceditor-button-underline div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* strike */
.sceditor-button-strike div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* text align left */
.sceditor-button-left div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* text align center */
.sceditor-button-center div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* text align right */
.sceditor-button-right div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* text align justify */
.sceditor-button-justify div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* bullet list */
.sceditor-button-bulletlist div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* ordered list */
.sceditor-button-orderedlist div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* horizontal rule */
.sceditor-button-horizontalrule div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* quote */
.sceditor-button-quote div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* code */
.sceditor-button-code div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* spoiler */
.sceditor-button-faspoiler div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* hide */
.sceditor-button-fahide div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* table */
.sceditor-button-table div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* host an image */
.sceditor-button-servimg div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* insert an image */
.sceditor-button-image div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* insert a link */
.sceditor-button-link div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* youtube */
.sceditor-button-youtube div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* dailymotion */
.sceditor-button-dailymotion div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* flash */
.sceditor-button-flash div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* font size */
.sceditor-button-size div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* font color */
.sceditor-button-color div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* font family */
.sceditor-button-font div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* remove formatting */
.sceditor-button-removeformat div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* button more */
.sceditor-button-more div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* sub script */
.sceditor-button-subscript div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* super script */
.sceditor-button-superscript div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* scroll horizontal */
.sceditor-button-fascroll div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* scroll vertical */
.sceditor-button-faupdown div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* WoW */
.sceditor-button-fawow div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* random */
.sceditor-button-farand div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* emoticon */
.sceditor-button-emoticon div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* date */
.sceditor-button-date div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* time */
.sceditor-button-time div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* paste text */
.sceditor-button-pastetext div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* switch editor mode */
.sceditor-button-source div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

Additionally if you want to change the color of all the buttons you can use the class .sceditor-button to modify their style. Below I leave an example rule which you can work from. Smile
Code:
.sceditor-button { background:#DEF; }

.sceditor-button:hover, .sceditor-button:active, .sceditor-button.hover { background:#EFF !important; }

Good luck with your forums and most of all, be creative ! Wink


Notice
Tutorial written by Ange Tuteur.
Special thanks to Marios for the idea
Reproduction not permitted without consent from the author.


Last edited by Ange Tuteur on Tue 15 Mar 2016, 06:25; edited 1 time in total
smejker

Title :
Maršal
Gender : Male
Posts : 25
Points : 957
Reputation : 7
Location : Macedonia
Language : Macedonian, Serbo-Croatia
Browser : Browser : Internet Explorer Forum Version : Forum Version : phpBB3
Awards :
View all awards
View user profile

Postsmejker on Tue 08 Jul 2014, 04:19

It's cool... but..
how to change Font size, Font Color, Font Name, Remove Formating and Switch Editor Mode button...
and how to add new button like: Undo, Redo, Decrease Indent, Increase Indent, Remove Link, Blink...
I was asking the same in help.forumotiion... but now everything I'll ask here, because U Ange are king!

Edit! - And how to change places of icons in sceditor... I want first to be Font Name, second Font Size third Remove Formating...
Thanks in advance.
Regards & Respect!

--------

If U asking, You'll have chanse to learning!
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8395
Reputation : 2010
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 09 Jul 2014, 03:47

For the buttons they the rules to change their image should be in the first post :
Code:
/* font size */
.sceditor-button-size div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* font color */
.sceditor-button-color div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* font family */
.sceditor-button-font div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* remove formatting */
.sceditor-button-removeformat div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}

/* switch editor mode */
.sceditor-button-source div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
dr.kran

Title :
Inventor
Gender : Male
Age : 23
Posts : 49
Points : 155
Reputation : 1
Language : english
Browser : Browser : Internet Explorer Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://slicergames.forummotions.com/

Postdr.kran on Mon 12 Sep 2016, 20:57

What's the name for emoticons?
Infact how do you find those?
Andrei34

Gender : Male
Posts : 137
Points : 689
Reputation : 38
Language : Romanian and English
Browser : Browser : Opera Forum Version : Forum Version : punBB
Awards :
View all awards
View user profile

PostAndrei34 on Tue 13 Sep 2016, 00:17

@dr.kran wrote:What's the name for emoticons?
Infact how do you find those?
You can find images on google or use font awesome icons(http://fontawesome.io/).
dr.kran

Title :
Inventor
Gender : Male
Age : 23
Posts : 49
Points : 155
Reputation : 1
Language : english
Browser : Browser : Internet Explorer Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://slicergames.forummotions.com/

Postdr.kran on Tue 13 Sep 2016, 09:33

@Andrei34 wrote:
@dr.kran wrote:What's the name for emoticons?
Infact how do you find those?
You can find images on google or use font awesome icons(http://fontawesome.io/).
Not what I meant, I mean the smily face above the option bar with different features like this.
Actually, I wouldn't mind knowing how to make it like this one here.

Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8395
Reputation : 2010
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 13 Sep 2016, 12:43

Hi @dr.kran,

Are you referring to the emoji button ?
dr.kran

Title :
Inventor
Gender : Male
Age : 23
Posts : 49
Points : 155
Reputation : 1
Language : english
Browser : Browser : Internet Explorer Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://slicergames.forummotions.com/

Postdr.kran on Sat 17 Sep 2016, 22:08

@Ange Tuteur wrote:Hi @dr.kran,

Are you referring to the emoji button ?

For some reason I can't find the buttons with the spacebars, how does one enter insert image button into CSS codes?
Is there a special casing for it?
Ange Tuteur
Administrator
Title :
Coffee Addict
Gender : Male
Age : 21
Posts : 4091
Points : 8395
Reputation : 2010
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 20 Sep 2016, 11:21

@dr.kran the insert image class name is
Code:
.sceditor-button-image
. If a button's name has a space in it, it'll be replaced with a dash ; -. Also, this is a list of all the default button classes :
Code:
/* bold */
.sceditor-button-bold div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* italic */
.sceditor-button-italic div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* underline */
.sceditor-button-underline div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* strike */
.sceditor-button-strike div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* text align left */
.sceditor-button-left div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* text align center */
.sceditor-button-center div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* text align right */
.sceditor-button-right div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* text align justify */
.sceditor-button-justify div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* bullet list */
.sceditor-button-bulletlist div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* ordered list */
.sceditor-button-orderedlist div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* horizontal rule */
.sceditor-button-horizontalrule div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* quote */
.sceditor-button-quote div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* code */
.sceditor-button-code div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* spoiler */
.sceditor-button-faspoiler div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* hide */
.sceditor-button-fahide div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* table */
.sceditor-button-table div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* host an image */
.sceditor-button-servimg div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* insert an image */
.sceditor-button-image div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* insert a link */
.sceditor-button-link div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* youtube */
.sceditor-button-youtube div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* dailymotion */
.sceditor-button-dailymotion div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* flash */
.sceditor-button-flash div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* font size */
.sceditor-button-size div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* font color */
.sceditor-button-color div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* font family */
.sceditor-button-font div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* remove formatting */
.sceditor-button-removeformat div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* button more */
.sceditor-button-more div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* sub script */
.sceditor-button-subscript div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* super script */
.sceditor-button-superscript div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* scroll horizontal */
.sceditor-button-fascroll div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* scroll vertical */
.sceditor-button-faupdown div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* WoW */
.sceditor-button-fawow div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* random */
.sceditor-button-farand div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* emoticon */
.sceditor-button-emoticon div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* date */
.sceditor-button-date div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* time */
.sceditor-button-time div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* paste text */
.sceditor-button-pastetext div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* switch editor mode */
.sceditor-button-source div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
It's in the first post as well. Wink
dr.kran

Title :
Inventor
Gender : Male
Age : 23
Posts : 49
Points : 155
Reputation : 1
Language : english
Browser : Browser : Internet Explorer Forum Version : Forum Version : phpBB2
Awards :
View all awards
View user profile http://slicergames.forummotions.com/

Postdr.kran on Tue 20 Sep 2016, 14:38

Thanks:
@Ange Tuteur wrote:@dr.kran the insert image class name is
Code:
.sceditor-button-image
. If a button's name has a space in it, it'll be replaced with a dash ; -. Also, this is a list of all the default button classes :
Code:
/* bold */
.sceditor-button-bold div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* italic */
.sceditor-button-italic div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* underline */
.sceditor-button-underline div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* strike */
.sceditor-button-strike div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* text align left */
.sceditor-button-left div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* text align center */
.sceditor-button-center div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* text align right */
.sceditor-button-right div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* text align justify */
.sceditor-button-justify div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* bullet list */
.sceditor-button-bulletlist div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* ordered list */
.sceditor-button-orderedlist div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* horizontal rule */
.sceditor-button-horizontalrule div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* quote */
.sceditor-button-quote div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* code */
.sceditor-button-code div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* spoiler */
.sceditor-button-faspoiler div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* hide */
.sceditor-button-fahide div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* table */
.sceditor-button-table div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* host an image */
.sceditor-button-servimg div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* insert an image */
.sceditor-button-image div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* insert a link */
.sceditor-button-link div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* youtube */
.sceditor-button-youtube div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* dailymotion */
.sceditor-button-dailymotion div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* flash */
.sceditor-button-flash div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* font size */
.sceditor-button-size div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* font color */
.sceditor-button-color div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* font family */
.sceditor-button-font div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* remove formatting */
.sceditor-button-removeformat div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* button more */
.sceditor-button-more div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* sub script */
.sceditor-button-subscript div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* super script */
.sceditor-button-superscript div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* scroll horizontal */
.sceditor-button-fascroll div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* scroll vertical */
.sceditor-button-faupdown div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* WoW */
.sceditor-button-fawow div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* random */
.sceditor-button-farand div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* emoticon */
.sceditor-button-emoticon div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* date */
.sceditor-button-date div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* time */
.sceditor-button-time div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* paste text */
.sceditor-button-pastetext div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
 
/* switch editor mode */
.sceditor-button-source div {
    background-image:url('/myimage.gif') !important;
    background-position:0 !important;
}
It's in the first post as well. Wink

Thank you for the help, this really helped a lot.

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