Opened 10 years ago
Last modified 10 years ago
#12287 confirmed Bug
Unable to create link when certain fields are removed from the dialog
Reported by: | getshao | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Dialogs | Version: | |
Keywords: | Cc: |
Description
Unable to create link when certain fields are removed from the dialog. In other words, some default values are missing.
Before I was usign the following code to remove the linktype and protocol fields in the link dialog I don't need...
if ( dialogName == 'link' ) { var infoTab = dialogDefinition.getContents( 'info' ); infoTab.remove( 'linkType' ); infoTab.remove( 'protocol' ); }
This will still remove the items, but when trying to hit enter or ok the dialog just fails.
From here:http://ckeditor.com/forums/Plugins/Problems-removing-dialog-fields-of-link-plugin-in-4.4.3
Attachments (2)
Change History (3)
Changed 10 years ago by
Attachment: | Screen Shot 2014-08-08 at 1.14.37 PM.png added |
---|
Changed 10 years ago by
Attachment: | Screen Shot 2014-08-08 at 1.15.19 PM.png added |
---|
comment:1 Changed 10 years ago by
Status: | new → confirmed |
---|---|
Version: | 4.4.3 |
Removing inputs will cause losing default values and this is correct. However, link dialog could work without protocol and link type inputs, because many users don't need them, so it would be useful if plugin didn't expect them.
To work around this you can hide the type input and remove the protocol input from the 'hbox' element:
I'm not sure why removing element from hbox works - perhaps the element is already registered and we change only the UI.