lpaulsen93 / dokuwiki-plugin-odt

Exports a page to the Open Document format used by OpenOffice.org and other word processors
http://www.dokuwiki.org/plugin:odt
13 stars 26 forks source link

Adding content via `$renderer->doc` does not seem to work #289

Open saschaleib opened 1 year ago

saschaleib commented 1 year ago

I have managed to make my Ad-Hoc Tags plugin ODT-compatible for the most part, but in some cases I had to use workarounds because I can not get the example for directly outputting to the render document to work:

$renderer->doc .= 'My ODT xml code and content';

This line simply does nothing at all for me.

In that particular case, I am trying to write ODT tags directly to the document (for features that are not built-in in the ODT plugin). So using cdata instead is not really feasible either.

Any chance to get this fixed? :-)

Klap-in commented 1 year ago

I haven’t looked into it, but how do other plugins solve/workaround this, gives that maybe already ideas?

saschaleib commented 1 year ago

At least all plugins I could find seem to only use the prepared functions and of course cdata() to communicate with the ODT plugin.

I haven't looked through the release notes if there is any reason to modify this behaviour. I would understand if this is considered an "internal property" and accessing it directly should not be possible. But in this case it would be good to have an alternative, e.g. a new write() function that directly, well, writes raw data to the document...

Another approach (or an additional functionality) might be an accessor to the document property (which is protected now) so more advanced plugins could directly talk to it (like, there are a number of useful functions here that don't seem to be exposed via the Renderer).

But either way, I just want to write custom tags to the output :-)