summaryrefslogtreecommitdiff
path: root/program/js/tinymce/plugins/directionality/plugin.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js/tinymce/plugins/directionality/plugin.min.js')
-rw-r--r--program/js/tinymce/plugins/directionality/plugin.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/program/js/tinymce/plugins/directionality/plugin.min.js b/program/js/tinymce/plugins/directionality/plugin.min.js
new file mode 100644
index 000000000..2994eb676
--- /dev/null
+++ b/program/js/tinymce/plugins/directionality/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("directionality",function(t){function e(e){var i,n=t.dom,r=t.selection.getSelectedBlocks();r.length&&(i=n.getAttrib(r[0],"dir"),tinymce.each(r,function(t){n.getParent(t.parentNode,"*[dir='"+e+"']",n.getRoot())||(i!=e?n.setAttrib(t,"dir",e):n.setAttrib(t,"dir",null))}),t.nodeChanged())}function i(t){var e=[];return tinymce.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(i){e.push(i+"[dir="+t+"]")}),e.join(",")}t.addCommand("mceDirectionLTR",function(){e("ltr")}),t.addCommand("mceDirectionRTL",function(){e("rtl")}),t.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:i("ltr")}),t.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:i("rtl")})}); \ No newline at end of file