i want overline button
3 posters
Page 1 of 1
i want overline button
Hello
I want to put a button in this way: ( )
And the effect of the button: puts the line at the top of Speech
Re: i want overline button
This BBcode tag is not supported by the editor.coolkool wrote:[OVERLINE][/OVERLINE]
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: i want overline button
yes i know this
So I want to put in effect on this shortcut [OVERLINE][/OVERLINE]
Re: i want overline button
Only way I can think would be the table tags. For example :
Could use HTML too if you have that enabled.
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.
Re: i want overline button
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
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
Remember to replace IMAGE by an image URL.
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.
Re: i want overline button
- Code:
<span style="border-top:1px solid">
but this code is html
it's work on the bbcode?
Re: i want overline button
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'
});
Re: i want overline button
In the script, replace :
by :
- Code:
toolbar += ',overline'
by :
- Code:
toolbar = toolbar.replace(/(,underline)/, ',overline$1');
Re: i want overline button
it's cool but look that :
If the overline button before became the button underline
I want to overline Mark button after button underline
like that : https://i.imgur.com/ZoOMn3Y.png
Re: i want overline button
That should have done it. Weird.
Try replacing the script with this :
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');
});
Re: i want overline button
Do you have any script modifying the position of the underline button ? That would most likely be the cause.
Re: i want overline button
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
Re: i want overline button
Ah.. I figured that was the problem. Glad you figured it out.
Topic archived
Have a good day. ^^
Topic archived
Have a good day. ^^
Similar topics
» "Back to Top" Button too small and too near "Report" button.
» "Do not display again button" how to re enable(without clear cache) or use it just as a close button...?
» Adding a reply button next to the quote button to automatically tag users?
» Change Quote Button, Edit Button and more into the text
» I need a button modified and text adding on this button
» "Do not display again button" how to re enable(without clear cache) or use it just as a close button...?
» Adding a reply button next to the quote button to automatically tag users?
» Change Quote Button, Edit Button and more into the text
» I need a button modified and text adding on this button
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum