Skip to content

Formatted pasted text interpreted as unformatted #101

@th-we

Description

@th-we

How to reproduce (so far only tested on Linux with Chrome and Firefox):

  • Click this link and copy the formatted text to the clipboard. The HTML for this text is:
<p><span style="font-weight: normal">test </span><i><span style="font-weight: normal">italic</span></i></p>
  • paste it into the WYSIWYG editor
  • the text is represented as the following HTML:
<p><span class="unformatted">test </span><em><span class="unformatted">italic</span></em></p>
  • toggle to Wiki syntax editor
  • the following JSON is sent:
{
    "type": "doc",
    "attrs": {
        "nocache": false,
        "notoc": false
    },
    "content": [
        {
            "type": "paragraph",
            "content": [
                {
                    "type": "text",
                    "marks": [
                        {
                            "type": "unformatted"
                        }
                    ],
                    "text": "test "
                },
                {
                    "type": "text",
                    "marks": [
                        {
                            "type": "em"
                        },
                        {
                            "type": "unformatted"
                        }
                    ],
                    "text": "italic"
                }
            ]
        }
    ]
}
  • the text is transformed to the following Wiki code:
%%test //italic%%//

I'd like to investigate how to fix this and would be thankful for some help with the development setup. I found that I always have to clear Dokuwiki's cache folder after modifying JavaScript files. I don't experience this with a custom plugin I'm developing where changes to JavaScript files will show up immediately without clearing the cache. What am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions