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.

i want overline button

3 posters

Go down

Solved i want overline button

Post by coolkool September 16th 2015, 10:16 am

Hello
I want to put a button in this way: ( i want overline button Overline )


And the effect of the button: puts the line at the top of Speech
coolkool
coolkool
Forumember

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

http://x-gaming.forumakers.com/

Back to top Go down

Solved Re: i want overline button

Post by coolkool September 16th 2015, 10:43 am

[OVERLINE][/OVERLINE]
coolkool
coolkool
Forumember

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

http://x-gaming.forumakers.com/

Back to top Go down

Solved Re: i want overline button

Post by SLGray September 16th 2015, 11:59 am

coolkool wrote:
[OVERLINE][/OVERLINE]
This BBcode tag is not supported by the editor.


i want overline button Slgray10

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

Male Posts : 51463
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: i want overline button

Post by coolkool September 16th 2015, 12:03 pm

yes i know this
So I want to put in effect on this shortcut [OVERLINE][/OVERLINE]
coolkool
coolkool
Forumember

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

http://x-gaming.forumakers.com/

Back to top Go down

Solved Re: i want overline button

Post by coolkool September 17th 2015, 3:17 pm

up Sad 
coolkool
coolkool
Forumember

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

http://x-gaming.forumakers.com/

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur September 17th 2015, 3:22 pm

Only way I can think would be the table tags. For example :
Hello

Code:
[table style="display:inline-block;border-top:1px solid;"][tr][td]Hello[/td][/tr][/table]

Could use HTML too if you have that enabled.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

Post by coolkool September 17th 2015, 3:33 pm

Hello

i will try and tell you
coolkool
coolkool
Forumember

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

http://x-gaming.forumakers.com/

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur September 17th 2015, 3:42 pm

This will add a button to the sceditor, but it'll insert HTML. It can be modified to insert the bbcode table instead if you want.

Go to Modules > JavaScript codes management > New

Placement : In all the pages
Code:
$(function() {
  if (!$.sceditor) return;
 
  $.sceditor.command.set('overline', {
    exec : function() {
      this.insertText('<span style="border-top:1px solid">', '</span>');
    },
 
    txtExec : function() {
      this.insertText('<span style="border-top:1px solid">', '</span>');
    },
 
    tooltip : 'Overline'
  });
 
  toolbar += ',overline'
});


To add a custom image for the button, you'll need to add a small bit of CSS to your stylesheet.
Display > Colors > CSS stylesheet
Code:
.sceditor-button-overline div {
  background-image:url(IMAGE) !important;
}

Remember to replace IMAGE by an image URL.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

Post by coolkool September 17th 2015, 4:10 pm


Code:
<span style="border-top:1px solid">

but this code is html 
it's work on the bbcode? 
coolkool
coolkool
Forumember

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

http://x-gaming.forumakers.com/

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur September 17th 2015, 4:18 pm

If you want it with bbcode replace the script with this :

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 += ',overline'
});
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

Post by coolkool September 17th 2015, 4:25 pm

thank you ^^ it's work
but i want get the button here :
i want overline button HrX1kVO

how i can do that ?
coolkool
coolkool
Forumember

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

http://x-gaming.forumakers.com/

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur September 17th 2015, 4:57 pm

In the script, replace :
Code:
toolbar += ',overline'

by :
Code:
toolbar = toolbar.replace(/(,underline)/, ',overline$1');
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

Post by coolkool September 17th 2015, 5:07 pm

it's cool but look that :
If the overline button before became the button underline
I want to overline Mark button after button underline
coolkool
coolkool
Forumember

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

http://x-gaming.forumakers.com/

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur September 17th 2015, 6:18 pm

That should have done it. Weird. blackeye

Try replacing the script with this :
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(/underline/, 'overline,underline');
});
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

Post by coolkool September 17th 2015, 6:25 pm

It has been no change Sad I've apologized made you get tired with me
coolkool
coolkool
Forumember

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

http://x-gaming.forumakers.com/

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur September 17th 2015, 6:26 pm

Do you have any script modifying the position of the underline button ? That would most likely be the cause.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

Post by coolkool September 17th 2015, 6:38 pm

thanks bro 
thank you
 I made solution on myself ^. ^

1- i hide the stike button
2- Made overline button before strike button
3- create a new strike button 

look : https://i.imgur.com/Hv2S5TR.png
coolkool
coolkool
Forumember

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

http://x-gaming.forumakers.com/

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur September 17th 2015, 7:06 pm

Ah.. I figured that was the problem. Razz Glad you figured it out. Smile

Topic archived

Have a good day. ^^
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top


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