When using the BUEditor and Paragraphs module together when a paragraph bundle contains text areas with BUEditor they are not initialized when dynamically added.

When a page is opened with existing paragraphs (they're already in the rendered markup) then the BUEditor shows up fine like on edit. But for dynamically added ones it doesn't show up. It looks like Paragraphs uses the system ajax to get the new markup to insert.

I'm not actually sure if this issue falls into BUEditor for ajax/dynamic behaviors or into Paragraphs for supporting BUEditor.

Comments

Nodz created an issue. See original summary.

Nodz’s picture

I've been able to get around this by using a behavior which gets triggered automatically by ajax calls and running the following snippet in there:

jQuery.each(
  jQuery('.field-type-paragraphs .field-widget-text-textarea textarea'),
  function(k,v) {
    BUE.processTextarea(v,'e5');
  }
);

It works but it's very specific since I'm hardcoding the tplid and targeting paragraphs specifically and I'm not filtering the ajax calls so unrelated calls will trigger it as well.

I'm not familiar with the system ajax calls in Drupal so I'm not sure how we could hook into that to get the selected info.

ufku’s picture

Status: Active » Closed (works as designed)

You may consider using BUEditor Plus that works based on filter formats or add the parapgraph's ajax path to the visibility settings of your editor.