Jump to content

Buttons into editor


Steph Jensen

Recommended Posts

Posted

Is there a way to add buttons into the text that i type in through the editor?
I'd like to use the same CSS as the buttons on the rest of the site to maintain the same style, hover effects etc

Any tips on how i can do this?
On Wordpress, that i am used to, there is a shortcode to insert buttons. Is there a similar feature here, or whould i need to type in the HTML of a button, and how would i get hold of that?

Posted

<a href="#replyForm" class="ipsButton ipsButton_important ipsButton_medium ipsButton_fullWidth" data-action="replyToTopic">Reply to this topic</a>

 

<a href="#replyForm" class="ipsButton ipsButton_important ipsButton_medium ipsButton_fullWidth" data-action="replyToTopic">Reply to this topic</a>

 

I just right clicked on a button here on the site and chose Inspect. Whould it somehow work to past this in a post in a particular way?

Posted

What are you trying to achieve by having the buttons in your text? Are you making some step-by-step instructions?

Your editor will need to allow HTML in order to paste in the appropriate HTML/CSS to insert the button code, but be sure to remove things like HREFs and data- attributes as that could cause your pasted in button to behave just like the real thing (which is probably what you don't want happening).

Posted
    <a class='login' href="YOUR URL" seoTemplate="login" protocol="\IPS\Settings::i()->logins_over_https">YOUR TEXT</a>
    <a class='register' href="YOUR URL" seoTemplate="register">YOUR TEXT</a>

Above two examples that can use

Posted

Thanks for the replies here!

One more thing to add into all the advice, is that you need to enable HTML posts for your account. There is a warning to only allow this type of posts to groups that you trust. For me, i am the only administrator, so i could turn it on, and paste the html code for the buttons.

As @Joy Rex asked, this is simply for a call to action promt. So when the user has read a whole page about clubs, i add two buttons. One primary button that maybe sends him/her to browse the Clubs, and an alternative option, that maybe sends the user to the category for more articles about clubs. It's simply to keep the user active and offer them reasons to stay on the site some more

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...