Word import - how to avoid inline styles?

This forum is for all Flare issues related to importing files or projects.

Word import - how to avoid inline styles?

Postby mfaux on Mon Jan 29, 2018 1:57 am

Is there a way to prevent Flare from applying inline styles when importing from Word? Basically, I want clean HTML (no inline styles). In the Import wizard, I've selected 'Don't Preserve MS Word Styles', but this doesn't seem to do the trick.

I've created a simple example - a Word file containing a numbered list:
word-list.png


When I import the Word file into a new Flare project (Online - Top Navigation Basic template), the resulting HTML has an inline style applied to the list:
inline-styles.png


What I want:
clean-html.png


thanks,
-mf
You do not have the required permissions to view the files attached to this post.
mfaux
Propeller Head
 
Posts: 12
Joined: Mon Jul 10, 2017 3:29 am

Re: Word import - how to avoid inline styles?

Postby ChoccieMuffin on Mon Jan 29, 2018 9:03 am

I don't think there is any way to avoid this. It's a total pain in the rear end, isn't it!

To get over the problem I have a whole series of search-and-replace scripts in FAR HTML that do all sorts of things to the imported HTMLs to clean them up before doing anything else.

Here's what just a few of them do:

Join ul lists, because at the moment each list item comes in its own ul pair (why?!)
Format tables so that if there's a TableHeader style in the source Word document it turns into a thead with a tbody following. And assorted other bits and pieces on tables, like applying a specific column width to first column.
Remove empty table rows.
Remove empty paragraphs.
Remove empty headings.
Remove link to stylesheet that it also insists on creating, even though I have a perfectly acceptable one in my project already.
Remove local formatting from lists (I have several of these, because not all lists come in with the same inline formatting, and I have to do stuff to ul and li bits.)
Remove empty list items.
Remove empty lists.
Delete "Note: " that's in a specified Word style because the style it's converted to in Flare already has "Note: " as an auto-number. (Same for Tip, Warning and Important paragraphs.)

Word is really rubbish at creating "clean" HTML.
Started as a newbie with Flare 6.1, now using Flare 2018.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Propellus Maximus
 
Posts: 1857
Joined: Wed Apr 14, 2010 8:01 am

Re: Word import - how to avoid inline styles?

Postby wclass on Mon Jan 29, 2018 2:28 pm

Sorry - I don't think there is a way. I have raised that as a bug in Flare in the past but not heard back.
I also have a set of Find/Replace actions that I run on the imported text. While annoying, it is usually consistent, so Find/Replace is pretty quick.
Margaret Hassall - Melbourne
wclass
Propellus Maximus
 
Posts: 1203
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Word import - how to avoid inline styles?

Postby BaritoneJP on Fri Apr 06, 2018 9:25 am

ChoccieMuffin wrote:I don't think there is any way to avoid this. It's a total pain in the rear end, isn't it!

To get over the problem I have a whole series of search-and-replace scripts in FAR HTML that do all sorts of things to the imported HTMLs to clean them up before doing anything else.
Join ul lists, because at the moment each list item comes in its own ul pair (why?!)
...


Would you mind sharing the search-and-replace scripts in FAR HTML? If not would you share one example in order for me to learn FAR scripts?


Thank you,
Jamey
Thank you for your comments and help with my quandary ...
Jamey
BaritoneJP
Propeller Head
 
Posts: 43
Joined: Mon Jun 02, 2008 9:12 am


Return to Importing

Who is online

Users browsing this forum: No registered users and 3 guests