There are 4 updates, 3 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-d33a381c-8a4f-43a5-bcb4-48b8c0f01287 XWIKI-22210 Open

Blocks of {{code}} are acting strange

 
View issue   ยท   Add comment
 

4 updates

 
cid:jira-generated-image-avatar-4bc9a754-daa7-411b-8765-02b3f66dfb8e Changes by Ion Claudiu on 14/Jun/24 09:39
 
Summary: Blocks of { { code} } are acting strange
Description: Having a block of \{ { code} } in a page makes editing act weird.

I managed to reproduce them by following the following steps:


1) write text that has \{ { code} } in it
2.1) if there is a space between the text and the block of code, the editing works as long as you don't write next to the block of code
2.2) if there is no space between the text and the block of code, adding a space will also add a new line
3) pressing Delete will delete the entire block of code, pressing Backspace will act as expected (delete the character on the left of the cursor). This is why I think the issue is related to the block of code being inserted in the page as a layout.
- 4) it is impossible to place the cursor before the block of code -

The bug is not present while editing in source mode so this may be a workaround.
Component: CKEditor
Component: Rendering - Code Macro
 
 

3 comments

 
cid:jira-generated-image-avatar-4bc9a754-daa7-411b-8765-02b3f66dfb8e Ion Claudiu on 14/Jun/24 09:38
 

1) Yes, the problem is with the macro syntax, I will edit the description

2) I will change the component to the editor, I did not know what to put there and the code macro seemed appropriate

I also tried again to test, this time with Nikita's trick to jump before the block of code, so step 4 is no longer "impossible".

It behaved the same: if there is no space before the code, adding a space will also send the block on a new line. You can edit on the original line, but if you press Delete at the end of the text, the new line will be deleted alongside the block of code.

Adding text after the macro (with or without space) does not influence it, it works as intended.

 
cid:jira-generated-image-avatar-4bc9a754-daa7-411b-8765-02b3f66dfb8e Ion Claudiu on 14/Jun/24 09:39
 
1) Yes, the problem is with the macro syntax, I will edit the description

2) I will change the component to the editor, I did not know what to put there and the code macro seemed appropriate

I also tried again to test, this time with Nikita's trick to jump before the block of code, so step 4 is no longer "impossible".

It behaved the same: if there is no space before the
\ {{ {{{} code}} {}}} , adding a space will also send the block on a new line. You can edit on the original line, but if you press Delete at the end of the text, the new line will be deleted alongside the block of code.

Adding text after the macro (with or without space) does not influence it, it works as intended.
 
cid:jira-generated-image-avatar-4bc9a754-daa7-411b-8765-02b3f66dfb8e Ion Claudiu on 14/Jun/24 09:39
 
1) Yes, the problem is with the macro syntax, I will edit the description

2) I will change the component to the editor, I did not know what to put there and the code macro seemed appropriate

I also tried again to test, this time with Nikita's trick to jump before the block of code, so step 4 is no longer "impossible".

It behaved the same: if there is no space before the {{{{{}code
{ }} { }}}, adding a space will also send the block on a new line. You can edit on the original line, but if you press Delete at the end of the text, the new line will be deleted alongside the block of code.

Adding text after the macro (with or without space) does not influence it, it works as intended.