The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    can i Shortcut this code ?

    coolkool
    coolkool
    Forumember


    Male Posts : 140
    Reputation : 3
    Language : Arabic
    Location : SA

    can i Shortcut this code ? Empty can i Shortcut this code ?

    Post by coolkool January 8th 2018, 8:08 pm

    hello everyone.

    i have this BBcode : 
    Code:
    $(function() {
      if (!$.sceditor) return;
     
      $.sceditor.command.set('overline', {
        exec : function() {
          this.insertText('[table style="display:inline-block;border-top:1px solid;"][tr][td]','[/td][/tr][/table]');
        },
     
        txtExec : function() {
          this.insertText('[table style="display:inline-block;border-top:1px solid;"][tr][td]','[/td][/tr][/table]');
        },
     
        tooltip : 'OVERLINE'
      });
     
      toolbar = toolbar.replace(/left/, 'overline,left');
    });
    Code:
    [table style="display:inline-block;border-top:1px solid;"][tr][td]','[/td][/tr][/table]

    i want to shortcut this code 
    and make it like that :

    Code:
    [OVERLINE]','[/OVERLINE]

    But with the Ability

    i think you know what i meen

    thanks a lot ♥
    coolkool
    coolkool
    Forumember


    Male Posts : 140
    Reputation : 3
    Language : Arabic
    Location : SA

    can i Shortcut this code ? Empty Re: can i Shortcut this code ?

    Post by coolkool January 12th 2018, 3:48 pm

    up
    coolkool
    coolkool
    Forumember


    Male Posts : 140
    Reputation : 3
    Language : Arabic
    Location : SA

    can i Shortcut this code ? Empty Re: can i Shortcut this code ?

    Post by coolkool January 15th 2018, 11:26 pm

    up
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    can i Shortcut this code ? Empty Re: can i Shortcut this code ?

    Post by SLGray January 16th 2018, 12:22 am

    Why do you want to shorten it?



    can i Shortcut this code ? Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    coolkool
    coolkool
    Forumember


    Male Posts : 140
    Reputation : 3
    Language : Arabic
    Location : SA

    can i Shortcut this code ? Empty Re: can i Shortcut this code ?

    Post by coolkool January 16th 2018, 10:34 pm

    because it's difficult to use when he's long 
    and
    i like it short 

    i'm sorry i know my request very hard 


    thanks,
    SarkZKalie
    SarkZKalie
    Support Moderator
    Support Moderator


    Male Posts : 1442
    Reputation : 220
    Language : English

    can i Shortcut this code ? Empty Re: can i Shortcut this code ?

    Post by SarkZKalie January 17th 2018, 3:56 pm

    Then try to sensor them by Admin Control Panel -> General -> Censoring -> Word
    Add new word
    Code:
    *[OVERLINE]*
    Replacement
    Code:
    [table style="display:inline-block;border-top:1px solid;"][tr][td]
    Every you type [OVERLINE] to posts, it'll automatically convert to words replaced.
    coolkool
    coolkool
    Forumember


    Male Posts : 140
    Reputation : 3
    Language : Arabic
    Location : SA

    can i Shortcut this code ? Empty Re: can i Shortcut this code ?

    Post by coolkool January 18th 2018, 3:51 pm

    SarkZKalie wrote:Then try to sensor them by Admin Control Panel -> General -> Censoring -> Word
    Add new word
    Code:
    *[OVERLINE]*
    Replacement
    Code:
    [table style="display:inline-block;border-top:1px solid;"][tr][td]
    Every you type [OVERLINE] to posts, it'll automatically convert to words replaced.

    I'M VERY SORRY BUT THAT'S DIDN'T WORK Sad
    Ikerepc
    Ikerepc
    Active Poster


    Male Posts : 1186
    Reputation : 167
    Language : Who cares...
    Location : Where web help & support is needed

    can i Shortcut this code ? Empty Re: can i Shortcut this code ?

    Post by Ikerepc January 18th 2018, 9:03 pm

    Yeah, @SarkZKalie good idea but doesn't work.

    @coolkool you can short it a little by using class like for example:
    Code:
    [table class="overline"][tr][td]text[/td][/tr][/table]

    And put in CSS following:
    Code:
    .overline {
        display:inline-block;
        border-top:1px solid;
    }
    coolkool
    coolkool
    Forumember


    Male Posts : 140
    Reputation : 3
    Language : Arabic
    Location : SA

    can i Shortcut this code ? Empty Re: can i Shortcut this code ?

    Post by coolkool January 18th 2018, 10:59 pm

    Ikerepc wrote:Yeah, @SarkZKalie good idea but doesn't work.

    @coolkool you can short it a little by using class like for example:
    Code:
    [table class="overline"][tr][td]text[/td][/tr][/table]

    And put in CSS following:
    Code:
    .overline {
        display:inline-block;
        border-top:1px solid;
    }

    doesn't work pro Sad
    Ikerepc
    Ikerepc
    Active Poster


    Male Posts : 1186
    Reputation : 167
    Language : Who cares...
    Location : Where web help & support is needed

    can i Shortcut this code ? Empty Re: can i Shortcut this code ?

    Post by Ikerepc January 18th 2018, 11:15 pm

    coolkool wrote:
    Ikerepc wrote:Yeah, @SarkZKalie good idea but doesn't work.

    @coolkool you can short it a little by using class like for example:
    Code:
    [table class="overline"][tr][td]text[/td][/tr][/table]

    And put in CSS following:
    Code:
    .overline {
        display:inline-block;
        border-top:1px solid;
    }

    doesn't work pro Sad

    I just tried that out and it works fine for me...
    Check your code in CSS, be sure that you saved that and try again. You need only class in table, not whole code for that.

      Current date/time is September 22nd 2024, 9:27 pm