Browse Source

Better have a new line after a quote
[compat] bRichTextEnabled set always to true
[compat] fixed a <br> tag appearing if using smc_Editor
fixed a missing comma in penguin settings file

Signed-off-by: emanuele <[email protected]>

emanuele 13 years ago
parent
commit
943dec5f18
2 changed files with 3 additions and 2 deletions
  1. 1 1
      Themes/default/GenericControls.template.php
  2. 2 1
      Themes/default/scripts/editor.js

+ 1 - 1
Themes/default/GenericControls.template.php

@@ -37,7 +37,7 @@ function template_control_richedit($editor_id, $smileyContainer = null, $bbcCont
 						if (!bIsSource)
 							this.toggleTextMode();
 
-						var current_value = bClear ? text : this.getTextareaValue(false) + "\n" + text;
+						var current_value = bClear ? text + "\n" : this.getTextareaValue(false) + "\n" + text + "\n";
 						this.setTextareaValue(current_value);
 
 						if (!bIsSource)

+ 2 - 1
Themes/default/scripts/editor.js

@@ -5,6 +5,7 @@ function smc_Editor(oOptions)
 
 	var editor = $('#' + oOptions.sUniqueId);
 	this.sUniqueId = this.opt.sUniqueId;
+	this.bRichTextEnabled = true;
 }
 
 // Return the current text.
@@ -20,7 +21,7 @@ smc_Editor.prototype.doSubmit = function()
 // Populate the box with text.
 smc_Editor.prototype.insertText = function(sText, bClear, bForceEntityReverse, iMoveCursorBack)
 {
-	$('#' + this.sUniqueId).data("sceditor").InsertText(sText, bClear);
+	$('#' + this.sUniqueId).data("sceditor").InsertText(sText.replace(/<br \/>/gi, ''), bClear);
 }
 
 // Start up the spellchecker!