DITA and XMetaL Discussion
XMetaL Community Forum › DITA and XMetaL Discussion › Customize element creation when editor creates new line
-
John Cornellier August 21, 2015 at 2:21 pm
Customize element creation when editor creates new line
August 21, 2015 at 2:21 pmParticipants 2Replies 3Last Activity 6 years, 10 months agoXMetaL Version#: 8.0.1.052. When writers hit enter in an
- they wish to see another
- created, but a
is created. Not sure if this is default or because we are using a slightly specialized version of DITA. How do I change this behaviour?
Derek Read August 21, 2015 at 5:38 pm
Reply to: Customize element creation when editor creates new line
August 21, 2015 at 5:38 pmIf you are at the end of a list and the last list item contains no content pressing enter finishes the list and the next logical element is inserted (in this case
is inserted after the list). If you are at the end of a list and the last list item contains some content then pressing enter adds another list item.
I assume that is what you are seeing?
Assuming the following basic markup as the starting point:
1. Type some text:
- some text
2. Press enter:
- some text
You can repeat steps 1 and 2 indefinitely to extend any list.
3. After repeating steps 1 and 2 a few times if you press enter without entering anything into the last list item that was created you exit the list:
- some text
- some more text
- even more text
For a list containing two or more items pressing enter at the end of any list item except the last one will always insert a new list item at that position.
If you are at the very start of a list before all list items (this is only possible in Tags On view) then pressing enter creates a new list before the current one (internally the list is actually being split).
If you are at the very end of a list after all list items (this is only possible in Tags On view) then pressing enter always inserts the next logical element after the list (which for DITA is a
).
If you aren't seeing this behaviour then there is probably something wrong with the installation of the DITA authoring functionality and I would recommend reinstalling.
John Cornellier August 21, 2015 at 5:59 pm
Reply to: Customize element creation when editor creates new line
August 21, 2015 at 5:59 pmThanks for the quick reply. What I'm seeing is the following:
With the following basic markup as the starting point:
1. Type some text:
- some text
2. Press enter:
- some text
So according to what you wrote there is “probably something wrong with the installation of the DITA authoring functionality” but I can't reinstall the DITA part. Long story short, it's a standard environment I have to work with. I've requested a fix but it's not forthcoming. Was hoping to do a local hack as it's very annoying for the writers. I realise this is probably not a XMetaL problem but it'd be great if I could fix it with for e.g. C:Program Files (x86)XMetaL 8.0AuthorDITAXACs1.1topictopic_ditabase.ctm.
Derek Read August 21, 2015 at 8:21 pm
Reply to: Customize element creation when editor creates new line
August 21, 2015 at 8:21 pmI think you must be using specialized DITA DTDs because the
element is not normally allowed directly inside an
- for the standard DITA DTDs.
If so, the CTM file associated with your specialized DITA DTD would need to be modified. You would need to add new entries to the
section. The items in that list are checked in order, so whatever you add should be added prior to anything else that can be legally inserted. When a specific item is not found in this list that can legally be inserted then the fallback is to try items from the section of the CTM file (in order) and if there is nothing from that list that can be legally inserted then the final fallback is to try to insert the same element as the current one. -
AuthorPosts
- You must be logged in to reply to this topic.