I solved this problem by adding this line:
'add_directives' => true,
in this file
/vendor/magento/module-cms/Model/Wysiwyg/Config.php
the block should looks like this:
$config->setData(
[
'enabled' => $this->isEnabled(),
'hidden' => $this->isHidden(),
'use_container' => false,
'add_variables' => true,
'add_widgets' => true,
'no_display' => false,
'encode_directives' => true,
'baseStaticUrl' => $this->_assetRepo->getStaticViewFileContext()->getBaseUrl(),
'baseStaticDefaultUrl' => str_replace('index.php/', '', $this->_backendUrl->getBaseUrl())
. $this->filesystem->getUri(DirectoryList::STATIC_VIEW) . '/',
'directives_url' => $this->_backendUrl->getUrl('cms/wysiwyg/directive'),
'popup_css' => $this->_assetRepo->getUrl(
'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/dialog.css'
),
'content_css' => $this->_assetRepo->getUrl(
'mage/adminhtml/wysiwyg/tiny_mce/themes/advanced/skins/default/content.css'
),
'width' => '100%',
'height' => '500px',
'plugins' => [],
'add_directives' => true,
]
);
It is working in Magento 2.1.7