html

This method creates a message in HTML format.

html(code=String, reply_markup=Hash, extra_params=Hash)

Platforms

Usage

HTML Only

@reply.html("<b>bold</b>, <strong>bold</strong> <i>italic</i>, <em>italic</em><u>underline</u>, <ins>underline</ins>")

HTML with replies below

@reply.html(
  "<b> Here the HTML with some quick_replies </b>",
  {
    quick_reply: [
      {
        payload: :option_1,
        title: "Option 1!"
      },
      {
        url: "https://twitter.com/kogno_framework",
        title: "Follow US!"
      }
    ]
  }
)

From .rhtml template

  code = html_template("main/demo1")
  @reply.html(code)

The template "main/demo1" is located in bot/action_templates/main/demo1.rhtml file.

<% 7.times do %>
  <b>Hello</b> <i>World</i>
<% end

Read more about html_template method here.

Params

Last updated