Opened 12 years ago
Closed 12 years ago
#10440 closed Bug (duplicate)
<a> tag is not allowed when ACF is set to "automatic mode"
Reported by: | Irina | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.1 |
Keywords: | IBM | Cc: | Teresa Monahan |
Description
We have a 'Link Menu' which combines 'link' and 'anchor' icons into one toolbar entry. If ACF is set to "automatic mode" and toolbar has the 'Link Menu' then all options under the 'Link Menu' are disabled, <a> tag is not allowed. If ACF is set to "automatic mode" and toolbar has the 'Link Menu' and the 'link' icon as an individual toolbar icon then all options under the 'Link Menu' are enabled and <a> tag is allowed.
Steps to reproduce:
- unzip linkmenu_testcase.zip. Copy the linkmenu folder to the ckeditor/plugins directory and the config.js file to the root ckeditor folder.
- Open any CKEditor sample in the browser.
- Open the toolbar menu item
Expected result: As link plugin is loaded, we expect to see 2 options under the 'Link Menu', e.g. 'Edit Link' and 'Image' options and all links displayed in the per-entered content as <a> tag should be allowed.
Actual result: Only 'Image' option is available. No links displayed in the per-entered content.
If you will type 'console.log('is <a> tag allowed: ', CKEDITOR.instances.editor1.filter.check('a'));' in the browser's debugging console, then output will be False.
Note: If you uncomment the config.toolbar = [ [ 'MyLinkMenu','Link','Image' ] ]; line in the config.js then it will display the 'Link Menu' and the 'link' icon as an individual toolbar icon and behavior will be as expected.
Attachments (1)
Change History (2)
Changed 12 years ago by
Attachment: | linkmenu_testcase.zip added |
---|
comment:1 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This happens because positions of menu button are not yet registered automatically as features. I just created ticket for this: #10442.
For now simple solution is to use editor.addFeature() passing there buttons/commands. Basically something like:
This situation is described in Plugin integration with ACF guide in "A button, command or maybe a plugin – which of them is a feature?"