diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 75c8846935..7bc81434d0 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -548,9 +548,9 @@ var text_name = 'signature'; // Define the bbCode tags - bbcode = new Array(); - bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]', {custom_tags.BBCODE_NAME}); - imageTag = false; +bbcode = new Array(); +bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]', {custom_tags.BBCODE_NAME}); +imageTag = false; // Helpline messages var help_line = { @@ -566,7 +566,9 @@ var help_line = { s: '{LA_BBCODE_S_HELP}', f: '{LA_BBCODE_F_HELP}', e: '{LA_BBCODE_E_HELP}', - d: '{LA_BBCODE_D_HELP}' + d: '{LA_BBCODE_D_HELP}', + t: '{LA_BBCODE_T_HELP}', + tip: '{L_STYLES_TIP}' ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' @@ -589,24 +591,25 @@ var help_line = { {L_SIGNATURE}

{L_SIGNATURE_EXPLAIN}

- - - - - - - + + + + + + + + - + - + - + - {L_FONT_SIZE}: @@ -622,14 +625,8 @@ var help_line = {

-
-
-
-
-
- +
+
  {L_DISABLE_BBCODE}   @@ -639,8 +636,7 @@ var help_line = {   {L_DISABLE_MAGIC_URL}  

{L_OPTIONS}: {BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS} -
-
+
diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js index c2ea088fd3..54e7e61f3a 100644 --- a/phpBB/adm/style/editor.js +++ b/phpBB/adm/style/editor.js @@ -118,20 +118,20 @@ function bbfontstyle(bbopen, bbclose) insert_text(bbopen + bbclose); // Center the cursor when we don't have a selection - // IE & Opera - if (document.selection) + // Gecko and proper browsers + if (!isNaN(textarea.selectionStart)) + { + textarea.selectionStart = new_pos; + textarea.selectionEnd = new_pos; + } + // IE + else if (document.selection) { var range = textarea.createTextRange(); range.move("character", new_pos); range.select(); storeCaret(document.forms[form_name].elements[text_name]); } - //Gecko - else if (!isNaN(textarea.selectionStart)) - { - textarea.selectionStart = new_pos; - textarea.selectionEnd = new_pos; - } document.forms[form_name].elements[text_name].focus(); return; @@ -155,13 +155,8 @@ function insert_text(text, spaces, popup) { text = ' ' + text + ' '; } - if (textarea.createTextRange && textarea.caretPos) - { - var caret_pos = textarea.caretPos; - caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text; - - } - else if (!isNaN(textarea.selectionStart)) + + if (!isNaN(textarea.selectionStart)) { var sel_start = textarea.selectionStart; var sel_end = textarea.selectionEnd; @@ -169,7 +164,15 @@ function insert_text(text, spaces, popup) mozWrap(textarea, text, '') textarea.selectionStart = sel_start + text.length; textarea.selectionEnd = sel_end + text.length; + } + + else if (textarea.createTextRange && textarea.caretPos) + { + var caret_pos = textarea.caretPos; + caret_pos.text = caret_pos.text.charAt(caret_pos.text.length - 1) == ' ' ? caret_pos.text + text + ' ' : caret_pos.text + text; + } + else { textarea.value = textarea.value + text; @@ -372,7 +375,7 @@ function getCaretPosition(txtarea) // get current selection var range = document.selection.createRange(); - // create a selection of the whole textarea + // a new selection of the whole textarea var range_all = document.body.createTextRange(); range_all.moveToElementText(txtarea);