author mode codeblock / coderef in dita
Posted: Fri Mar 23, 2012 4:20 am
i find myself inserting lots of code blocks in files (as separate coderef text files), and every time i do that i find myself doing the following
- starting in author mode
- content assist to insert codeblock
- content assist to insert coderef
- the coderef is now "unhelpful" in author mode
- switch to text mode
- find the auto-inserted <coderef/> and manually insert href=""
- drag a text file from the project between the quotes ... which does the right thing with the relative path
- back to author mode and continue a few lines
sounds mundane, but i'm editing lots of files with code snippets and it's getting pretty old.
- dragging a file over the codeblock/coderef doesn't do what i want (i.e. insert the href of the coderef) .. or at least i can't figure out how to make it do that.
- The attributes view is not helpful - copy/paste inserts an absolute file URI
So ...
- is there a way of doing this in author mode?
- or are the templates for the auto-inserted elements editable somewhere so i can just insert the href="" in there so every coderef gets an href (it's not useful without as far as i can tell)
THANKS
PMac
- starting in author mode
- content assist to insert codeblock
- content assist to insert coderef
- the coderef is now "unhelpful" in author mode
- switch to text mode
- find the auto-inserted <coderef/> and manually insert href=""
- drag a text file from the project between the quotes ... which does the right thing with the relative path
- back to author mode and continue a few lines
sounds mundane, but i'm editing lots of files with code snippets and it's getting pretty old.
- dragging a file over the codeblock/coderef doesn't do what i want (i.e. insert the href of the coderef) .. or at least i can't figure out how to make it do that.
- The attributes view is not helpful - copy/paste inserts an absolute file URI
So ...
- is there a way of doing this in author mode?
- or are the templates for the auto-inserted elements editable somewhere so i can just insert the href="" in there so every coderef gets an href (it's not useful without as far as i can tell)
THANKS
PMac