Last active
March 19, 2017 15:14
-
-
Save AlaaAttya/803e55c7538d3a033ae8eb85b1f2d435 to your computer and use it in GitHub Desktop.
rtl support based on element's name naming convention (append `_ar` to the name of elements you wish to change their direction)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$('textarea').each(function(index, obj) { | |
if(obj.name.indexOf('_ar') != -1) { | |
tinymce.init({selector: "[name="+ obj.name + "]", 'directionality': 'rtl'}); | |
} else { | |
tinymce.init({selector: "[name="+ obj.name + "]", 'directionality': 'ltr'}); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment