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:
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:
What I want:
thanks,
-mf
Word import - how to avoid inline styles?
Word import - how to avoid inline styles?
You do not have the required permissions to view the files attached to this post.
-
- Senior Propellus Maximus
- Posts: 2632
- Joined: Wed Apr 14, 2010 8:01 am
- Location: Surrey, UK
Re: Word import - how to avoid inline styles?
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.
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 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
-
- Propellus Maximus
- Posts: 1238
- Joined: Mon Feb 27, 2006 5:56 am
- Location: Melbourne, Australia
Re: Word import - how to avoid inline styles?
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.
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
-
- Propeller Head
- Posts: 49
- Joined: Mon Jun 02, 2008 9:12 am
- Contact:
Re: Word import - how to avoid inline styles?
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?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?!)
...
Thank you,
Jamey
Thank you for your comments and help with my quandary ...
Jamey
Jamey