Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKEditor toolbar: Cannot save the flag button ("Anchor") position in the toolbar. #1231

Closed
Graham-72 opened this issue Sep 20, 2015 · 12 comments

Comments

@Graham-72
Copy link

Graham-72 commented Sep 20, 2015

Ref #1087
I find I cannot save a change in a toolbar.
full html - browsers bookshop 2015-09-20 12-07-41


PR from @jenlampton at backdrop/backdrop#1552

@quicksketch
Copy link
Member

Thanks @Graham-72. I was able to reproduce the issue described here. It looks like only this flag button ("Anchor") exhibits the problem that it cannot be saved. Is that what you are experiencing as well?

@Graham-72
Copy link
Author

Yes, confirmed. I have just done a test by trying to move all the buttons and only the flag button refused to stay in its new position. So it is a minor issue.

@Graham-72
Copy link
Author

Should this be added to meta issue #1087 ?

@klonos
Copy link
Member

klonos commented Nov 29, 2015

I would say so.

@ghost
Copy link

ghost commented Jan 18, 2016

My comment at #1542 was wrong : the anchor buttons shows on my test site, but it is using a "free" custom build (v4.5.5) from CKSource (I need the 4.5 drag&drop API).
It's worth noting that firebug shows the "link" button as
<span style="background-image:url('/backdrop/core/modules/ckeditor/js/plugins/backdroplink//link.png?t=FACH');background-position:0 undefinedpx;background-size:16px;" class="cke_button_icon cke_button__backdroplink_icon">&nbsp;</span>
whereas "my" "anchor" button shows as :
<span style="background-image:url('http://p1347.phpnet.org/backdrop/core/misc/ckeditor/plugins/icons.png?t=FACH');background-position:0 -1296px;background-size:auto;" class="cke_button_icon cke_button__anchor_icon">&nbsp;</span>
Note in the "link" button :

  • the incorrect backgroud-image url with duplicate "/"
  • the incorrect background-position

You can see it live at http://p1347.phpnet.org/backdrop/l/3rgz8UIEd0Vd/node/24/edit and note the original CKEditor buttons are colored, while the backdrop specific buttons are monochrome.
This lets me think that the problem is in the hacked CKEditor supplied with backdrop - note the interesting comment in backdrop/core/misc/ckeditor/build-config.js :

/**
 * This is a Drupal-optimized build of CKEditor.
 *

Is backdrop stuck with the 4.4 version of the "image2" plugin ?

@ghost
Copy link

ghost commented Jan 18, 2016

Wrong again !
As usual, when you have a problem with backdrop, remember that Backdrop is Drupal 8, not Drupal 7 !!!
Visit a drupal 8 site, you will find no anchor button : The anchor functionality is part of the link plugin, which has been removed from the "drupal 8 optimized" library, and replaced by a Drupallink plugin, which does not even know what an anchor is...
So download a regular CKEditor build, or make your own with CKBuilder, and your anchor button will be back.

@Graham-72
Copy link
Author

@klonos Please can this be added to [META] CKEditor/Rich text editor followups #1087 ?

@klonos
Copy link
Member

klonos commented Jan 31, 2016

Done 😉

@klonos klonos changed the title CKEditor toolbar - unable to save a change CKEditor toolbar - unable to save a change in the toolbar icons. Jan 31, 2016
@klonos klonos changed the title CKEditor toolbar - unable to save a change in the toolbar icons. CKEditor toolbar: Cannot save the flag button ("Anchor") position in the toolbar. Jan 31, 2016
@ghost
Copy link

ghost commented Feb 17, 2016

I just found the reason of the original question : The filter module consider that the "id" attribute is invalid for an "a" tag. I could not find the exact location where those rules are defined - this is odd, because id is allowed for a link, while name is not (in HTML5).

Anyway, removing the 'id' attribute in the "Anchor" definution array solves this problem.

which is pretty useless, as there is currently no plugin to handle anchors, as I stated above...

@jenlampton
Copy link
Member

This is still an issue on 1.5.x-dev, even after the recent update of the CKEditor to 4.5.x

@jenlampton
Copy link
Member

Since I don't like this bug being in Backdrop, the easiest solution is to remove the feature that does not work. cries Longer term, we will need to add our own version of the Anchor plugin that is not part of the link plugin. Likely as a part of #1777.

@quicksketch
Copy link
Member

Yeah... a sad conclusion but I think you're right @jenlampton. This button doesn't do anything because there is no code backing it up. Adding anchor tag support is not trivial so we should remove the broken button from the UI. I've merged backdrop/backdrop#1552 into 1.x and 1.4.x.

I'm not sure if this is part of the Advanced Link functionality in #1777 or not. I know it's bitter to close an issue when the underlying request (fix the anchor button) hasn't been resolved. But let's close this "bug" and open a new feature request, either as part of #1777 or a new one entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants