Is your feature request related to a problem? Please describe.
Languages like Arabic, Persian, Hebrew, require right-to-left support for the admin layout.
Describe the solution you'd like
Enable right-to-left for the admin panel. This could be done:
I guess we can start with #1 and then increase the complexity of the support afterwards.
Describe alternatives you've considered
I tried putting dir="rtl" in the root html element of the admin page. but it didn't work well (see the screenshot below).
Additional context
(WIP) CSS changes necessary to make this work:
padding-left
to be on right as well: https://github.com/netlify/netlify-cms/blob/a9666aadd49ad5d375d00c6df597a4d25ab577ca/packages/netlify-cms-core/src/components/Collection/Collection.js#L19dir=rtl
is set.text-align: initial
instead of text-align: left/right
when wanting something un-centered.This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Perhaps below snippet could help someone. It partially forces RTL layout. Just add it to the admin page's index.html
.
<script>
var PostPreview = createClass({
render: function() {
var entry = this.props.entry;
var image = entry.getIn(['data', 'image']);
var bg = this.props.getAsset(image) || '';
return h('div', {'dir': 'rtl'},
h('h1', {}, entry.getIn(['data', 'title'])),
h('img', {src: bg.toString()}),
h('div', {"className": "text"}, this.props.widgetFor('body'))
);
}
});
CMS.registerPreviewTemplate("posts", PostPreview);
</script>
Most helpful comment
Perhaps below snippet could help someone. It partially forces RTL layout. Just add it to the admin page's
index.html
.