I've been looking for a migration path to get our existing FrameMaker documents into Confluence 4.0.
If I export a space, I can see that a page body looks like this:
<property name="body"><![CDATA[<p>Paragraph</p><h1>Heading 1</h1><h2>Heading 2</h2><pre>Preformatted</pre><blockquote><p>Quote</p></blockquote><p>Paragraph</p><p>Character styles: <strong>bold</strong> <em>italic</em> <u>underlined</u> <span style="color: rgb(255,0,0);">red</span> <s>strikethrough</s> <sub>subscript</sub> <sup>superscript</sup> <code>monospace</code></p><ul><li>bullet list 1</li><li>bullet list 2</li></ul><ol><li>numbered list 1</li><li>numbered list 2</li></ol><p>Paragraph</p>]]></property>
Kludge no longer necessary, just install the Confluence Source Editor plugin.
I guess Atlassian's answer is to buy Arsenale Invisible Ink:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, as I said, this seems like an absurd kludge, but it works: paste the HTML in an HTML macro, save, copy the rendered text, edit, and paste over the HTML macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, must remember to not use the iPad to answer questions on here.
Full answer was that at a guess I'd say that the <![CDATA tag was throwing the HTML Macro as CDATA tells the macro it's character data and shouldn't be parsed. What happens if you remove the opening and closing <![CDATA tags and just try the text from <p>paragraph</p>... onwards in your above example?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. Use the HTML macro. It has to be enabled by an administrator. Notice also some widgets work with the Widget Connector.
Sorry, on reading this again, I didn't see your intial comment:
If I use an HTML Macro, it doesn't get parsed, it stays in HTML.
It works if you cut off the front and the back, as Andrew says:
<h1>Heading 1</h1><h2>Heading 2</h2><pre>Preformatted</pre><blockquote><p>Quote</p></blockquote><p>Paragraph</p><p>Character styles: <strong>bold</strong> <em>italic</em> <u>underlined</u> <span style="color: rgb(255,0,0);">red</span> <s>strikethrough</s> <sub>subscript</sub> <sup>superscript</sup> <code>monospace</code></p><ul><li>bullet list 1</li><li>bullet list 2</li></ul><ol><li>numbered list 1</li><li>numbered list 2</li></ol>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It doesn't get parsed, only rendered. When I edit the page, the code is still embedded in the HTML macro. If I could edit the source, I could just delete the macro tags (Confluence is adding the CDATA tags, all I'm pasting is the stuff from <h1> to </ol>):
<ac:macro ac:name="html"><ac:plain-text-body><![CDATA[ <h1>Heading 1</h1> <h2>Heading 2</h2> <pre>Preformatted</pre> <blockquote> <p>Quote</p></blockquote> <p>Paragraph</p> <p>Character styles: <strong>bold</strong> <em>italic</em> <u>underlined</u> <span style="color: rgb(255,0,0);">red</span> <s>strikethrough</s> <sub>subscript</sub> <sup>superscript</sup> <code>monospace</code></p> <ul> <li>bullet list 1</li> <li>bullet list 2</li></ul> <ol> <li>numbered list 1</li>
<li>numbered list 2</li></ol>]]></ac:plain-text-body></ac:macro>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, thanks. Now athat you mention rendering as opposed to parsing, it helps.
I think you can use the Remote API (v2) to store pages in xhtml. In fact that might be ideal, since you can upload a lot of them at once, programatically:
https://developer.atlassian.com/display/CONFDEV/Confluence+XML-RPC+and+SOAP+APIs
Notice this note:
https://developer.atlassian.com/display/CONFDEV/Changes+to+the+remote+API+in+Confluence+4.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, I found the Remote API, but that seems more like something to use to build a plugin to do what I need. The stuff I'm migrating needs a lot of cleanup after import, so it's most efficient to cut and paste page by page.
One sort of absurd kludge is to use an HTML macro, save, copy the rendered text, edit, and paste over the HTML macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's not quite building a plugin, you can use a script to do it, but yeah it's code-heavy if you're not a developer. The Command Line Interface might be a way to go?
Otherwise, yes, I think the copy and paste from the rendered output is the way to do it through the UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tried the CLI using the following. The HTML is not parsed, just shows up as literal text.
confluence --action addpage --space "robert01" --title "test001" --content "<h1>Heading 1</h1>" --parent "Home"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like that might be a bug:
https://studio.plugins.atlassian.com/browse/CSOAP-116
Have a look there, it seems like Bob (the author) will put that in the next version.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not sure that's relevant. The CLI addPage command handles HTML just like the editor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.