can i Shortcut this code ?

Go down

can i Shortcut this code ?

Post by coolkool on 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
Forumember

Posts : 122
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Re: can i Shortcut this code ?

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

up

coolkool
Forumember

Posts : 122
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Re: can i Shortcut this code ?

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

up

coolkool
Forumember

Posts : 122
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Re: can i Shortcut this code ?

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

Why do you want to shorten it?


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

avatar
SLGray
Administrator
Administrator

Male Posts : 43514
Reputation : 3094
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

Re: can i Shortcut this code ?

Post by coolkool on 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,

coolkool
Forumember

Posts : 122
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Re: can i Shortcut this code ?

Post by SarkZKalie on 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.
avatar
SarkZKalie
Forumember

Male Posts : 756
Reputation : 111
Language : English

http://rotavn.forumotion.com

Back to top Go down

Re: can i Shortcut this code ?

Post by coolkool on 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

coolkool
Forumember

Posts : 122
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Re: can i Shortcut this code ?

Post by Ikerepc on 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;
}
avatar
Ikerepc
Active Poster

Male Posts : 1150
Reputation : 155
Language : Croatian, HTML, HTML5, CSS, CSS3, jQuery, PHP, SQL, Bascom, Python, C, C++, FBD & LAD for PLC and more... Little English :D
Location : Where web help & support is needed

http://admins.forumotion.com

Back to top Go down

Re: can i Shortcut this code ?

Post by coolkool on 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

coolkool
Forumember

Posts : 122
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Re: can i Shortcut this code ?

Post by Ikerepc on 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.
avatar
Ikerepc
Active Poster

Male Posts : 1150
Reputation : 155
Language : Croatian, HTML, HTML5, CSS, CSS3, jQuery, PHP, SQL, Bascom, Python, C, C++, FBD & LAD for PLC and more... Little English :D
Location : Where web help & support is needed

http://admins.forumotion.com

Back to top Go down

Back to top


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