This is a planning issue for the 2.x release. So far the plan is to allow better integration with WYSIWYG, allowing tabbing between visual (WYSIWYG) and code (BUEditor) if the WYSIWYG module is present. Any suggestions, patches or discussion is highly welcomed!

Comments

Jamie Holly’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
shunting’s picture

I can't visualize how tabbing would work.

Wouldn't it be simpler to have the input format filter act dynamically?

That way, I could set up one input format for CKeditor, another for BUedit, set one to the default, and swap the other in as needed (with no need for WYSIWYG...)

Jamie Holly’s picture

The idea is basically from Wordpress, where you have a visual tab and a code tab. When you switch over to the code tab, then BUEditor would be displayed.

frob’s picture

So the way the "Tab" would work is like the current disable rich text link, that sounds easy enough.

That would be a nice option, however, I would like also the ability to completely integrate with the WYSIWYG api module.

shunting’s picture

I think that the disable/enable rich text is a separate function. It's purpose, IMNHSO, is to give the user access to the raw HTML code that ckeditor produces so that it can be fixed. That's separate from the purpose of editing in BUeditor.

shunting’s picture

Whatever makes it easier for my users I am for, and I need to give users the choice of both editing modes. I especially don't want to force long-time users into the CKeditor world.

Unfortunately, one would think that installing CKeditor and linking it to one text format, and then installing BUeditor and linking it to another text format would be simple, but it isn't. The installation seems to be path dependent (fancy lingo for "sometimes it works and sometimes it doesn't"). I'd settle for a quick fix that made swapping the editors by text format work.... [UPDATE I thought that this patch was in the 7.x-2.x-dev that I had installed, but apparently not, since after patching I can swap.]

I'm hesitating on the tabs because the HTML that ckeditor and BUeditor produce is very different, and BUeditor exposes the markup. So if the user starts out in BUeditor, shifts to CKeditor, and then Shifts back to BUeditor, they are going to see much more intensive HTML markup than they started out with, and that may confuse and dismay them. When there's one window with a dropdown, and the user switches, and if they have a "Wow, that's weird!" reaction, they can unswap immediately with the dropdown. Cause and effect aren't so evident with tabs.

In addition, both editors support different buttons and even button logic. So what happens when the user creates video using the media element in CKeditor and then switches to BUedit which also allows video but using different markup?

I'd almost turn the handle 180 the opposite direction, if (1) I could swap the input format with the dropdown and (2) have the option to lock down the initial choice of format after the first Save to avoid all these confusing compatibility issues. (Maybe lock by default, and then have a permissions-enabled unlock button in a vertical tan, the way OS handles some things through the admin interface.)

frob’s picture

From what I can tell the tab idea is the same as the "disable rich-text" button --only styled differently.

The bueditor is a very simple editor that acts directly on the textarea. It doesn't rely on iframes like other editors. So theoretically switching to non-rich text more would just show the plain text-area and not a whole new editor. I think that the tabbed rich text editor switch is a good idea and will really make the different view more apparent. Bueditor is more of a helper than a real editor so it should integrate flawlessly.

If you are saying that the ckeditor too crappy of html to be sullied by the buediter then I really don't know what to say other than --don't use ckeditor. I prefer the wymeditor.

shunting’s picture

@frob

If you are saying that the ckeditor too crappy of html to be sullied by the buediter then I really don't know what to say other than --don't use ckeditor. I prefer the wymeditor.

1. No, I'm not saying that. I'm saying the difference could be confusing to users. That's going to be true no matter which WYSIWYG editor is used.

2. No, I want users to be able to use both editors. That's my use case.

Jamie Holly’s picture

Assigned: Unassigned » Jamie Holly

Basically it will be what Frob said. If a WYSIWYG profile and a BUEditor Plus profile exists for that input format, then the "disable rich editor" link will be removed and instead go to a tab system for better UX.

The only real extra from the disable link is getting BUEditor to show back up in it's place. As far as compatibility with different WYSIWYG editors, this should work, so long as the disable link from WYSIWYG functions properly for that editor.

shunting’s picture

So one scenario is:

1. Enter clean minimized easy-to-read HTML markup in BU edit tab

2. Switch to WYSIWYG tab

3. Return to BU edit tab.

4. HTML markup has changed to WYSIWYG markup.

Yes?

Jamie Holly’s picture

That can be. The actual reasoning is for an easy way to switch back and forth between HTML and Visual. There are times when WYSIWYG just don't cut it when authoring and you need easy access to a code view.

silurius’s picture

One issue I've seen in Wordpress WYSIWYG is that when you use the code view, switch to the design view and then back to the code view, the editor reformats automatically, doing things such as moving close tags and removing blank lines. I would like to see the BU tabs respect whatever is in the BU code tab when switching back and forth, even if the code in question might be "wrong". A preference check box for this behavior may be a good idea for those administrators who are responsible for other content editors and who happen to prefer the code fixing behavior to reduce overhead.

For all I know that Wordpress WYSIWYG behavior could be a feature that can be overridden or changed, but I haven't used Wordpress as much as I have Drupal.

frob’s picture

Assigned: Jamie Holly » Unassigned
Jamie Holly’s picture

I've just commited 7.x-1.4. In that release it now shows and hides BUEditor depending upon CKEditor. This currently works for CKEditor only, since that will be the core editor in D8. It was also tested on the Spark distribution.

Instead of doing the tab view, I just went with CKEditor events to trigger this. That means clicking on the "Switch to plain text editor" will trigger the event. It also keeps the UI intact from what people are are used to, instead of adding in the tabbing feature (which would be better left to themes or a another module IMHO).

If someone wants to add in additional support for other WYSIWYG editors, I won't complain one bit!