Forum > Other

[SOLVED] Problem with post editor - [code] tag

(1/2) > >>

paweld:
Hi,Something has recently gone wrong with the forum post editor, specifically with adding code:
- "insert code" does not close the tag.
- writing code manually (and not by pasting from Lazarus) causes newline characters to disappear, even after editing several times the characters disappear randomly. Often pressing "return" twice helps, but not always.
I checked on Mozilla Firefox (Windows and Android) and MS Edge (Windows).

Martin_fr:

--- Quote ---"insert code" does not close the tag.
--- End quote ---
Works fine for me. Win 10, Firefox.

I can do both, press the "insert code" button first, then insert the text - or insert and select the text, and then press the button.

paweld:
test
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure test;var  s: String;  i: Integer;begin  s := 'test';  i := 2;  Writeln(Format('% %d', [s, i]);end;
 test 2

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- procedure test2; var   a, b: Integer;   s: String; begin   s := 'test2';   a := 2;   b := 3;   WriteLn(s + IntToStr(a * b)); end;

test 3: on new vm windows 10, ms edge without any plugins

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure test3;var  a: Char;  s: String;begin  a := 'a';  s := 's';  Writeln(a + ' ' + s);end; test 4
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure test4;var  x: Integer;  y: Integer;begin  x := 1;  y := x * 2;end;
test 5

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure test5;var  x: Integer;begin  x := 1;end;
note: I edited the first example the see if it was the text entered. I placed a return after test; and it wrapped. Marc

paweld:
Here is an screen recording of the writing of the previous post: https://drive.google.com/file/d/1uRzb19YKqJ9VvOA-eJiH8ADxFKHAvbjd/view?usp=sharing

Martin_fr:
I believe you its happening. The question is why it doesn't happen for me.

My Firefox is up to date at 103.0.2 (64bit)
My Windows is at 21H1

I just checked 21H2 is out since August 9, 2022 => so if you got that already, maybe.... Doesn't explain though why you get the issue on Android too.

I copied your code (without line breaks), and then manually inserted the linebreaks. At the time of writing this I checked via "preview" => and it looks fine.


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure test;var  s: String;  i: Integer;begin  s := 'test';  i := 2;  Writeln(Format('% %d', [s, i]);end; 
I pinged the server admin.
Maybe he has some ideas.

Navigation

[0] Message Index

[#] Next page

Go to full version