tinmce update

This commit is contained in:
2014-07-03 21:31:27 +05:30
parent d72ece824c
commit 527743c4c1
9 changed files with 40 additions and 26 deletions

View File

@@ -1,4 +1,3 @@
theme_advanced_toolbar_location: top
theme_advanced_toolbar_align: left
theme_advanced_statusbar_location: bottom
@@ -13,23 +12,20 @@ theme_advanced_buttons3_add:
plugins:
- table
- fullscreen
- advimage
- heading
- image
- textcolor
- link
- code
- autoresize
# - advimage
# - heading
heading_clear_tag: p
width: "100%"
content_css: "/assets/tinymce.css"
toolbar:
- styleselect | bold boldred_btn italic forecolor | list link image table | undo redo | fullscreen code
formats:
boldred: {inline: "b", styles: {color: "red"}}
setup : function(fn) {
// Add a custom button
fn.addButton('firstname', {
title : 'Member First Name',
image : 'resources/scripts/tiny_mce/themes/advanced/img/firstname.gif',
onclick : function() {
// Add you own code to execute something on click
fn.focus();
fn.selection.setContent('{firstname}');
}
});
}
boldred: {selector: "p",block: "p", classes: "mc-important"}
setup: function(ed) {
ed.addButton('boldred_btn', {title:'Bold-Red',icon:"fa fa-red fa-bold", onclick:function() {ed.focus();ed.formatter.toggle('boldred'); }, onPostRender:function() {var ctrl = this; ed.on('NodeChange', function(e) {ctrl.active(e.element.formatter.match('boldred'));}); }});
}