Both Editors showing different source code with ToDo-Macro

Hello,

i try to implement the ToDo-Macro in XWiki 11.8.1

and found a weird thing between the WYSIWYG-Editor and the Wiki-Editor.

This is my Page: xwiki1

The WYSIWYG-Editor shows my a different source code as the Wiki-Editor

WYSIWYG-Editor-Code:

{todo assignee=“test” status=“resolved” priority=“normal”}}
Testitest1
{{/todo}}

Wiki-Editor-Code:
{{todo assignee=“test” status=“resolved” priority=“normal”}}
Testitest1
{{/todo}}

{{todo assignee=“test” status=“open” priority=“low”}}
Testitest2
{{/todo}}

{{todo assignee=“test” status=“open” priority=“normal”}}
Testitest3
{{/todo}}


My Question is how is this possible? and what Editor should i use for this kind of Task

Thank You

Hi,

It seems like a problem with the WYSIWYG editor. I think it’s because when we go to the source code, it tries to load the source after being rendered for the WYSIWYG normal mode. Not sure if that is it or not, but this behavior is definitely peculiar. I also experienced issues like this in the WYSIWYG source code editor, so it’s not very reliable.

Either way, you should always use the wiki editor when you are editing the source code. It shows the real source code and I haven’t experienced any problems like this with it.

Best.

The conversion from HTML (WYSIWYG Editor) to wiki syntax is very reliable. If you have examples where it’s not the case then please report an issue. But AFAIK there are no known major issues.

As a macro developer you need to take care of one thing though: make sure your macro outputs valid HTML. Invalid HTML can break the view mode not just the WYSIWYG editor, but the WYSIWYG editor is more sensitive to invalid HTML than the view mode.

The conversion from HTML (WYSIWYG Editor) to wiki syntax is very reliable . If you have examples where it’s not the case then please report an issue. But AFAIK there are no known major issues.

You are right, my bad. I might have had some issues because of bad code or macros. You have to know exactly what you are doing when using the source and normal edit mode of WYSIWYG to avoid any errors, specifically with the macros as you mentioned.

However, the issue that @inhji states does exist (double checked, same behavior with code from the macro extension page). It might be a bug with the ToDo macro.

First thing to check if whether the TODO macro generates valid HTML.

I will test the HTML generator with the ToDo macro and will inform you.