We got blank draft textareas with Draft 6.x-1.8 + Wysiwyg 6.x-2.1 + FCKeditor 2.6.4

After investigation in the code we found the problem at line 172 of draft.js.

Currently is:

  fck.SetHTML($('#' + fck.Config.TextareaID).val());

Unfortunately in our version the fck object doesn't have the TextareaID but, hopefully, the Id of text area is stored in the Name attribute.

So updating the code with:

  fck.SetHTML($('#' + fck.Name).val());

does the job.

Not sure how to solve the issue with a patch. Maybe this code would work?

  var TextareaID = (typeof fck.Config.TextareaID != 'undefined') ? fck.Config.TextareaID : fck.Name;
  fck.SetHTML($('#' + TextareaID).val());
CommentFileSizeAuthor
#2 draft.js_.FCKeditor.patch598 bytesEmanueleQuinto

Comments

darren.ferguson’s picture

Priority: Critical » Normal

Module per previous issues does not support the WYSIWYG module. It supports the FCK, CK and TinyMCE without using WYSIWYG
It might in future support the WYSIWYG but unfortunately time is not available on my end to fully support integration at this time, if someone wants to provide a patch the adds it without removing the functionality for the FCK, CK and TinyMCE that already exists then i am willing to look into it.

EmanueleQuinto’s picture

StatusFileSize
new598 bytes

Hi Darren I checked the code of FCKeditor and, from my understanding, TextareaID is set by the module. But the reference to the HTML element is already stored in the name attribute (at least in our sites it is).

The attached patch should not affect the FCKeditor module users and would support users of Wysiwyg + FCKeditor.

Regards.

darren.ferguson’s picture

Status: Active » Fixed

This patch has now been committed too the module javascript.

darren.ferguson’s picture

Status: Fixed » Closed (fixed)