Handling HTML tables

Dec 03, 2020

Copy link to clipboard

Copied

Dear Community,

 

I'm working with several InDesign files with the goal of exporting them to HTML. Our developer has pointed to me that the HTML for the tables includes things that we do not need and could affect the results on what the users will see. Does anyone know how would I take an exported table like the below and turn it into a "vanilla table" as the one found here: https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_table_basic&stacked=h 

 

 

Here is the untouched InDesign Screen Shot 2020-12-03 at 11.55.56 AM.pngresult:

Screen Shot 2020-12-03 at 11.55.56 AM.png

 

 

Thank you all in advance.

I would imagine (expect)? your developer has classes to properly display tables in their CSS? If so, then just do a find/replace to change the class names to whatever matches the CSS. If not, a regular expression find/replace on the exported html is probably your best bet. Same for the <p> tags. Someone who deals more in html export might have better ideas. 

TOPICS
Import and export, Scripting

Views

48

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Handling HTML tables

Dec 03, 2020

Copy link to clipboard

Copied

Dear Community,

 

I'm working with several InDesign files with the goal of exporting them to HTML. Our developer has pointed to me that the HTML for the tables includes things that we do not need and could affect the results on what the users will see. Does anyone know how would I take an exported table like the below and turn it into a "vanilla table" as the one found here: https://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_table_basic&stacked=h 

 

 

Here is the untouched InDesign Screen Shot 2020-12-03 at 11.55.56 AM.pngresult:

Screen Shot 2020-12-03 at 11.55.56 AM.png

 

 

Thank you all in advance.

I would imagine (expect)? your developer has classes to properly display tables in their CSS? If so, then just do a find/replace to change the class names to whatever matches the CSS. If not, a regular expression find/replace on the exported html is probably your best bet. Same for the <p> tags. Someone who deals more in html export might have better ideas. 

TOPICS
Import and export, Scripting

Views

49

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 03, 2020 0
Dec 03, 2020

Copy link to clipboard

Copied

I would imagine (expect)? your developer has classes to properly display tables in their CSS? If so, then just do a find/replace to change the class names to whatever matches the CSS. If not, a regular expression find/replace on the exported html is probably your best bet. Same for the <p> tags. Someone who deals more in html export might have better ideas. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 03, 2020 0
ENuno LATEST
Dec 04, 2020

Copy link to clipboard

Copied

Thank you, @brianp311. I wasn't familiar with regular expressions, after reading your reply and some research,  I was able to clean up the HTML using regular expressions on DreamWeaver.

 

Let's see if any other suggestions come along. I can't find a lot of documentation on HTML exporting and tags...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 04, 2020 0