# Inline code in Elements

**URL:** <https://forums.realmacsoftware.com/t/inline-code-in-elements/55245>\
**Category:** Elements\
**Created:** [March 21, 2026, 11:49pm UTC](https://forums.realmacsoftware.com/t/inline-code-in-elements/55245 "2026-03-21T23:49:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdlong](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mdlong](https://forums.realmacsoftware.com/u/mdlong)\
**Post date:** [March 21, 2026, 11:49pm UTC](https://forums.realmacsoftware.com/t/inline-code-in-elements/55245/1 "2026-03-21T23:49:29Z")

</div>

I am a long-time RW use (now on Classic) and my membership site depends heavily upon executing snippets of code within the text of many pages. In discussion with a developer he mentioned that;

“The only thing I find missing from Elements compared to RW is the ability to put code inline embedded in text. In RW you can just type code in a paragraph such as:

You are logged in as \<?php echo $slusername\_html; ?\> and you are welcome here.

which is not directly possible in Elements as far as I can see.”

Does anyone have any comment on this? I run an education website and frequently use such things to handle the many different students categories that use the site.

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [March 22, 2026, 9:51am UTC](https://forums.realmacsoftware.com/t/inline-code-in-elements/55245/2 "2026-03-22T09:51:39Z")

</div>

You can use [Custom Components in Elements](https://docs.realmacsoftware.com/elements-docs/elements/components/custom-components), this would allow you to achieve whatever you wanted!

Happy to help and provide an example if needed 🙂

---

<div class="post-metadata">

**Author:** ![annebourdon](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/annebourdon/32/2391_2.png) [@annebourdon](https://forums.realmacsoftware.com/u/annebourdon)\
**Post date:** [March 22, 2026, 9:55am UTC](https://forums.realmacsoftware.com/t/inline-code-in-elements/55245/3 "2026-03-22T09:55:19Z")

</div>

> [@mdlong](#):
>
> You are logged in as \<?php echo $slusername\_html; ?\> and you are welcome here.

Hi,

You could use the Markdown component for this kind of code.

---

<div class="post-metadata">

**Author:** ![mdlong](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mdlong](https://forums.realmacsoftware.com/u/mdlong)\
**Post date:** [March 22, 2026, 8:01pm UTC](https://forums.realmacsoftware.com/t/inline-code-in-elements/55245/4 "2026-03-22T20:01:43Z")

</div>

Thanks Dan. To clarify my issue a bit more. My site has perhaps 300-500 pages (I haven’t counted in a long time), and I have code embedded multiple times in every page - sometimes just a snippet of HTML, sometimes quite a bit of PHP.

If every one of these code snippets requires a Custom Component there will be thousands of them. And from my superficial understanding of Elements, these will all be taking up space in the Custom Component section of the sidebar. Is this the only way?

In RW Classic it is easy to embed code and then use _Format → Ignore formatting_. Is this something that can be done in Elements?

---

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [March 23, 2026, 7:56am UTC](https://forums.realmacsoftware.com/t/inline-code-in-elements/55245/5 "2026-03-23T07:56:12Z")

</div>

> [@mdlong](#):
>
> If every one of these code snippets requires a Custom Component there will be thousands of them

Are all of your code snippets unique, or do you have the same/similar code snippets that just need to change a couple of variables?

Could you share a couple of your common code snippets, or some examples of what you need to embed and we can help find the best way to include those 🙂

---

<div class="post-metadata">

**Author:** ![mdlong](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mdlong](https://forums.realmacsoftware.com/u/mdlong)\
**Post date:** [March 23, 2026, 9:09am UTC](https://forums.realmacsoftware.com/t/inline-code-in-elements/55245/6 "2026-03-23T09:09:18Z")

</div>

Thanks Ben. While there are some snippets of code that are similar across pages, many/most are unique. We run an educational site and this involves lots of online quizzes/exams, which have many unique components (there’s a few hundred of these).

We also have different categories of student, studying different courses, so we need to change the information displayed on the fly depending upon the student that is logged in. We use Sitelok to keep track of the membership side of things, but we have lots of PHP in the pages that is used to access the SQL database and then configure the information appropriately, depending upon the type of student.

As I mentioned, my concern is that creating a Custom Component for every one of these will quickly overwhelm the Elements library and make it too unwieldy.

---

<div class="post-metadata">

**Author:** ![dan](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/dan/32/28516_2.png) [@dan](https://forums.realmacsoftware.com/u/dan)\
**Post date:** [March 23, 2026, 11:21am UTC](https://forums.realmacsoftware.com/t/inline-code-in-elements/55245/7 "2026-03-23T11:21:41Z")

</div>

Hi @mdlong,

Elements is super super flexible and can absolute do what you need, without creating 100’s of custom components…

You can re-use custom components, the way to do this would be to create drop zones, or properties. Here’s a VERY simply example of a reusable html custom component.

👉 [Open Sample Project in Elements](elementsapp://downloadDocument/0L25A3xE0C2c)

 ![CleanShot 2026-03-23 at 11 .17.57@2x](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/1/0/10ad110fab340aa52a41161841923e5c4987791b.jpeg)

Custom Components are really powerful and you could improve your site by building a few to make your life easier, especially if you have any similar content you use throughout your site. We have a [full API](https://docs.realmacsoftware.com/elements-docs/elements-language) that allows you build anything you want 🙂

[![](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/f/8/f818708e31c4427895cde23fde83f6fff70394d2.jpeg "Elements Dev Talk: A Guide to Custom Components") ](https://www.youtube.com/watch?v=aqOOChtClwI)

Hope that helps 😅

---

<div class="post-metadata">

**Author:** ![mdlong](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@mdlong](https://forums.realmacsoftware.com/u/mdlong)\
**Post date:** [March 25, 2026, 7:41am UTC](https://forums.realmacsoftware.com/t/inline-code-in-elements/55245/8 "2026-03-25T07:41:43Z")

</div>

Many thanks for your input. I will start experimenting and see how I go.
