snippets in Author?
Are you missing a feature? Request its implementation here.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: snippets in Author?
Post by sorin_ristache »
Hello,
I am not sure I understand: do you mean you cannot insert XML markup in Text mode? Make sure the Text button is pressed at the bottom of the editing area (that is you edit your XML document in Text mode) and paste some text including XML markup that you copied to clipboard previously. Or type your XML tags directly in the editor.
Do you want a kind of separate buffer view where you can keep temporary snippets while editing an XML document? You can use the Scratch Buffer view available from menu Perspective -> Show View -> Scratch Buffer.
Regards,
Sorin
I am not sure I understand: do you mean you cannot insert XML markup in Text mode? Make sure the Text button is pressed at the bottom of the editing area (that is you edit your XML document in Text mode) and paste some text including XML markup that you copied to clipboard previously. Or type your XML tags directly in the editor.
Do you want a kind of separate buffer view where you can keep temporary snippets while editing an XML document? You can use the Scratch Buffer view available from menu Perspective -> Show View -> Scratch Buffer.
Regards,
Sorin
-
- Posts: 31
- Joined: Sun Jun 14, 2009 4:25 pm
Re: snippets in Author?
That's close (and thanks for the quick reply!) I like to work in text mode, just because it's cleaner (I may get more comfortable with the Author view eventually, which looks really cool), but I was hoping that I could set up a little collection of tags -- even simple ones like <para></para> -- that I could insert with a keystroke.
A list item for example --
<listitem>
<para></para>
</listitem>
It would be cool to be able to hit a key, or a button and get that.
But maybe I'm looking for Author features in the Text view : )
Anyway, I'm a big fan of Oxygen; it has so many cool features, I feel like I'm quibbling.
A list item for example --
<listitem>
<para></para>
</listitem>
It would be cool to be able to hit a key, or a button and get that.
But maybe I'm looking for Author features in the Text view : )
Anyway, I'm a big fan of Oxygen; it has so many cool features, I feel like I'm quibbling.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: snippets in Author?
Post by sorin_ristache »
You should check out the code templates feature. The name of the code template is displayed in the content completion popup when a prefix of the name is already typed at the current position of the cursor. Look at the predefined code templates for the XSD Editor and the XSL Editor.
Regards,
Sorin
Regards,
Sorin
-
- Posts: 10
- Joined: Thu Jun 18, 2009 9:30 pm
Re: snippets in Author?
We create Actions in our framework files that insert the text snippets and then we add the Actions to our toolbars. This method limits our ability to create a large number of text snippets; however, as we are just starting to use text snippets this solution has worked well for us.
To create Actions to insert text snippets:
To create Actions to insert text snippets:
- 1. Choose Options>Preferences>Document Type Declaration and then select your document type (e.g., docbook 5)and then click Edit.
2. Click Author.
3. Click Actions.
4. Click + to create a new action.
5. In the ID field type a name (e.g., snippet.runcommand).
6. In the Name field type a descriptive name to use on the toolbar (e.g., Run command).
7. In the Invoke The Operation field, choose ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation or ro.sync.ecss.extensions.commons.operations.SurroundWithFragmentOperation (if you want to include element tags).
8. Double-click to edit the With The Arguments Table. In the Value box, type the snippet text.
For example: Run the following command
For example:
<guilabel>Start</guilabel>→<guilabel>Programs</guilabel>→<guilabel>SQL Anywhere 12</guilabel>
9. Click OK.
10. Click OK.
11. Click Toolbar and add the new action to the toolbar ...
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service