The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

i want overline button

View previous topic View next topic Go down

Solved i want overline button

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

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


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

coolkool
Forumember

Posts : 116
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Solved Re: i want overline button

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

[OVERLINE][/OVERLINE]

coolkool
Forumember

Posts : 116
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Solved Re: i want overline button

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

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


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


SLGray
Administrator
Administrator

Male Posts : 36641
Reputation : 2441
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: i want overline button

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

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

coolkool
Forumember

Posts : 116
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Solved Re: i want overline button

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

up Sad

coolkool
Forumember

Posts : 116
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur on 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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

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

Hello

i will try and tell you

coolkool
Forumember

Posts : 116
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur on 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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

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

Posts : 116
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur on 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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

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

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

how i can do that ?

coolkool
Forumember

Posts : 116
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Solved Re: i want overline button

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

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

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

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

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

Posts : 116
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur on 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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

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

It has been no change SadI've apologized made you get tired with me

coolkool
Forumember

Posts : 116
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur on 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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: i want overline button

Post by coolkool on 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 :http://i.imgur.com/Hv2S5TR.png

coolkool
Forumember

Posts : 116
Reputation : 3
Language : arabic

http://x-gaming.lforum.biz

Back to top Go down

Solved Re: i want overline button

Post by Ange Tuteur on 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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


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