Back To Top
Login
Register
Visit Us At TwitterVisit Us At YouTubeVisit Us At Facebook
KandiChat is in Beta Release. Try It Out
HomeHome  
  • UpdatesUpdates  
  • SearchSearch  
  • RegisterRegister  
  • Log inLog in  
  • July 2017
    MonTueWedThuFriSatSun
         12
    3456789
    10111213141516
    17181920212223
    24252627282930
    31      

    Calendar Calendar

    Search
     
     

    Display results as :
     


    Rechercher Advanced Search

    Shopmotion


    Who is online?
    In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

    None

    Most users ever online was 22 on June 26th 2013, 6:10 am
    RSS feeds


    Poll
    Top posting users this week


    View previous topic View next topic Go down  Message [Page 1 of 1]

    avatar

    Changing What Buttons To display in text Editor

    Mr.EasyBB
    06/12/2013
    Hey guys so while digging, here is a cool code to add to change which buttons are displayed in the header of the texteditor (where all buttons are) and add more buttons as well.

    So go to the CSEditor JavaScript we had you make already, if you don't have this create a new JavaScript and label it CSEditor JavaScript and we will use this quite a bit for the Editor Tutorials.

    Now if you have the change text code go below that. before the last closing tag }); and then add this code:

    Code:
    $("#text_editor_textarea").sceditor({
             locale: "en",
             plugins: "bbcode",
             toolbar: "",
    });




    Within the Toolbar quotes section we can add our buttons, the allowed buttons are listed below.

              


    • bold

    • italic

    • underline

    • strike

    • subscript

    • superscript

    • left

    • center

    • right

    • justify

    • font

    • size

    • color

    • removeformat

    • cut

    • This only works in IE due to security permissions. In all other browsers it’s just disabled.

    • copy

    • This only works in IE due to security permissions. In all other browsers it’s just disabled.

    • paste

    • This only works in IE due to security permissions. In all other browsers it’s just disabled.

    • pastetext

    • bulletlist

    • orderedlist

    • table

    • code

    • quote

    • horizontalrule

    • image

    • email

    • link

    • unlink

    • emoticon

    • youtube

    • date

    • time

    • ltr

    • rtl

    • print

    • maximize

    • source

    • fahide

    • faspoiler

    • servimg


    Now to separate them like they originally are just add a | in between the sections you want a new area.

    So for example:

    Code:
    "bold,italic,underline,strike|left,center,right,justify|quote,code,faspoiler,fahide"




    Hope this helps you all. Later we will discuss how to add your own, to be visible in the HTML editor and the BBcode editor!
    Share this post on: Excite BookmarksDiggRedditDel.icio.usGoogleLiveSlashdotNetscapeTechnoratiStumbleUponNewsvineFurlYahooSmarking

    avatar
    You will need the full SCEditor to make this all work properly. Thank You!

    Code:
       $(document).ready(function() {
          $("#text_editor_textarea").sceditor({
             locale: "en",
             width: "100%",
             height: "200px",
             plugins: "bbcode",
             toolbar: "bold,italic,underline,strike|left,center,right,justify|quote,code,faspoiler,fahide|servimg,image,link,youtube|size,color,font,removeformat|emoticon,date,time,source",
             style: "http://illiweb.com/rsc/67/frm/SCEditor/minified/jquery.sceditor.default.min.css",
             rtl: false,
             emoticonsRoot: "",
             emoticonsCompat: true,
             emoticons: {
                dropdown: {
                   ":D": "http://r22.imgfast.net/users/2717/15/04/54/smiles/4135094807.png",":)": "http://r22.imgfast.net/users/2717/15/04/54/smiles/2959596554.png",":(": "http://r22.imgfast.net/users/2717/15/04/54/smiles/1138712904.png",":o": "http://r22.imgfast.net/users/2717/15/04/54/smiles/170075068.png",":shock:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/3715796969.png","8)": "http://r22.imgfast.net/users/2717/15/04/54/smiles/608342022.png",":lol:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/2288962629.png",":x": "http://r22.imgfast.net/users/2717/15/04/54/smiles/1142074086.png",":P": "http://r22.imgfast.net/users/2717/15/04/54/smiles/3222864606.png",":oops:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/4191140872.png",":cry:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/2663263638.png",":evil:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/328168175.png",":roll:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/2321418220.png",";)": "http://r22.imgfast.net/users/2717/15/04/54/smiles/1767869974.png",":idea:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/1814378306.png",":|": "http://r22.imgfast.net/users/2717/15/04/54/smiles/172946801.png",":clown:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/3086822976.png",":silent:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/3567327291.png",":confused:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/121232699.png",":afraid:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/1048513240.png",":8*": "http://r22.imgfast.net/users/2717/15/04/54/smiles/693571942.png",":nerd:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/219770693.png",":whew:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/4013542763.png",":hmm:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/777777887.png",":sealed:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/3080596646.png",":zZz:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/94745851.png",":brains:": "http://r22.imgfast.net/users/2717/15/04/54/smiles/1716668607.png"
                }
             }
          });
          $("#text_editor_textarea").sceditor("instance").toggleSourceMode();$("#text_editor_textarea").sceditor("instance").toggleSourceMode();
          $.sceditor.ShowHideToolbarElements();
       });

    Post on June 12th 2013, 5:54 pm by Mr.EasyBB

    avatar
    This code is great, but is there a way to do this without losing my own smilies?

    Post on June 13th 2013, 3:35 am by willyrka

    avatar
    Try removing all the emot options. I haven't tried that much yet.

    Post on June 13th 2013, 3:37 am by Mr.EasyBB

    avatar
    It replaces my smilies with a couple of basic (but not all) text codes (no pictures, even), but even if I leave your smilies in, they don't show up in the posts (because the text codes are different than the ones we have on our forum). It's actually the only problem I'm having with this code. If you could find a way to use this without affecting which smilies show up in the smiley window, this code would be really helpful.

    Post on June 13th 2013, 3:46 am by willyrka

    avatar
    well I'm on my cell phone now so in the morning ill hellp ypu ok

    Post on June 13th 2013, 3:51 am by Mr.EasyBB

    avatar
    Thanks! Much appreciated. I'll check out the thread regularly. Smile

    Post on June 13th 2013, 3:54 am by willyrka

    avatar
    Any news on this? Smile

    Post on June 14th 2013, 8:40 am by willyrka

    avatar
    So I've been talking to the creator of this script itself, and we had a solution though since they set the toolbar option in the constructor which is that template I give, the only solution to removing any of the buttons we will have to use.

    Code:
    $(function() {
    $.sceditor.defaultOptions.toolbarExclude="CommandNames";
    });

    So say we don't want the Youtube button and the quote button per say. We will do this-

    Code:
    $(function() {
    $.sceditor.defaultOptions.toolbarExclude="quote,youtube";
    });

    Post on June 14th 2013, 12:57 pm by Mr.EasyBB

    avatar
    Hi, thank you for getting back to me! It works only in quick reply, not in the full reply, but still works! Smile

    But I have a question. This excludes some buttons - is there also a way to mix them up and decide on where the toolbar is separated, like you could in your code?

    Post on June 14th 2013, 2:17 pm by willyrka

    avatar
    Ill try to figure something out. Like I said I've been talking to Sam Clarke creator of the script. Its a mit license for commercial or private and FM decided to use it

    Post on June 14th 2013, 4:20 pm by Mr.EasyBB

    Post  by Sponsored content

    View previous topic View next topic Back to top  Message [Page 1 of 1]