I have two content types, one contains the default "Body" field and one contains a custom content (Text Area) field called "Description."

Everything works great with the default "Body" field, but I cannot get insert to work for the custom content field. Everything looks and works as expected until I press the "Insert" button at which time nothing happens. The image isn't inserted into the field.

Has anyone encountered this before? I have triple checked all the settings, but do not think I am overlooking anything.

Thanks,

Jason

CommentFileSizeAuthor
#11 ckeditor_module_support.patch854 bytesquicksketch

Comments

quicksketch’s picture

What WYSIWYG editor (if any) are you using? Insert should work with any textarea, but you have to click in the textarea first to make it the "active" editor. Insert defaults to the body if no other fields have been clicked.

jasonjason’s picture

I am using the CKEditor. I understand what you are saying, and I am definitely clicking inside the text area (at the specific place where I would like to insert the image) prior to clicking the "Insert" button.

quicksketch’s picture

Ah, hmm. CKeditor is a bit finicky on the API-side (same with FCKeditor). Are you using it with WYSIWYG module or CKeditor module?

jasonjason’s picture

I am only using the CKeditor module. Would you suggest installing the WYSIWYG module as well?

quicksketch’s picture

Title: Insert Works For Default Fields But Not CCK Fields » Insert Works For Default Fields But Not CCK Fields (CKeditor)
Category: support » bug

I always prefer WYSIWYG module over an editor-specific module, mostly because it knows when to turn on and off when it's needed (like if you switch to PHP code, it turns off the editor). You shouldn't install both at the same time though, they're alternatives to each other. You might try WYSIWYG module and install CKeditor with it and see if it works, WYSIWYG provides an API for Insert to use. Regardless I'm going to mark this as a bug report and I'll look into it next time I'm working on Insert.

jasonjason’s picture

Thanks for your help, quicksketch! I installed WYSIWYG module on top of CKeditor and it's working great!

sethcohn’s picture

+1 for better working with CKEditor module... looks like I can use this right now, as I only need it on Body, but interested in expanding uses later.

quicksketch’s picture

Category: bug » feature
Status: Active » Postponed

This functionality is dependent on CKEditor module providing an adequate API. In the mean time if you'd like to use Insert with CKEditor and CCK fields, you can use WYSIWYG module.

See #865710: Provide a "ckActiveId" variable for tracking the active editor for the necessary CKEditor module feature request.

jzornig’s picture

I'm using CKEditor without WYSIWYG and I can't change this. I only have a single CKEditor/CCK Textfield on the form. There are other textfields but all without CKEditor. Is there some way I can set this CCK field as the permanent target for Inserts? I'm happy to do a little hacking around in the module if I'm pointed in the right direction.

jzornig’s picture

I think I've found it. I edited the following line in insert.js and replaced #edit-body with the id of the cck field.

eg.

Original
insertTextarea = $('#edit-body').get(0) || false;

Custom
insertTextarea = $('#edit-field-statement-0-value').get(0) || false;

quicksketch’s picture

Status: Postponed » Fixed
StatusFileSize
new854 bytes

I've committed the attached patches to Insert and #865710: Provide a "ckActiveId" variable for tracking the active editor has been added to CKeditor. So this will be working in the next release of Insert (1.0 final) and CKeditor (1.3) when used together.

gary.betz’s picture

Hey,

I'm having this same sort of issue this morning - I can't get the insert to drop the Only local images are allowed. tag into another field that is simply a textarea field that doesn't even use a WYSIWYG editor. It inserts the code into the body area just fine but not into a custom textarea.

I'm assuming the Insert Module function works for any type of textarea. Is that assumption incorrect?

Thanks,
Gary

****UPDATE**** Seems this is specific to the Rubik theme. I changed to Garland theme for the Admin theme and voila'. No problems.

quicksketch’s picture

I'm assuming the Insert Module function works for any type of textarea. Is that assumption incorrect?

Insert will work with any textarea, that's correct, but with a caveat: If there are BOTH WYSIWYGs and textareas on the page, Insert will only work with the WYSIWYGs on the page.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.