How to import .htm files into Confluence with embedded images?
Asked by Timothy Hitchcock:

Trying to move content created in Helpsmith 7.x (stored as .chm file) into Confluence KB, our new preferred container. Helpsmith offers "compile and export" in Word (.docx) and Web Help (.htm) format. They also compile to PDF but Confluence is allergic. Because the .docx option requires an installed copy of Word to export, I now have a bunch of .htm files with separate .png illustrations to move into Confluence. All I can find in the Atlassian documentation is "copy and paste" one page at a time. All text, no problem. Text with images . . . problem. What am I missing here? New to Jira and Confluence, BTW.

Is there a way to bring multiple image files into Confluence as a library and then embed them page by page?


Answers:
author: DPKJ
body: This won't be straight forward, you will need to write some script.

* Take all HTML page and push there content to confluence page
* Take all images and push them to respective confluence page as attachment
* Rewrite image links to point to attachments.

It is not that tough, you can do it with basic programming knowledge.

comments: author: Timothy Hitchcock
body: DPK J, Thanks for responding. Sorry, I don't know how to "write some script" or "push...content to confluence page." What concepts and skills am I missing here? Should I be interacting directly with the Confluence API using a command line shell or some other programming environment? Tim


author: DPKJ
body: [@Timothy Hitchcock](/t5/user/viewprofilepage/user-id/3524836)

Confluence provide two kind of API's (for programming)

1. JAVA API
   * Useful for Confluence plugin development
   * You need to have experience in Java to use it
2. REST API
   * Rest are APIs that work over HTTP (just like websites)
   * You can consume these API in any programming language or tool like \`Postman\`.
   * Anyone with web programming experience can help you with this.

If your job is to do it one time, REST API is best option. If you want to do it again and again, you can write simple Plugin using Java API. In both cases you need to find developer/programmer.

Atlassian suggests that you ask your Solution Provider/Partner with on boarding. But if you are opting to use Confluence on your own, you need to find developer for this. It will 2-3 days for this job to be done.

Moreover, if you are comfortable with command line, you can check this plugin ([https://marketplace.atlassian.com/apps/284/confluence-command-line-interface-cli?hosting=cloud\&tab=overview](https://marketplace.atlassian.com/apps/284/confluence-command-line-interface-cli?hosting=cloud&tab=overview)), this can also make your life easier (I haven't used it, but I have seen people suggesting to use it in use cases like yours).


author: Richard Martin
body: NO - - WRONG ATTITUDE ATLASSIAN - - think strategically about your customer.

You must remove all obstacles for each class of customer you want to acquire and then you must actively pursue them.

Count the total number of developers on GitHub (the largest collection of anyone and everyone that dares to even call themselves a developer).

You do not want one-tenth of that open-source market to be the number of your customer base.

Confluence Cloud will not succeed as a platform if Atlassian requires the minimum headspace of everyday users to be a developer.

Please get your development team on this and / or use some of our subscription cash to pay for some developers and solve this.

Make a utility and sell it in the Marketplace if you have to, but get it done.


Tags: cloud

confluence-cloud