Opened 11 years ago

Last modified 11 years ago

#12388 confirmed Bug

All Editor buttons disabled after exiting the source mode — at Version 5

Reported by: dan turcu Owned by:
Priority: Normal Milestone:
Component: UI : Widgets Version: 4.3
Keywords: Cc:

Description (last modified by Jakub Ś)

When I enter the source mode, and exit, all the buttons of the editor are disabled, for some contents.

Change History (5)

comment:1 Changed 11 years ago by dan turcu

I discovered the real problem. The buttons are disabled if the attribute data-widget="image" is present in a <a> tag. This attribute is used by mobile devices, to know that a link is pointing to an image.

comment:2 Changed 11 years ago by dan turcu

Also this problems appears only if the widget plugin is present in the editor.

comment:3 Changed 11 years ago by Jakub Ś

Status: newpending
Version: 4.4.34.5.0 (GitHub - major)

Could you describe this problem in more detail?

If you go to http://ckeditor.com/demo#widgets and click inside a widget (best text under image2 widget) you will see that most buttons get disabled. This is correct behaviour as there are only certain elements that can be put into nested contenteditable.

comment:4 Changed 11 years ago by dan turcu

The issue , is that , if I have a tag in the source of the form : <a data-widget="image" href="some_link">some text</a> when you will enter the source mode and then you will exit to the source mode : you will get all the editor buttons disabled.

The steps to reproduce this problem are :

  1. Go to http://ckeditor.com/demo#widgets
  2. Enter source mode in the Enhanced Image and add this line anywhere in the source : <a data-widget="image" href="http://www.google.com">some text</a>
  3. Exit the source mode and you'll see that all the editor buttons are now disabled

I know that the data-widget attribute is used internally by the editor but in our application we use this attribute to tell mobile device, that the link is pointing an image.

comment:5 Changed 11 years ago by Jakub Ś

Component: GeneralUI : Widgets
Description: modified (diff)
Status: pendingconfirmed
Version: 4.5.0 (GitHub - major)4.3

Steps to reproduce:

  1. Set config.allowedContent = true; for editor
  2. Load image2 sample
  3. Switch to source mode and paste <a data-widget="image" href="​http://www.google.com">some text</a>
  4. Switch to WYSIWYG

Result: JS error is thrown (thus all buttons get disabled)

Message: Cannot read property 'getAttribute' of null
Line: 364
URI: ckeditor/plugins/image2/plugin.js

Problem can be reproduced from CKEditor 4.3

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy