Jump to content

How to 'touch' Body field (CKEdit) after CSV Import


strandoo
 Share

Recommended Posts

Hi folks. I've just imported about 200 entries into a site. There's a 'biography' text field that imported into a Body field using the CKEditor. My problem is that when I visit any page with this biography field, the text doesn't look properly formatted (the line-spacing is too tight) because it isn't contained by <p> tags. It looks like the <p> tags are added by CKEditor only when you open/save that page in the Admin editor. I don't want to have to open and save every one of those 200 pages. Does anyone know of a way to do this in the API or something?

Cheers!

Link to comment
Share on other sites

@AndZyk Thanks for the response, but this doesn't work. I'm using the Body field, a CKEdit textarea field. When the text was imported, wasn't formatted with <p> tags. Those tags are added (via javascript presumably) when a page of that field type is loaded for the first time in the admin.

I think one solution might be to just do a find/replace on that field using the API and add <p> and </p> tags, maybe replacing double line breaks with </p><p> or something. Of course, while working on the site, many of those fields are now properly formatted, so I may make things worse on those pages. I'll have a look at the database content before proceeding.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...