dokuwiki-plugin-prosemirror icon indicating copy to clipboard operation
dokuwiki-plugin-prosemirror copied to clipboard

Everytime a page is edited all headers are duplicated

Open MartijnRas opened this issue 5 years ago • 8 comments

When editing a page that contains:

====== header ====== Some text

===== subheader ===== Some more text

All headers are duplicated:

====== header ======

====== header ====== Some text

===== subheader =====

===== subheader ===== Some more text

MartijnRas avatar Oct 18 '20 19:10 MartijnRas

I can't reproduce your issue. I copied your exact text to a fresh page:

====== header ======
Some text

===== subheader =====
Some more text

This page loads fine for me in DW Edit and I can toggle without issues to WYSIWYG.

vic-t avatar Apr 30 '21 21:04 vic-t

Here's what the issue looks like in my case.

https://user-images.githubusercontent.com/1337470/130186878-3c5cf55e-015e-444e-a71a-7f268ada29e2.mov

The unwelcome addition has the attribute data-pluginname="revealjs_header" and sure enough: Without the reveal.js plugin enabled it doesn't happen.

solarkraft avatar Aug 20 '21 06:08 solarkraft

We have the very same issue which basically make the plugin unusable for us, we also do not have "reveal.js" plugin knowingly installed.

Did anyone figure this out?

rawIce avatar Feb 08 '22 18:02 rawIce

Which versions of the plugin and DokuWiki do you have? Can you reproduce it on https://wysiwyg.wiki.cosmocode.de/doku.php?id=en:playground:start ? Does it happen on each page? Are there other plugins that influence it? Is it possible to temporarily to disable them to test this?

Klap-in avatar Feb 08 '22 21:02 Klap-in

Does it look similar to my video? Have you checked out the DOM element of the blue box (right click, inspect element), does it have another data-pluginname attribute? If so, you probably should check whether disabling that plugin helps as a workaround.

Longer term, I think there's a deeper issue somebody more familiar than me with the code should have a look at. My best guess is that it's somewhere around PluginInlineView. A search for pluginname yields an interesting result in renderer.php.

solarkraft avatar Feb 09 '22 20:02 solarkraft

Which versions of the plugin and DokuWiki do you have?

Installed version: 2022-01-04 DokuWiki: 2020-07-29 "Hogfather"

Can you reproduce it on https://wysiwyg.wiki.cosmocode.de/doku.php?id=en:playground:start ?

No, there it is working perfectly

Does it happen on each page?

Yes

Are there other plugins that influence it? Is it possible to temporarily to disable them to test this? Does it look similar to my video? Have you checked out the DOM element of the blue box (right click, inspect element), does it have another data-pluginname attribute? If so, you probably should check whether disabling that plugin helps as a workaround.

Yes ist looks 100% like your video, only difference is that our box is green and not blue.

Based on your suggestion I inspected the element and it has data-pluginname="creole_emptyline" and data-pluginname="creole_header" properties.

Indeed we have Creole Plugin installed, after disabling it Prosemirror seems to work! Apparently Creole syntax interpretation conflicts with this editor. Especially https://www.dokuwiki.org/plugin:creole#reverse_headings might be an issue.

I hope it does not break that much in our existing pages if people used Creole syntax....

Edit: okay it breaks many pages if Creole is disabled, obviously because people used it as it was available...

rawIce avatar Feb 10 '22 10:02 rawIce

I also have the same issue in bureaucracy + struct template pages using Bootstrap wrapper plugin (tabs/panes).

armandostyl avatar Aug 29 '22 07:08 armandostyl

In this example from the Bootstrap Wrapper plugin, it is the Foo heading that gets duplicated (it is shown once as a Heading and once as a code).

<pane id="tab-foo">

=== Foo ===
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</pane>

armandostyl avatar Aug 29 '22 07:08 armandostyl