Text Formating

Classes List:

  • header

  • center

Text Colors:

  • darkred, red, lightred, darkgreen, green, lightgreen, darkblue, blue, lightblue, yellow, orange, pink, purple

Also if you know about CSS you can create your own custom style classes or use style="" option and create your own unique look, for people who have no idea about CSS style default classes have been created which usage is shown below

Name
Usage

Header Text

<div class="header">TEXT_HERE</div>

Center Text

<div class="center">TEXT_HERE</div>

Bolded Text

<div><b>TEXT_HERE</b></div>

Color - Dark Red

<div class="darkred">TEXT_HERE</div>

Color - Red

<div class="red">TEXT_HERE</div>

Color - Light Red

<div class="lightred">TEXT_HERE</div>

Color - Dark Green

<div class="darkgreen">TEXT_HERE</div>

Color - Green

<div class="green">TEXT_HERE</div>

Color - Light Green

<div class="lightgreen">TEXT_HERE</div>

Color - Dark Blue

<div class="darkblue">TEXT_HERE</div>

Color - Blue

<div class="blue">TEXT_HERE</div>

Color - Light Blue

<div class="lightblue">TEXT_HERE</div>

Color - Yellow

<div class="yellow">TEXT_HERE</div>

Color - Orange

<div class="orange">TEXT_HERE</div>

Color - Pink

<div class="pink">TEXT_HERE</div>

Color - Purple

<div class="purple">TEXT_HERE</div>

Clickable Link

<div><a onclick="openUrl('URL_HERE')">TEXT_HERE</a></div>

Clickable function in game Below is an explanation of usage.

<div onclick="useAction(1)">USE ME</div>

Image

<img src="URL_IMAGE" draggable="false"/>

New Line

<br>

You can use the clickable function, e.g. to start job, to teleport on coords and many others, you add the function action to Config.Actions

Config.Actions = {
    [1] = function()
        -- Here you can add what you want, triggers, exports and everything
        SetEntityCoords(PlayerPedId(), vector3(414.3, -978.43, 28.45)) -- thats example usage
        SetEntityHeading(PlayerPedId(), 266.26) -- thats example usage
        closeBook() -- this function closes the book when you press on the text above
    end
}

The page shown above was written in this way:

const pages = {
    'default': {
        [1]: `
                <div class="header">HEADER TEXT</div>
                <div class="center">CENTER TEXT</div>
                <div><b>BOLD</b></div>
                <div class="darkred">DARK RED TEXT</div>
                <div class="red">RED TEXT</div>
                <div class="lightred">LIGHT RED TEXT</div>
                <div class="darkgreen">DARK GREEN TEXT</div>
                <div class="green">GREEN TEXT</div>
                <div class="lightgreen">LIGHT GREEN TEXT</div>
                <div class="darkblue">DARK BLUE TEXT</div>
                <div class="blue">BLUE TEXT</div>
                <div class="lightblue">LIGHT BLUE TEXT</div>
                <div class="yellow">YELLOW TEXT</div>
                <div class="orange">ORANGE TEXT</div>
                <div class="pink">PINK TEXT</div>
                <div class="purple">PURPLE TEXT</div>
                <div><a onclick="openUrl('URL_HERE')">CLICKABLE LINK</a></div>
        `,
        [2]: `
                <br>
                <br>
                <br>
                <div class="header center red" onclick="useAction(1)">CLICKABLE FUNCTION IN GAME</div>
                <br>
                <img src="https://i.imgur.com/vkYfkdB.gif" style="border-radius:15px" draggable="false"/>
        `
    }
}

Last updated

Was this helpful?