markocupic / tinymce_plugin_builder
Contao 下 tinyMCE rte 插件构建器
1.0.0
2017-01-25 21:23 UTC
Requires
- php: >=5.4
- contao-community-alliance/composer-plugin: *
- contao/core: >=3.5,<4
Conflicts
- contao/core: 3.0.*
This package is auto-updated.
Last update: 2024-09-22 22:45:43 UTC
README
本插件作为基础,方便地将额外的、自行编写的插件添加到 TinyMCE。可以作为模板使用的链接为 https://github.com/markocupic/tinymce_newslink。
在 config.php 中配置插件
<?php // system/modules/tinymce_mysuperplugin/config/config.php // Add stylesheet $GLOBALS['TL_CSS'][] = 'system/modules/tinymce_newslink/assets/css/newslink.css'; // Add a plugin to the tinymce editor $GLOBALS['TINYMCE']['SETTINGS']['PLUGINS'][] = 'newslink'; // Add a button to the toolbar in tinymce editor $GLOBALS['TINYMCE']['SETTINGS']['TOOLBAR'][] = 'newslink'; // Add a new config row to the tinymce.init method (string) $GLOBALS['TINYMCE']['SETTINGS']['CONFIG_ROW']['test_string'] = "'This is a test string, and you have to quote it with a single quote.'"; // Add a new config row to the tinymce.init method (json_encoded array from a PHP class) $GLOBALS['TINYMCE']['SETTINGS']['CONFIG_ROW']['newslink_news_data'] = json_encode(TinymceNewslink\TinymceNewslink::getContaoNewsArchivesAsJSON()); // Add a new config row to the tinymce.init method (use the loadLanguageFile-hook) $GLOBALS['TL_HOOKS']['loadLanguageFile'][] = array('TinymceNewslink\TinymceNewslink', 'loadLanguageData');