Drupal 8 WYSIWYG Editor Crippled

vince's picture
I was excited that Drupal 8 included the ckeditor WYSIWYG editor out of the box until I discovered they crippled it. I spent a couple days wrestling with it and doing research on how to overcome the limitations to no avail. I love just about everything else I have learned about Drupal 8 so far. They have done a wonderful job on the interface and all the new back end features.

However, not being able to even add simple vertical and horizontal space and, optionally, borders around inline images in the editor is kind of a show stopper for us.

If I insert an image from an image field, using the insert module, I cannot modify it's attributes, not even float it left or right. If I click on the img icon, I can only upload another image from the local file system. I cannot modify the image I inserted. If I bring up the edit image dialog, and select Align left, I just get an "Image field is required" error with a "No file selected" message in the image browse field. So the insert module is useless. Same thing if I insert it using IMCE. Once inserted, it will not even let me float it left or right.

I also tried using the styles drop down button but I couldn't get that to work either.

In

Administration -> Configuration -> Content authoring -> Text formats and editors

I added the "Styles" drop down and added a style,
	img.inline|inline image
In hopes that th would add an "inline" class to the 'img' tag that I could add CSS, perhaps via CSS_injector, to style the images.

Yet when I edit content, the Styles button is grayed out.

One posting
https://www.drupal.org/forum/support/post-installation/2016-08-18/cannot-get-ckeditor-to-recognize-styles

said,
My styles weren't showing up is because I was trying to use 'img' as the element, which will not work for obvious reasons. In similar fashion, 'a' will not work either (which was used in a tutorial I was reading and part of the reason I got confused). Instead, you have to use 'div', 'p' or any other standard text-content element, and it should work.
But, how do you get it wrapped in 'div' tags? They removed that button from ckeditor as well.

How do I do such a simple task without a lot of hand coding?

Also, when creating links, they removed all functionality, even the ability to set the target to load in another window. There is nothing but a URL field. I saw another posting of a guy complaining about the same thing. One of the responses was that "you should not manage the windows for users". Well, that should be up to me to decide. This isn't Wix. The whole point of Drupal is to have power and flexibility. Not have your hands tied with somebody else's design philosophy and limitations shoved down your throat. There are many cases where I don't want to send a user off of our web site when they click a link. It is very tunnel visioned to think otherwise. I can also have requirements to do so by customers to load the link in a new window, whether I agree with it or not.

They even removed the teaser break button. Really? What possible harm can it cause to keep that? I very often need to control what portion goes into the teaser. At least the <!--break--> tag still works, but it is cumbersome to have to go into source mode, find the correct spot, and edit it by hand. Generally not a show stopper for me. Just annoying. It can be a show stopper if I have any content editors that are not technically inclined enough to do it.

Another annoyance

Once an image has been inserted into content, I cannot delete the image from the file system in IMCE, even though the content has been deleted or the image has been removed from the content. It keeps saying the file "is in use by another application". I have to go to the file system in a shell and manually delete it if I don't want it to forever leave clutter.

On Drupal 7 I have been using elFinder, rather than IMCE. Elfinder works quite nicely. It doesn't prevent me from deleting images and I have access to the file manager through "Content -> Files". With IMCE on Drupal 8, I have found no way to get to the file manager without editing content and beginning the process of inserting an image.  As of the time of of this writing, there is no Drupal 8 release of elFinder.

Drupal 7 may not come with a WYSIWYG editor out of the box, but at least I can install ckeditor and have nice content editing and image styling that's not completely crippled.

It is concerning that it is coming up on 2.5 years since Drupal 8 was first released and there are still such basic significant content editing problems.

Unfortunately, until these issues are resolved, I guess we are stuck with Drupal 7. I have noticed that even drupal.org is still on Drupal 7. I wonder if any of these issues are part of the reasons why.

2 Comments

vince's picture

Found solutions to some of the problems

I found workarounds for the image styling issues that at least makes it to where they are not show stoppers. I posted instructions here (Drupal 8 - Wrapping text around images).

Also I found a solution to the link target problem. There is a module called "D8 Editor Advanced link", that seems to fix that issue. That really should be in core rather having to install it as an add on.

Also, the missing teaser break button in ckeditor is actually not really a problem since you can paste what you want to go in the teaser into the Summary field.

Looks like we are still not, at this time, going to migrate to Drupal 8 though. Possibly never. There are still other issues. I plan to post to our blog summarizing the problems after I finish documenting them. We are taking a close look at Backdrop CMS, which is a fork from Drupal 7.
Amy's picture

I have the same problem with File Browser

It keeps saying the file "is in use by another application". I have to go to the file system in a shell and manually delete it if I don't want it to forever leave clutter.
I have the same problem, even after deleting any old revisions that might have to do with the file in question. I can't search where a file is being used, and have no authority to go to the file system shell. Is there anything else that can be done in order to delete 4-5 year old pdfs from the directory?