});
if (this._dialog === null) {
- this._dialog = $('<div><textarea class="wcfMessageBBCodeCodeViewerContent" cols="60" rows="12" readonly></textarea></div>').hide().appendTo(document.body);
+ this._dialog = $('<div><textarea cols="60" rows="12" readonly></textarea></div>').hide().appendTo(document.body);
this._dialog.children('textarea').val($content);
this._dialog.wcfDialog({
title: WCF.Language.get('wcf.message.bbcode.code.copy')
}
var textarea = this._dialog.children('textarea')[0];
+ // force LTR for RTL languages
+ if (document.documentElement.dir === 'rtl') {
+ textarea.dir = 'ltr';
+ textarea.style.setProperty('text-align', 'left', '');
+ }
+
var selectAll = function () {
textarea.selectionStart = 0;
textarea.selectionEnd = textarea.value.length;