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 )
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
comment:2 Changed 11 years ago by
Also this problems appears only if the widget plugin is present in the editor.
comment:3 Changed 11 years ago by
Status: | new → pending |
---|---|
Version: | 4.4.3 → 4.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
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 :
- Go to http://ckeditor.com/demo#widgets
- 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>
- 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
Component: | General → UI : Widgets |
---|---|
Description: | modified (diff) |
Status: | pending → confirmed |
Version: | 4.5.0 (GitHub - major) → 4.3 |
Steps to reproduce:
- Set
config.allowedContent = true;
for editor - Load image2 sample
- Switch to source mode and paste
<a data-widget="image" href="http://www.google.com">some text</a>
- 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
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.