• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Table head and table body removed

Participant ,
Feb 05, 2016 Feb 05, 2016

Copy link to clipboard

Copied

RH12 | WebHelp

 

Does any one know if there's a way to force RoboHelp to retain the <thead> and <tbody> tags? I'm pasting a table into the HTML view and when I switch to Design view it strips out these tags.

 

Thanks

Jonathan

 

TOPICS
New UI

Views

322

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
community guidelines
Community Expert ,
Feb 06, 2016 Feb 06, 2016

Copy link to clipboard

Copied

I think it is a case of:

Step 1] Submit a feature request.

Step 2] Join the rest of us waiting.


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Help others by clicking Correct Answer or Like if helpful. Found your answer elsewhere? Share it here.

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
community guidelines
Explorer ,
Aug 21, 2020 Aug 21, 2020

Copy link to clipboard

Copied

The Documentation team I work on would also like to know if there's a way within RoboHelp 2017 to force these tags to remain in the HTML5(?) output generation.


So now we're nearing the end of 2020 and lo and behold, this issue still persists in RH2017. Do I really need to purchase RH2019 for this one fix ... if indeed it is fixed in that version?

 

An alternative approach we're looking into is to implement this with the DataTables js functionality (https://datatables.net/faqs/index). You would still have to come up with a way to insert the tags & table header structure with your own javascript though to get this to work.


I ruled out if this is a doctype issue used in the RH html that might be stripping the tags out to conform to v1.0. When I generated my project, RH actually updates the HTML5-generated output with the correct HTML5 doctype declaration of <!DOCTYPE html>, even though the files - including the master sheet I use - in the RoboHelp project have the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> declaration. Unfortunately, when I attempt to generate the project, RoboHelp still strips these tags out as Jonathan describes.


I downloaded the Trial version of RH2019 to see if this is still an issue in this latest release...I'll let you know what I find (maybe you've already done the same?).


Somewhat patiently (err) still waiting...

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
community guidelines
Community Expert ,
Aug 21, 2020 Aug 21, 2020

Copy link to clipboard

Copied

I'd not be expecting any fixes to show up in RH2017 now that RH2020 has just come out. I'd download the trial one of that version & have a look-see. If it's still not there, raise a request using the Tracker (https://tracker.adobe.com/).

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
community guidelines
Explorer ,
Aug 21, 2020 Aug 21, 2020

Copy link to clipboard

Copied

Thanks Jeff - I meant RH2020 in my original post...I've downloaded the trial version of RH2020 and will be testing shortly.

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
community guidelines
Community Expert ,
Aug 21, 2020 Aug 21, 2020

Copy link to clipboard

Copied

I've implemented datatables.js in one topic and I had to include a few lines in the script to insert the tags to make it work in RH11 (andRH2019 Classic). I'll search out my js and post back a snippet.

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
community guidelines
Community Expert ,
Aug 23, 2020 Aug 23, 2020

Copy link to clipboard

Copied

LATEST

Here's a snippet. I'm not a developer so consider this a hack. 🙂

 

This script assumes a class (style) applied to the table. Change filteredTable to whatever style you're using. If you use an id instead, then just change .filteredTable (note the dot) to #yourTableid in all the places in this snippet.

 

Ignoring the initial comments, the first script line creates a variable so we can check if a thead has already been added. It's possible another script might add it, or a future version of RH inserts a thead for us.

 

Line 2 ensures the next two statements only run if a thead doesn't already exist.

 

Line 3 wraps the first table row in thead tags.

 

Line 4  moves the thead out of the tbody (which is inserted "magically" by the browser) to the top of the table.

 

//Robohelp 11 doesn't allow thead so add thead if it doesn't already exist. 
//hasn't been tested if there are multiple tables using DataTables.js in one topic.
var theadExists = $('table.filteredTable thead');
if (theadExists.length === 0) {
$('table.filteredTable > tbody > tr:first-child').wrap('<thead></thead>');
$('table.filteredTable > tbody > thead').prependTo($('table.filteredTable'));
}

 

Oh, I also have another few lines to insert the various dataTables.css files needed, because RH classic doesn't allow for multiple css files, or at least not easily. Use the RH variable gRootRelPath so you don't run into hard coded path issues - your developer should be able to figure it out, but if not let me know and I can post that code as well.

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
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp