turnermm / ckgedit

CKEditor integrated into Dokuwiki
https://www.dokuwiki.org/plugin:ckgedit
GNU General Public License v2.0
60 stars 49 forks source link

MULTI_PLUGIN in combination with listings #692

Open Juergen-aus-Zuendorf opened 1 year ago

Juergen-aus-Zuendorf commented 1 year ago

Hi,

there seems to be a problem with MULTI_PLUGIN_CLOSE in combination with listings.

For example, I have the following wiki text (appearance in native editor):

===== Spielplatz =====

~~MULTI_PLUGIN_OPEN~~

~~MULTI_PLUGIN_CLOSE~~

Liste:

  - Zeile 1 \\ Folgezeile 1
  - Zeile 2 \\ Folgezeile 2

If I open and save the page with this syntax in CKGEditor, everything is fine. If I insert some code afterwards (e.g. a line break) between MULTI_PLUGIN_OPEN and MULTI_PLUGIN_CLOSE, the listing code changes to this (again in native editor):

===== Spielplatz =====

~~MULTI_PLUGIN_OPEN~~

~~MULTI_PLUGIN_CLOSE~~

Liste:

  - Zeile 1

Folgezeile 1

  - Zeile 2

Folgezeile 2

The lines "Folgezeile ..." are no longer part of the listing.

Regards Juergen

turnermm commented 1 year ago

The close macro goes after the code you are trying to protect

Juergen-aus-Zuendorf commented 1 year ago

Ok, had tried to explain the syntax as simply as possible. But that was actually not enough!

So, here is the description in a – I hope – clearer form:

===== Spielplatz =====

~~MULTI_PLUGIN_OPEN~~
some code that has to be protected (e.g., for the data plugin)
~~MULTI_PLUGIN_CLOSE~~

Liste:
  - Zeile 1 \\ Folgezeile 1
  - Zeile 2 \\ Folgezeile 2

Here is the result: image

If I open and save the page with this syntax in CKGEditor, everything is fine. If I insert or delete some code afterward (for example add or delete line breaks) between MULTI_PLUGIN_OPEN and MULTI_PLUGIN_CLOSE, the listing code changes to this (again in native editor):

===== Spielplatz =====

~~MULTI_PLUGIN_OPEN~~

some code that has to be protected (e.g., for the data plugin)
~~MULTI_PLUGIN_CLOSE~~

Liste:

  - Zeile 1

Folgezeile 1

  - Zeile 2

Folgezeile 2

or as screenshot: image

The lines "Folgezeile ..." are no longer indented part of the listing.

Regards Juergen