Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there are 20 users online :: 0 Registered, 0 Hidden and 20 Guests :: 1 Bot
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
How To Install the Code Snippet Button
Page 1 of 1 • Share
You probably noticed the code snippet button on the support forum that I wrote. This tutorial will help you install that button into your editor. Code Snippets are generally used to post small portions of code that are displayed inline with text.
![How To Install the Code Snippet Button Captur14](https://i.servimg.com/u/f84/18/45/41/65/captur14.png)
To install this plugin go to Admin Panel > Modules > JavaScript codes management and create a new script with the following settings.
Title : Code Snippet
Placement : In all the pages
Paste the code below and submit :
Once you're finished, save the JavaScript and you're ready to use the code snippet !
If you have any questions or comments feel free to leave a reply below. Enjoy !
![How To Install the Code Snippet Button Captur14](https://i.servimg.com/u/f84/18/45/41/65/captur14.png)
Installation
To install this plugin go to Admin Panel > Modules > JavaScript codes management and create a new script with the following settings.
Title : Code Snippet
Placement : In all the pages
Paste the code below and submit :
- Code:
$(function() {
if ($.sceditor) {
$.sceditor.command.set('inline-code', {
exec : function() {
this.insert('[table class="inline-code"][tr][td][code]','[/code][/td][/tr][/table]');
},
txtExec : function() {
this.insert('[table class="inline-code"][tr][td][code]','[/code][/td][/tr][/table]');
},
tooltip : 'Code snippet'
});
toolbar = toolbar.replace(/code/, 'code,inline-code');
}
});
document.write('<style type="text/css">.inline-code,.inline-code *{display:inline-block!important}.inline-code .codebox{background-color:rgba(0,0,0,.04)!important;border:1px solid rgba(0,0,0,.05)!important;margin:0;line-height:12px;border-radius:3px}#mpage-body .inline-code .codebox p,.inline-code .codebox dt{display:none!important}.inline-code .codebox code{padding:0!important;margin:0;border:none;background:0 0}.sceditor-button-inline-code div{background-image:url(http://i21.servimg.com/u/f21/18/21/41/30/snippe10.png)!important}</style>');
Once you're finished, save the JavaScript and you're ready to use the code snippet !
![Celebrate](/users/2516/46/95/34/smiles/2191605871.gif)
If you have any questions or comments feel free to leave a reply below. Enjoy !
![Love and peace, baby](/users/2516/46/95/34/smiles/241120277.gif)
Notice |
Tutorial written by Ange Tuteur. Reproduction not permitted without consent from the author. |
TonnyKamper likes this post
@Michael_vx yes,
Replace
with
. ![Wink](https://2img.net/i/fa/i/smiles/icon_wink.gif)
Replace
|
|
![Wink](https://2img.net/i/fa/i/smiles/icon_wink.gif)
No problem. ![Wink](https://2img.net/i/fa/i/smiles/icon_wink.gif)
If you ever want to make something for admins only, just make a condition like this :
![Wink](https://2img.net/i/fa/i/smiles/icon_wink.gif)
If you ever want to make something for admins only, just make a condition like this :
- Code:
if (_userdata.user_level == 1) {
/* ADMIN ONLY SCRIPT */
}
- GuestGuest
Installed for admins only. Works fine on Edge.
@SLGray oh no, you wouldn't. However, if you add the CSS below to your stylesheet you'll be able to achieve the same result. ![Smile](https://2img.net/i/fa/i/smiles/icon_smile.gif)
You might need to remove this from the script first though :
![Smile](https://2img.net/i/fa/i/smiles/icon_smile.gif)
- Code:
.sceditor-button-inline-code:after { content:"\f0c4"; }
You might need to remove this from the script first though :
- Code:
.sceditor-button-inline-code div{background-image:url(http://i21.servimg.com/u/f21/18/21/41/30/snippe10.png)!important}
- Sponsored content
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum