Views: 1425
Last Modified: 27.04.2023

Application for panel above the input field

Embedding code: IM_TEXTAREA

This format was available previously and isn't new. It generates content at the moment of message writing.

Parameters

Parameter Required Description
iconName Yes Icon class name in the format Font Awesome (for example, fa-cloud).
context No Chat type to embed the app (ALL by default). Supports the multiple selection via ; of the following values:
  • USER – all user chats, excluding bots;
  • CHAT – all group chats, except lines and crm;
  • LINES – chat type lines (open channels);
  • CRM – only chats created within CRM;
  • ALL – all chats.
role No Application is available for this user role (USER by default). Supports the following values:
  • USER – application is available for all users;
  • ADMIN – application is available only for Bitrix24 administrators.
color No Color. Available values: RED, GREEN, MINT, LIGHT_BLUE, DARK_BLUE, PURPLE, AQUA, PINK, LIME, BROWN, AZURE, KHAKI, SAND, ORANGE, MARENGO, GRAY, GRAPHITE.
width No Recommended frame width in the legacy chat design (100 by default).
height No Recommended frame height as in the legacy chat design (100 by default).
extranet No Application is available for extranet users (N by default). Supports the following values:
  • N – application is unavailable for extranet users;
  • Y – application is available for extranet users.

This embedding has a current opening context, passed via current chat's dialogId.

const context = BX24.placement.info().options;

Opens application's IFRAME with specified dimensions. The system automatically reduces the size, if it exceeds the permissible value (your application must consider this).

Call example:

CRest::call(
    'placement.bind',
    [
        'PLACEMENT' => 'IM_TEXTAREA',
        'HANDLER' => 'https://example.com/apps/immarket/handlers/textarea.php',
        'LANG_ALL' => [
            'en' => [
                'TITLE' => 'Application for panel above the input field',
            ],
        ],
        'OPTIONS' => [
            'iconName' => 'fa-bars',
            'context' => 'USER;CHAT',
            'role' => 'USER',
            'color' => 'GRAPHITE',
            'width' => '200',
            'height' => '100',
            'extranet' => 'N',
        ]
    ]
);





Courses developed by Bitrix24