ULs wrapping imported text

This forum is for all Flare issues related to importing files or projects.
Post Reply
TroyWells
Propeller Head
Posts: 58
Joined: Sat Feb 04, 2006 5:27 am

ULs wrapping imported text

Post by TroyWells »

When importing from Word documents, every topic has content wrapped in 3 to 20+ ULs. I have to go in manually in the text editor and remove them. This is what I see:

<ul>
<ul>&#160;</ul>
<ul>
<ul>&#160;</ul>
<ul>
<ul>&#160;</ul>
<ul>
<ul>&#160;</ul>
<ul>
<ul>&#160;</ul>
<ul>
<ul>&#160;</ul>
<ul>
<ul>&#160;</ul>
<ul>
<ul>&#160;</ul>
<ul>
<ul>&#160;</ul>
<p>text</p>
</ul>

etc.

Any thoughts on how I can get rid of this from the source documents or more efficiently clean this from the imported htm files?

Thanks!!
Troy
trent the thief
Propellus Maximus
Posts: 613
Joined: Wed Feb 01, 2006 6:21 am
Location: Off in the dark....

Re: ULs wrapping imported text

Post by trent the thief »

Hi Troy,

Get the Kaizen plugin from https://www.improvementsoft.com/Content ... oducts.htm. Kaizen is an invaluable tool for cleaning flare import projects. It's free, too. It does local or global change changes such as removing/swapping a paragraph format or class, removing styling, splitting a large file and making a TOC for the the resultant files, alpha sorting a TOC...

I've seen something similar to your lists caused by extra carriage returns. Importing from Word is rough because most word docs are crapfests of formatting overrides and doubled carriage returns because many people don't understand how styles work or can't be bothered applying the right one.

My advice is to go through the doc and remove manual formatting where you can, remove all double carriage returns, and <space>carriage returns. Flare's import doesn't support 1:1 mappings anyway, so concentrate on removing them from the main paragraph formats. You'll need to decide how best to handle the character-level styling. Flare brings those in as numbered spans.

Those spans are one place where you'll get a lot of use from Kaizen. You can globally replaced the imported span class with the right class from your css or remove them entirely.

It will save you many hours of grunt work.

Experiment with the import settings, too. I've had flare import a doc and gotten only the character stuff in spans, but another import of the doc put all the text inside one span or another.
Trent.

Certifiable.

Image

umm...
I meant MAD Certified.

Official Propeller Beanie Owner :-)

:flare: Are you on Flare's Slack channels? PM me for an invitation! :flare:
SteveS
Senior Propellus Maximus
Posts: 2089
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: ULs wrapping imported text

Post by SteveS »

You can cut and paste Word content into notepad, notepad++, etc, then cut and paste from the text editor into Flare to remove much of Word's "baggage".
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
SteveS
Senior Propellus Maximus
Posts: 2089
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: ULs wrapping imported text

Post by SteveS »

trent the thief wrote: Wed Jan 03, 2024 11:14 am ...My advice is to go through the doc and remove manual formatting where you can, remove all double carriage returns, and <space>carriage returns...
Absolutely. Do as much as possible within Word before importing. If you do it often, create a Word Macro to do it for you. I'd suggest removing multiple spaces and multiple returns is a good place to start.
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
TroyWells
Propeller Head
Posts: 58
Joined: Sat Feb 04, 2006 5:27 am

Re: ULs wrapping imported text

Post by TroyWells »

I agree with doing as much as possible in Word ahead of time. However, the ul nesting is not visible in Word, so I don't know how to clean it.

Pasting into Notepad would not only remove the baggage but other things I want to keep. I wish I could see the baggage in Word and remove that while keeping styles, bullets/numbers, etc.

Thanks for the suggestions!!
SteveS
Senior Propellus Maximus
Posts: 2089
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: ULs wrapping imported text

Post by SteveS »

Couple of things I'd try:

Saving the Word document as rich text before importing.

Opening the document in Wordpad.

That might clean up the content without losing too much.

I'd definitely look at removing unwanted returns in case that is causing the unwanted lists.
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
TroyWells
Propeller Head
Posts: 58
Joined: Sat Feb 04, 2006 5:27 am

Re: ULs wrapping imported text

Post by TroyWells »

Thanks for the thoughts!! Will try that.

When you say "removing unwanted returns", let me try to clarify. There are no unwanted returns or any other visible indications in Word for these "uls". It is all behind the scenes. I think Word Perfect or older versions of Word had something like "Reveal Codes". That might be helpful if I could see and easily remove these before importing.
SteveS
Senior Propellus Maximus
Posts: 2089
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: ULs wrapping imported text

Post by SteveS »

...really old versions of Dreamweaver had a command to clean up Word imports...
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
Post Reply