soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
314 stars 29 forks source link

Add inline shortcodes #25

Open ramnathk opened 5 years ago

ramnathk commented 5 years ago

Describe the feature you'd like to see included in Oxygen. I would like to include icons in headings and rich-text content. I would like to add an icon as a shortcode like [fa-bar class="myiconclass" size="20"] or something like that so that I can quickly add and style the icon.

What are the use cases for this feature? Creating social links, icons in subheadings etc. If I not I need to add icon and text to a div, adn sometimes if the icon is in the middle of text, it gets really hard to get it done right

Examples of this feature or functionality. I personally like themeco's implementation - http://demo.theme.co/integrity-1/shortcodes/icons/

LordWhisper commented 5 years ago

This should be renamed to [shortcodes] in general, als the use cases are very wide spread. I for example just wanted to open an issue as I'd need shortcodes to be working in general since I do create some standard elements as shortcodes for clients to use.

Now, I'd say there is a shortcode ability within oxygen itself but as we're not allowed to give our clients access to oxygen this is a highly needed ability. For now I'm very much stuck as I don't know how for example have my client being able to add a youtube video within their content if they like.

shoelaced commented 4 years ago

An icon selector would be a great addition to the <span> option in inline headings, etc.

WisChrendel commented 3 years ago

Anyone have a work around for inline shortcode? I am trying to use it to generate dynamic keywords by reading URL parameters and it won't work. Any help would be appreciated!

shoelaced commented 3 years ago

@WisChrendel I haven't tested this recently but I seem to remember getting around it by creating a new block with the shortcode, then copying the generated shortcode and pasting it in. No promises though, I can't remember how long ago I tried this or what the context was and it may not work everywhere.

HmCody commented 3 years ago

This isn't elegant, but it worked for me.

Create a <div> with a rich text or regular text element in it. Next, add a shortcode element. Finally, if needed, another text element. Fill each element with the appropriate text/shortcode. For the <div> element, set "Layout Child Elements" to "Horizontal" and "Width" to "Auto." Everything should now run together as if it is one element.

BenUniqcode commented 2 years ago

If you just want to intermingle shortcodes and plain text, you can do that using a Shortcode block.

Despite its name, the "Full shortcode" field will quite happily accept a mixture of plain text and one or more shortcodes, and render it as you would expect.

You can't enter line breaks into this field of course, because it's a text input rather than a textarea. But if you want line breaks you can add them using a shortcode for that purpose.

You can also use this technique for headings (change the shortcode block's Tag to H1 or whatever).

But it would still be nice if shortcodes could be embedded in Rich Text and other blocks.