The challenge was to prescribe their styles in the visual editor of the site on Bitrix. Googling, found such a logic of action.

  1. We prescribe in the styles.css file the style that we want to add to the visual editor.
  2. To make the style appear in the menu, we write in the .styles.php file.

    <? return array ( "example" => array( "tag" => 'p', "title" => "название стиля", "html" => '<span style="border: 2px solid red;color: #ff0000; padding: 4px;">Пример</span>') ); ?> 

After that, your own style will be displayed in the menu of the Bitrix visual editor.

On our site it is implemented differently. The file .styles.php is written as follows:

 <? return array ( ); ?> 

At the same time, their styles are not displayed in the editor menu, and they need to be called up in the editable field via the right mouse button "Properties". I tried to do as in the way I described above, but nothing happened. Still in the menu of the visual editor, the added styles are not displayed.

What is the reason? Which way is better?

    0