Thanks carbonize :-))

I compared the *posted script* with the real script and find few others
errors too. :-(

I dont know where the bad lines from ? The parser of the forum ?

I retry to copy/paste the code from the real script.


[b][color=#ff0000]I find it!![/color] The problem is apparent in the Preview
window of the post editor.[/b]
The code in the Preview part is not the code in the Reply part.

Ok! I will use bbcode trick/hack to gain a good code translate. The editor
unlike the sequence _[__]_


_[color=#008000]Find and replace these lines :[/color]_
/* [*b*][/*b*] */
function insertB_BBCode(){
  var ceDoc = newEditor();
  ceDoc.assignActiveEditor();
  var s = ceDoc.selText();
  s = "[*b*]"+s+"[*/b*]";
  ceDoc.selText(s);
}

/* [_i_][_/i_] */
function insertI_BBCode(){
  var ceDoc = newEditor();
  ceDoc.assignActiveEditor();
  var s = ceDoc.selText();
  s = "[_i_]"+s+"[_/i_]";
  ceDoc.selText(s);
}

/* [*code*][*/code*] */
function insertCODE_BBCode(){
  var ceDoc = newEditor();
  ceDoc.assignActiveEditor();
  var s = ceDoc.selText();
  s = "[*code*]"+s+"[*/code*]";
  ceDoc.selText(s);
}

/* [*center*][*/center*] */
function insertCENTER_BBCode(){
  var ceDoc = newEditor();
  ceDoc.assignActiveEditor();
  var s = ceDoc.selText();
  s = "[*center*]"+s+"[*/center*]";
  ceDoc.selText(s);
}


[b]And in the menu items, [color=#008000]find and replace these others lines too
:[/color][/b]
  addMenuItem("Insérer BBCode [*b*] [*/b*]", "BBCode",
"insertB_BBCode", "");
  addMenuItem("Insérer BBCode [_i_] [_/i_]", "BBCode",
"insertI_BBCode", "");

  addMenuItem("Insérer BBCode [*color=n*] [*/color*]", "BBCode",
"insertCOLOR_BBCode", "");

  addMenuItem("Insérer BBCode [*code*] [*/code*]", "BBCode",
"insertCODE_BBCode", "");

  addMenuItem("Insérer BBCode [*center*] [*/center*]", "BBCode",
"insertCENTER_BBCode", "");


I will double check my inserts in the future...

:)

-- 
<http://forum.pspad.com/read.php?2,33131,60256>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem