How to add HTML , Css, and Javascript directly to the content of your pages?

Undraw Animating

How to add HTML, Css, and Javascript directly to the content of your pages?

About

This article shows you how you can add HTML, CSS, or Javascript to the content of your markup page.

Steps

Give permissions

By default and for security reason, only admin user can write HTML and Javascript on the page.

If you want to allow a user to write HTML and Javascript, you need to add it to the designer group.

Use the Webcode component

The webcode component is a component that shows by default the output of code block that it encapsulates.

By using the inject type, you can write the content of these HTML, Css, or Javascript block codes into your page.

Example

  • The markup
<webcode inject>
    <code html>
<p class="webcode-injected lead mb-4">Quickly design and customize responsive mobile-first sites with ComboStrap, 
a front-end toolkit, based on text markup files with responsive design, and powerful components.</p>
    </code>
    <code css>
.webcode-injected {
   font-weight: bold;
}
    </code>
</webcode>
  • The Output:

Quickly design and customize responsive mobile-first sites with ComboStrap, a front-end toolkit, based on text markup files with responsive design, and powerful components.

Task Runner