TinyMce Bootstrap plugin adds a Bootstrap toolbar to tinyMce
with which you can access to visual editors to create/edit the following Bootstrap elements :
Each element is customizable with usual Bootstrap options
You can use your own Bootstrap css, wich will be directly rendered either in tinyMce editor and plugin visual editors.
The new Snippet tool allows to create and store / recall any custom code snippet, Bootstrap or not.
You can for example easily store and reuse in one click :
Bootstrap Modal, Carousel, Navbar, Navbar Tabs, Nav Tabs, Accordion, Popover, ...
Create your own snippets easily in just a few clicks.
TinyMce Bootstrap plugin uses php, so you need to run php to test on localhost.
<script type="text/javascript"> tinymce.init({ selector: "textarea", plugins: [ "bootstrap" ], bootstrapConfig: { 'imagesPath': '/tinymce-bootstrap-plugin/examples/img/' // replace with your images folder path }, toolbar: "bootstrap" }); </script>
<script type="text/javascript"> tinymce.init({ selector: "textarea", plugins: [ "bootstrap" ], toolbar: "bootstrap", bootstrapConfig: { 'bootstrapCssPath': base_url + 'css/bootstrap.min.css', // <= replace with your custom bootstrap path 'imagesPath': '/tinymce-bootstrap-plugin/examples/img/' // replace with your images folder path } }); </script>
Sometimes we need to change tinyMce's background-color :
<script type="text/javascript"> tinymce.init({ selector: "textarea", plugins: [ "bootstrap" ], toolbar: "bootstrap", bootstrapConfig: { 'bootstrapCssPath': base_url + 'css/bootstrap.min.css', // <= replace with your custom bootstrap path 'imagesPath': '/tinymce-bootstrap-plugin/examples/img/', // replace with your images folder path 'tinymceBackgroundColor': '#fff' // replaces editor background-color with custom } }); </script>
Snippet tool uses the following options :
If set to true, the snippet window displays the add / edit / delete buttons
You can for example create your snippets, then turn the option off so the future user cannot edit :
<script type="text/javascript"> tinymce.init({ selector: "textarea", plugins: [ "bootstrap" ], toolbar: "bootstrap", bootstrapConfig: { 'allowSnippetManagement': false, 'imagesPath': '/tinymce-bootstrap-plugin/examples/img/' // replace with your images folder path } }); </script>
These options allow / disallow user to include javascript / php code into snippets.
For security reasons, they're not configured using tinyMce's bootstrapConfig, but hard-coded in php.
To turn on / off :
/tinymce-bootstrap-plugin/examples/tinymce/plugins/bootstrap/snippets/Snippets.php
private $allow_script = false;
private $allow_php = false;
true
or false
as you need.Just list the elements you want to add :
<script type="text/javascript"> tinymce.init({ selector: "textarea", plugins: [ "bootstrap" ], toolbar: "bootstrap", bootstrapConfig: { 'bootstrapElements': { 'btn': true, 'icon': true, 'alert': true }, 'imagesPath': '/tinymce-bootstrap-plugin/examples/img/' // replace with your images folder path } }); </script>
List of available elements : btn, icon, table, template, breadcrumb, pagination, pager, label, badge, alert, panel
Translations are in tinymce/plugins/bootstrap/langs/ directory.
<script type="text/javascript"> tinymce.init({ selector: "textarea", plugins: [ "bootstrap" ], bootstrapConfig: { 'imagesPath': '/tinymce-bootstrap-plugin/examples/img/' // replace with your images folder path }, toolbar: "bootstrap", language: "fr_FR" }); </script>
tinymce-bootstrap-plugin/plugin/bootstrap
into your Joomla tinyMce plugins dir/media/editors/tinymce/plugins/
/plugins/editors/tinymce/
folder and replace it with /tinymce-bootstrap-plugin/joomla/tinymce/
folder/administrator/language/en-GB/en-GB.plg_editors_tinymce.ini
file and replace it with /tinymce-bootstrap-plugin/joomla/en-GB.plg_editors_tinymce.ini
file *Editor - TinyMCE
to access to tinyMce config.* If you need a different language, replace translations in /tinymce-bootstrap-plugin/joomla/en-GB.plg_editors_tinymce.ini
and place it into the corresponding folder instead.
Bug Fix : - fix cursor focus in Bootstrap tables
Improvements : - prevent from stripping empty- add codemirror to Snippets add/edit forms Bug Fix : - fix snippets preg_match_all php warning with php < 5.4.0
Improvement : - improved templates usage Bug Fix : - fix error using very big snippets
Bug Fix : - fix Uncaught SecurityError when used with external iframe on same page
New Features : - add Joomla integration Improvements : - prevent plugin form jQuery conflicts
Improvements : - update to latest tinyMce 4.2.2 - add templates visual aid
New Features : - add snippet tool Improvements : - jshint javascript code
New Features : - add tinymce inline full support Bug Fix : - fix alert edit
New Features : - add tinymceBackgroundColor option
New Features : - add Bootstrap images plugin with Filebrowser - all plugins are fully responsive
Initial Release
Thanks to :