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.

Create a button

4 posters

Go down

Create a button Empty Create a button

Post by ahmed Salman August 8th 2016, 9:07 am

How can I create a button

When click on it
[example]text[/example]

But the truth is a text HTML
like that
<div class="new"><p>example</p></div>

i want [example]text[/example] work on <div class="new"><p>example</p></div>
ahmed Salman
ahmed Salman
New Member

Posts : 24
Reputation : 1
Language : en

Back to top Go down

Create a button Empty Re: Create a button

Post by Draxion August 8th 2016, 9:43 am

Hi there,

Can you explain your issue a little clearer cause I am a little puzzled on what exactly you are needing? Are you just trying to make a simple button that links to somewhere?
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Create a button Empty Re: Create a button

Post by ahmed Salman August 8th 2016, 9:48 am

that [example]text[/example] show in topic
Create a button 2016-014

that is code html i want that working bbcode
ahmed Salman
ahmed Salman
New Member

Posts : 24
Reputation : 1
Language : en

Back to top Go down

Create a button Empty Re: Create a button

Post by Draxion August 8th 2016, 9:51 am

You just want it working in BBCode or you want HTML to work in posts?
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Create a button Empty Re: Create a button

Post by ahmed Salman August 8th 2016, 9:55 am

I want button action in the editor
Lead to the inclusion of this code

[example][/example]


And after sending shows this format

<div class="new"></div>
ahmed Salman
ahmed Salman
New Member

Posts : 24
Reputation : 1
Language : en

Back to top Go down

Create a button Empty Re: Create a button

Post by Draxion August 8th 2016, 9:57 am

Oh... I get it. There is something that could help. Do you understand code well?
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Create a button Empty Re: Create a button

Post by ahmed Salman August 8th 2016, 10:09 am

I did not understand you
ahmed Salman
ahmed Salman
New Member

Posts : 24
Reputation : 1
Language : en

Back to top Go down

Create a button Empty Re: Create a button

Post by ahmed Salman August 9th 2016, 12:41 am

?????
ahmed Salman
ahmed Salman
New Member

Posts : 24
Reputation : 1
Language : en

Back to top Go down

Create a button Empty Re: Create a button

Post by YoshiGM August 9th 2016, 4:15 am

Hi,
To do that, you need to use a Javascript code:

ACP > Modules > HTML & Javascript Management > Javascript Management > Create One
Place: In all pages

Code:
$(function(){
    $(function(){
          $('<a class="sceditor-button sceditor-button-new-button-name" unselectable="on" title="Additional Info on Hover Here"><div unselectable="on" style="background-image:url(http://icons.iconarchive.com/icons/icons8/windows-8/16/City-No-Smoking-icon.png)">NEW_BUTTON_NAME</div></a>').insertAfter('.sceditor-button-fahide').click(function(){
              $('#text_editor_textarea').sceditor("instance").insertText("[BBCODE]","[/BBCODE]");
          });
      });
});

Explatation to edit it:


•Change the class “sceditor-button-new-button-name” to your new button name. Useful if you want to add a button after or before it later.
Change the title= to a more descriptive, helpful text for the user.
•Change the background-image to what the button will look like.
•Change NEW_BUTTON_NAME to the buttons name.

•Find the class name of the button where you want this placed after and then change insertAfter(‘.sceditor-button-fahide‘) .sceditor-button-fahide to that button’s class name. You can change insertAfter to insertBefore if needed.

Finally, change the insertText as you need it.
NOTE: You can use HTML if you have it enabled on your board.

YoshiGM
YoshiGM
Active Poster

Male Posts : 1562
Reputation : 146
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Create a button Empty Re: Create a button

Post by SLGray August 9th 2016, 4:48 am

ahmed Salman wrote:I did not understand you

ahmed Salman wrote:
?????
Please don't double post. Your posts need to be separated by 24 hours before bumping. Please use the edit button, instead!
Please read our forum rules:  ESF General Rules


Create a 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 : 51555
Reputation : 3524
Language : English
Location : United States

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

Back to top Go down

Create a button Empty Re: Create a button

Post by ahmed Salman August 9th 2016, 12:09 pm

ok i have that code css

Code:
.solved{background:url(http://i35.servimg.com/u/f35/19/50/18/33/solved10.png) no-repeat scroll 99% center #9FF;border:1px solid #0CF;border-radius:5px 5px 5px 5px;color:#999;direction:rtl;margin:10px auto;padding:0 0 2px;width:60%}.solved p{color:#999;font-weight:700;margin:12px 29px 9px 12px;padding-right:18px;text-shadow:0 0 0 #fff}

i want When click the button show [BBCODE][/BBCODE] when i send post that show my code css (.solved) Rolling Eyes
ahmed Salman
ahmed Salman
New Member

Posts : 24
Reputation : 1
Language : en

Back to top Go down

Create a button Empty Re: Create a button

Post by ahmed Salman August 10th 2016, 10:31 am

i need help
ahmed Salman
ahmed Salman
New Member

Posts : 24
Reputation : 1
Language : en

Back to top Go down

Create a button Empty Re: Create a button

Post by ahmed Salman August 11th 2016, 2:14 pm

if you cant help me in this
i want hashtag button
ahmed Salman
ahmed Salman
New Member

Posts : 24
Reputation : 1
Language : en

Back to top Go down

Back to top

- Similar topics

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