The editor messes up with my code as I type
-
Hi, I am typing some code in my ‘Code Editor’ window. I noticed more than once that, if I switch tabs in my Firefox browser, the editor automatically inserts garbage ” characters, thus rendering my code useless. It is very frustrating. Here’s an example of messed up code:
[begin]
In coordinates (Frankel, pag.90)
$latex omega = sum_{i_1<ldots<i_p}omega_{i_1ldots i_p}dx^{i_1}wedge='' ldots='' wedge='' dx^{i_p}$='' implies='' that='' $latex='' iota_xomega='sum_jsum_{i_2<ldots<i_p}' x^jomega_{j{}='' i_2ldots='' i_p}='' dx^{i_2}wedgeldots='' dx^{i_p}.$=''
[/end]
The correct code is
[begin]
In coordinates (Frankel, pag.90)
$latex omega = sum_{i_1<ldots<i_p}omega_{i_1ldots i_p}dx^{i_1}wedge ldots wedge dx^{i_p}$ implies that $latex iota_xomega=sum_jsum_{i_2<ldots<i_p} X^jomega_{j{} i_2ldots i_p}dx^{i_2}wedgeldots dx^{i_p}.$
[/end]
As you see, the editor automatically inserted '' and ''= and <='' characters.What can I do to avoid this to happen again?
Thanks.The blog I need help with is: (visible only to logged in users)
-
Hi @negropeppe, sorry to hear it’s been giving you trouble. Could you paste your original code here, wrapped in backticks so it won’t get edited by our forums softare?
We’ll do some testing with it.
-
Hey, thanks for replying. The following LaTeX code is troublesome.
[code]
In coordinates (Frankel, pag.90)
$latex omega = sum_{i_1<ldots<i_p}omega_{i_1ldots i_p}dx^{i_1}wedge ldots wedge dx^{i_p}$ implies that $latex iota_x omega=sum_jsum_{i_2<ldots<i_p} X^jomega_{j{} i_2ldots i_p}dx^{i_2}wedgeldots dx^{i_p}.$
[/code]I tried again just now, it happens every time. I paste this code in a new editor window, and then as soon as Firefox loses focus, or if I switch tab, or even if I hit the “Preview” button, it turns into this:
[code]
In coordinates (Frankel, pag.90)
$latex omega = sum_{i_1<ldots<i_p}omega_{i_1ldots i_p}dx^{i_1}wedge="" ldots="" wedge="" dx^{i_p}$="" implies="" that="" $latex="" iota_x="" omega="sum_jsum_{i_2<ldots<i_p}" x^jomega_{j{}="" i_2ldots="" i_p}dx^{i_2}wedgeldots="" dx^{i_p}.$="" [="" end]="" <="" p=""></i_p}omega_{i_1ldots>
[/code]The Latex plugin does not compile the latter code.
Thanks a lot for your assistance!
-
Hm, that doesn’t look like the proper syntax for our system: https://en.support.wordpress.com/latex/
What is the URL of the site with the problem?
-
Here’s the URL:
https://wordpress.com/block-editor/post/negropeppe.wordpress.com/3586
I had to remove the troublesome part, however.
Concerning the syntax, maybe you refer to the use of “<“. That’s another thing that the code editor changes automatically. I typed “<“.
-
What exactly do you mean by “code editor”? Do you mean the HTML view of the editor? In WP-Admin or My Sites?
The editor link you gave above is for the block editor. Are you using the code block, or editing the entire post or a specific block in HTML mode?
if I switch tabs in my Firefox browser
And are you referring to browser tabs here? Or to the Visual/HTML tabs in the editor? Switching browser tabs shouldn’t cause anything at all to happen in the editor, and the editor tabs only exist in the classic editor, not in the block editor, so the mention of that along with a link to the block editor is a bit confusing.
Are you trying to add the code so the source code is visible in the final post, or do you want the actual LaTeX output to be reflected in the published post?
The HTML view of the editor is to write HTML markup, not for posting source code or LaTeX code. Both of those are added in the visual mode of the editor instead, source code within
[code]shortcodes, and LaTeX as explained in the support page staff-blorbo linked to above.If you use the block editor, just type it directly in a new paragraph block.
-
I was using the “Code Editor” as opposed to the “Visual Editor” (I access it via the three-dots menu, in the upper right corner of the screen). I intend to have the LaTeX code compiled. By “swapping tabs” I referred to the browser’s tabs.
The problem seems to not be happening any more, after a browser update. It was probably browser-related then. I hope I won’t be bothering you again.
Thank you for the support.
-
- The topic ‘The editor messes up with my code as I type’ is closed to new replies.