mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Adding RTL/LTR support to timymce
This commit is contained in:
@@ -20,5 +20,6 @@ tinyMCE.init({
|
||||
extended_valid_elements: "script[type|defer|src|language]",
|
||||
menubar: false,
|
||||
statusbar: false,
|
||||
skin: 'orchardlightgray'
|
||||
skin: 'orchardlightgray',
|
||||
directionality: directionality
|
||||
});
|
||||
@@ -1,12 +1,15 @@
|
||||
@using Orchard.Environment.Descriptor.Models
|
||||
@using System.Globalization
|
||||
@using Orchard.Environment.Descriptor.Models
|
||||
|
||||
@{
|
||||
var shellDescriptor = WorkContext.Resolve<ShellDescriptor>();
|
||||
var currentCulture = CultureInfo.GetCultureInfo(WorkContext.CurrentCulture);
|
||||
}
|
||||
|
||||
<script type="text/javascript">
|
||||
var mediaPickerEnabled = @(shellDescriptor.Features.Any(x => x.Name == "Orchard.MediaPicker") ? "true" : "false");
|
||||
var mediaLibraryEnabled = @(shellDescriptor.Features.Any(x => x.Name == "Orchard.MediaLibrary") ? "true" : "false");
|
||||
var directionality = @(currentCulture.TextInfo.IsRightToLeft ? "rtl" : "ltr");
|
||||
</script>
|
||||
|
||||
@{
|
||||
|
||||
Reference in New Issue
Block a user