Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: Predefined HTML opening and closing tags around text?
Status | Resolved |
Add-on / Version | |
Severity | Blocker |
EE Version |
Taylor Tsantles
Mar 30, 2012Hello,
I love Wyvern. Thank you for developing this tool. I’m having a tough time right now because I have no idea (I’ve searched the web up and down, read CKeditor’s docs, everything) how to add buttons in Wyvern that wrap code around certain words. For instance, I want my clients to be able to create this button in the text: http://steadfa.st/FQyA. However, I can’t figure out how to create some kind of button/formatting style in Wyvern that places text in between some predefined opening and closing html tag. EE’s default editor has exactly the functionality I’m talking about. It’s under Admin / Content Administration / Default HTML Buttons (view screenshot: http://steadfa.st/FRVi). This allows you to create formatting buttons that have HTML at the front and back of the text. I have searched through your docs and been unable to find a way to do this. Even if I have to code it in, that’s fine. I just can’t figure out how to do it period. Here’s the HTML for the button I’m talking about (when I refer to “Button”, I don’t mean a button in the Wyvern editor, I mean the button I want to place in the content area):
<div class="btn"><a href="/doctors/" class="white">TEXT GOES HERE<span class="arrow"></span></a></div>
Is there any way of doing this? If there is, can you please help me. I hope I’ve explained it well enough for you to understand what I’m trying to do.
Thank you in advance!
Taylor T.
BoldMinded (Brian)
I don’t think there is an easy way to do that to be honest. As soon as you start adding
tags to the editor it will continue to use that
tag when pressing Return to start a new block of text. So what started out as
tags will change to wrapping all of your text in
tags. With that said, I did to something similar, but it required jQuery. Basically I added a new Button style to wysiwyg.js/css, but on the front-end when the page loads had jQuery wrap the extra tags around that item. It wasn’t the most ideal solution, but it did work.