Skip to main content
Inspiring
January 28, 2015
Question

Embedding HTML in Fm12 to publish in RhHTML11

  • January 28, 2015
  • 1 reply
  • 782 views

I have a Rh project that links to a Fm book. I'm trying to embed some html into Fm and have it show up in the Rh output. First item is a form. I'd like to have the form within the RH html files.

I've tried to add the code to the Fm reference page in the General Macros, then inserting an HTML macro marker per this help document. But the form didn't make it to the Rh output.

I'm not even sure if what I'm trying to do is possible.

This topic has been closed for replies.

1 reply

Jeff_Coatsworth
Community Expert
Community Expert
January 28, 2015

Highly doubtful – what about putting a link to the form page and including it as a separate file (baggage file) in the RH output?

Inspiring
January 28, 2015

I thought about that, but the embedded content won't always stand alone. This document is an industry standard. I'd like to embed external resources like their YouTube or Vimeo embed code, forms from other parts of their ste, etc. that I can't just attach as baggage files with Rh.

Arnis Gubins
Inspiring
January 30, 2015

I added an anchored frame with the code in a text box. The web files simply show the code, showing as much as is visible in the text box in Frame.

I was hoping to have any html code inserted into the text flow in Fm, since all of the content is sourced there. So I didn't think adding the code to Rh later was a good option. However, I just tried adding the code to Rh <>HTML mode, inserting the code where I wanted it, just like Willam's YouTube/Vimeo method. I got a warning that the file was maintained outside Rh and that my changes could be lost later. But I checked a box to retain my changes. Now I get my form in the published web files. What I don't know yet is how well the code will stay in place in Rh as the Fm files are modified and updated in Rh.

A little progress though, so that's great. Thanks for the html mode suggestion.


The HTML macros only work when using FM's SaveAsHTML route, rather than the Publish stream or using RH.

If you can get a link inserted as a hyperlink to make it through as Jeff suggests [I can't test this now - don't have access to FM and RH today], you might be able to use the HTML5 Imports to create a hook for importing other HTML/CSS/Javascript files into the generated document. [See: HTML Imports: #include for the web - HTML5 Rocks for ideas]