aboutsummaryrefslogtreecommitdiff
path: root/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2014-01-22 03:37:52 +0100
committerSem <sembrestels@riseup.net>2014-01-22 03:37:52 +0100
commit4a2ed114bb18c5363f594a380676c5654f4165a4 (patch)
tree3a37094b249c40e3e6bf122691db53115f65f8f0 /mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js
parent673932bc46a3918293a28c2c2fc622b3e5ff6bde (diff)
parent0dd36c458d41e77521c36ae572fe73114ad4bc5a (diff)
downloadelgg-4a2ed114bb18c5363f594a380676c5654f4165a4.tar.gz
elgg-4a2ed114bb18c5363f594a380676c5654f4165a4.tar.bz2
Merge tag '1.8.18' of git://github.com/Elgg/Elgg into develop
1.8.18 Conflicts: mod/tinymce/vendor/tinymce/jscripts/tiny_mce/langs/en.js mod/tinymce/vendor/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js
Diffstat (limited to 'mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js')
-rw-r--r--mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js22
1 files changed, 19 insertions, 3 deletions
diff --git a/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js b/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js
index 5f7755f18..eaa7c7713 100644
--- a/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js
+++ b/mod/tinymce/vendor/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js
@@ -13,14 +13,30 @@
init : function(ed, url) {
// Register commands
ed.addCommand('mceStyleProps', function() {
+
+ var applyStyleToBlocks = false;
+ var blocks = ed.selection.getSelectedBlocks();
+ var styles = [];
+
+ if (blocks.length === 1) {
+ styles.push(ed.selection.getNode().style.cssText);
+ }
+ else {
+ tinymce.each(blocks, function(block) {
+ styles.push(ed.dom.getAttrib(block, 'style'));
+ });
+ applyStyleToBlocks = true;
+ }
+
ed.windowManager.open({
file : url + '/props.htm',
width : 480 + parseInt(ed.getLang('style.delta_width', 0)),
- height : 320 + parseInt(ed.getLang('style.delta_height', 0)),
+ height : 340 + parseInt(ed.getLang('style.delta_height', 0)),
inline : 1
}, {
+ applyStyleToBlocks : applyStyleToBlocks,
plugin_url : url,
- style_text : ed.selection.getNode().style.cssText
+ styles : styles
});
});
@@ -52,4 +68,4 @@
// Register plugin
tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin);
-})(); \ No newline at end of file
+})();