Jump to content

CkEditor button bbcode replacement

Featured Replies

Posted

Thinking about what to do with some bbcode from a 34X site after it eventually moves to IPS4. Playing with my v4 site I can *almost* get a custom button to do what the bbcode did, but not quite. 

In bbcode I just wrapped a word in the code and it spit out some text with the selection formatted as a search query.  I created an editor button but to recreate the effect requires {content} to appear twice in code:

<a href="http://www.google.com/search?q={content}">{content}</a>

However it fails, like so (this is what appears in the post box:

">{content}

If I replace the quotes with single quotes I get a less broken appearing result, but it's merely linked to google without the query string.

{content}

If I set the button to work with 'option' it will work, but requires more steps: typing and then highlighting the intended search phrase, then retyping it again or pasting it into the option popup.

<a href="http://www.google.com/search?q={option}">{content}</a>

A bit cumbersome and nonintuitive for users. It does create a working query link, at least.

manatee.thumb.png.becae53faacd6593dc9072

Any way to get it working without using the option popup? 

Archived

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

Recently Browsing 0

  • No registered users viewing this page.