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 Wed 16 Sep - 11:16

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 Wed 16 Sep - 11:43

[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 Wed 16 Sep - 12:59

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 : 51503
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 Wed 16 Sep - 13:03

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 Thu 17 Sep - 16:17

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 Thu 17 Sep - 16:22

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 Thu 17 Sep - 16:33

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 Thu 17 Sep - 16:42

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 Thu 17 Sep - 17:10


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 Thu 17 Sep - 17:18

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 Thu 17 Sep - 17:25

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 Thu 17 Sep - 17:57

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 Thu 17 Sep - 18:07

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 Thu 17 Sep - 19:18

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 Thu 17 Sep - 19:25

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 Thu 17 Sep - 19:26

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 Thu 17 Sep - 19:38

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 Thu 17 Sep - 20:06

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

- Similar topics

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