BuEditor is simpler than TinyMCE and configurable to add new formatting by user, though it would be perfect with Image assist integration
http://drupal.org/project/bueditor

Comments

zoo33’s picture

Wow, that seems like a very neat module. There is also Quicktags, which is very similar. I'm just wondering if Image assist's Add image link/button isn't enough? The only obvious benefit of having a native bueditor/quicktags button is the appearance, right? But I guess you could also add update functionality like in TinyMCE, to allow users to edit existing images in the textfield?

Anyway, if someone wants to work on this I don't see why they shouldn't.

zoo33’s picture

Category: feature » support

Turns out adding an img_assist button to bueditor is real easy and it can be done without modifying any files.

Go to Administer >> Site configuration >> BUeditor.
Edit the editor you're using.
In a blank button field or in an existing one, paste this code:

js: window.open(BASE_URL + 'img_assist/load/textarea?textarea=body', 'img_assist_link', 'width=600,height=400,scrollbars=yes,status=yes,resizable=yes,toolbar=no,menubar=no');

Fill in the other info for that button and save.

holz’s picture

with textarea=body, you can use img_assist in a body form, when you comment, you can NOT, because the textarea in comment form is comment.

don't know how to fix it yet.

sun’s picture

Title: bueditor integration for Image Assist » buEditor integration
Component: Miscellaneous » User interface
Category: support » feature
ufku’s picture

holz, you can get the textarea name using E.textArea.name where E is the editor instance and E.textArea is the textarea object.
zoo33's script could be like this:
js: window.open(BASE_URL + 'img_assist/load/textarea?textarea='+E.textArea.name, 'img_assist_link', 'width=600,height=400,scrollbars=yes,status=yes,resizable=yes,toolbar=no,menubar=no');

sun’s picture

Status: Active » Closed (duplicate)

Marking as duplicate of http://drupal.org/node/220157

Mike_Waters’s picture

FYI with current versions Image Assist 6.x-2.x-dev and BUEditor 6.x-1.2, they interwork perfectly.
The img_assist button appears below the BUEdtor textarea, and the inline image is inserted properly (and is displayed properly if your input format includes inline images and you have the proper permissions).

The abovementioned workaround (adding a new BUEditor button w/ js instructions) does not work; it opens up a blank img_assist popup (at least on my machine, FFX3/win32). Then again, it's not necessary anymore.

Flying Drupalist’s picture

Status: Closed (duplicate) » Active

That's right, the popup gives me initLoader is not defined. Who got it working?

sun’s picture

Status: Active » Closed (duplicate)

BUeditor won't be supported directly. Instead, Image Assist builds on top of Wysiwyg API. Marking as duplicate of #245799: Update TinyMCE integration to 3.x

Flying Drupalist’s picture

Status: Closed (duplicate) » Active

Hi sun. BUeditor is not a Wysiwyg editor, it does nothing except provide an interface for creating buttons. All this issue is about is creating a link to the image assist browser. Nothing else needs to be done to achieve full functionality.

sun’s picture

Status: Active » Closed (won't fix)

Correct, BUeditor is not a WYSIWYG editor, but it's a pseudo-editor. Wysiwyg API also supports pseudo-editors.

Flying Drupalist’s picture

But BUeditor is not part of the Wysiwyg API, and even if it is what does that have to do with this? Even if Image Assist integrates perfectly with the API, you're still going to need to create a BUeditor button, which is what this is about.

sun’s picture

Correct, BUeditor is not YET supported by Wysiwyg API. However, that only means that someone should change this and implement BUeditor into Wysiwyg API.

As mentioned in the previously mentioned issue, we are focusing on a fully-fledged Wysiwyg API integration in Image Assist. Once BUeditor has been integrated into Wysiwyg API and #319363: Rewrite editor plugin API is done, Image Assist will be automatically available to ALL editors that support external plugins. And by automatically, I mean automatically. No further customization or editor-specific code required for Image Assist. Hence, any approach that tries to integrate Image Assist specifically with yet another editor is a wrong approach, in the wrong direction, and a waste of time.

Flying Drupalist’s picture

Maybe I'm not understanding this correctly, but the API won't just magically create a button. You still need to make a button?

Meanwhile, BUEditor ALREADY WORKS with Image Assist and nothing further needs to be done other than to create a button.

Lapino’s picture

You can still add an img_assist button to the bueditor buttons like described higher, but you have to change the code a little for img_assist 6.x-2.x

php:
global $base_url;
return "js: window.open('$base_url/img_assist/load/textarea?textarea='+ E.textArea.id, 'img_assist_link', 'width=600,height=400,scrollbars=yes,status=yes,resizable=yes,toolbar=no,menubar=no')";

Note: I have tested this on my own site only, so if it breaks your site or eats your granny, I'm not responsible.

alfaguru’s picture

There's a small issue (with the 5.x version, at least) when setting up a button for Image Assist. In IE, the process of giving the textarea focus takes it away from the newly opened window and hides it so it looks like the code above doesn't work.

There's a kludgy fix available, which is to set the "stay-clicked" class on the button, like this:

js: window.open(BASE_URL + 'img_assist/load/textarea?textarea=body', 'img_assist_link', 'width=600,height=400,scrollbars=yes,status=yes,resizable=yes,toolbar=no,menubar=no'); editor.addClass(E.buttons[E.bindex],'stay-clicked');

To avoid the button having a red border, you then need to add some CSS to your theme, eg:

.editor-image-button {
	border-color: #ccc !important;
}
elitefox’s picture

This code slightly not work for me

php:
global $base_url;
return "js: window.open('$base_url/img_assist/load/textarea?textarea='+ E.textArea.id, 'img_assist_link', 'width=600,height=400,scrollbars=yes,status=yes,resizable=yes,toolbar=no,menubar=no')";

instead of complaning, I try to see what is wrong and I first suspect the url to open and yes it is, when I copy the link that imageassist is linking to, it link to

http://site/index.php?q=img_assist/load/textarea&textarea=buttons[new][c...

in contrast to the above code, I just added "index.php?q=" before img_assist and the "?" between textarea to "&", now it work properly for me :)

Hope this helps someone