backdrop / backdrop-issues

Issue tracker for Backdrop core.
145 stars 40 forks source link

CKEditor 5 unable to paste into edit window with "Basic" formatting options #6357

Closed izmeez closed 10 months ago

izmeez commented 10 months ago

Description of the bug

Using backdrop 1.27.0 preview with fresh install. Edit content such as about page. Copy some text from another app or browser tab or window and attempt to paste that content into the ckeditor 5 window. Nothing appears with either Ctrl-V or GUI context menu item: Paste.

Additional information

Add any other information that could help, such as:

argiepiano commented 10 months ago

I'm not able to reproduce - pasting is working fine, and it includes rich text as allowed. Backdrop 1.27.0-preview, CKE5, PHP 8.1.13. Sparkling clean install.

stpaultim commented 10 months ago

I spun up a test site with the preview release, using the Tugboat option on BackdropCMS.org - https://backdropcms.org/try-backdrop/dev

I edited the about page and easily pasted conent in from another document.

I also installed the preview release on a dev site that we are currently upgrading from Drupal 7. I then upgraded from CKEditor 4 to 5 and am able to cut and paste content into there as well.

@izmeez Any additional information to help us recreate the problem. Have you tried it on a different computer or with a different browser. Could it be OS or browser related?

izmeez commented 10 months ago

Thanks everyone for testing. I have tested with Brave (a chrome) browser and the paste works fine, so it appears to be a Firefox issue. I'll see what else I can find.

izmeez commented 10 months ago

On the same environment I installed TinyMCE editor and paste works fine.

I also found a CKEditor 5 documentation page, https://ckeditor.com/docs/ckeditor5/latest/features/pasting/paste-plain-text.html

that includes a demo edit window where the paste is supposed to work but doesn't when I'm using my Firefox browser.

It also doesn't work on the feature rich editor example page, https://ckeditor.com/docs/ckeditor5/latest/examples/builds-custom/full-featured-editor.html

avpaderno commented 10 months ago

I use Firefox, but I was able to edit https://master-qjwnbhjyafnuvhuqfuurctyqvkibjoer.tugboatqa.com/about and copy-paste text from two different sites. I was also able to copy text from https://ckeditor.com/docs/ckeditor5/latest/examples/builds-custom/full-featured-editor.html to https://ckeditor.com/docs/ckeditor5/latest/features/pasting/paste-plain-text.html.

izmeez commented 10 months ago

@kiamlaluno Thanks for update. Maybe one of my chosen plugins is the issue. I'll have to narrow it down.

indigoxela commented 10 months ago

@izmeez can you provide two things here to help us narrowing it down?

Description:

Copy that json content, and post here, wrapped in <pre> and </pre>.

izmeez commented 10 months ago

@indigoxela While I have my doubts it is a BD issue, here is the info you requested:

{
    "_config_name": "filter.format.filtered_html",
    "format": "filtered_html",
    "name": "Basic",
    "weight": 0,
    "editor": "ckeditor5",
    "editor_settings": {
        "image_upload": {
            "status": 1,
            "dimensions": {
                "max_width": "",
                "max_height": ""
            },
            "max_size": null,
            "scheme": "public",
            "directory": "inline-images"
        }
    },
    "filters": {
        "filter_url": {
            "weight": 0,
            "status": 1,
            "module": "filter",
            "settings": []
        },
        "filter_html": {
            "weight": 1,
            "status": 1,
            "module": "filter",
            "settings": []
        },
        "filter_autop": {
            "weight": 2,
            "status": 1,
            "module": "filter",
            "settings": []
        },
        "filter_image_caption": {
            "weight": 4,
            "status": 1,
            "module": "filter",
            "settings": []
        },
        "filter_image_align": {
            "weight": 4,
            "status": 1,
            "module": "filter",
            "settings": []
        },
        "filter_htmlcorrector": {
            "weight": 10,
            "status": 1,
            "module": "filter",
            "settings": []
        }
    },
    "cache": true,
    "status": 1
}

cke5-editor-bd-screenshot-2024 01 11

izmeez commented 10 months ago

Please don't waste anymore time on this. I should have tried this sooner: I setup a fresh install of Firefox 121.0 and it works just fine. I'm quite sure there must be something unique in my primary Firefox environment that caused this and maybe I will stumble upon it at some point. Sorry for the alarm, I am going to close this issue.