redactor icon indicating copy to clipboard operation
redactor copied to clipboard

When importing content into redactor from feedme, paragraphs tags are not outputted into template

Open piotrpog opened this issue 4 years ago • 2 comments

Steps to reproduce:

  • Import some content into the redactor field (tested with importing from XML into commerce products). Text must contain newlines.
  • Redactor automatically wraps each line into <p> paragraphs. This can be confirmed when checking HTML code within the field.
  • When outputting redactor field content into template, <p> tags are missing.

piotrpog avatar Oct 29 '20 21:10 piotrpog

Is this still an issue? If so:

  • What Redactor plugin version are you using?
  • Can you provide a sample content that should be used for pasting?
  • What Redactor config you're using?

andris-sevcenko avatar Jan 27 '22 10:01 andris-sevcenko

I can confirm this is still an issue, when importing multiline text it ends up in the database as plain text. Eg.

This is:
- text
- across
- multiple
- lines

When navigating to the entry edit page redactor will format it nicely like:

<p>This is:</p>
<p>- text</p>
<p>- across</p>
<p>- multiple</p>
<p>- lines</p>

Saving the entry will not save formatting unless you make a manual change in the field.

A possible solution on a project level could be to add event listeners to feedme to pre-process data and replace newlines with html tags where needed. But an option to "convert newlines to paragraphs" in field mapping would be nice.

robbeman avatar Jul 26 '22 14:07 robbeman