Feature request: Field Codes as alternative to cmdDelimiter characters
Amerlander opened this issue · comments
Juri Wolf commented
I'm searching for ways to improve the ease of use when creating templates.
There is a function in word called Field Codes (STRG+F9 to insert one). I was thinking if it would be possible to use these instead of delimiting characters. Has anyone already thought about this, or are there technical limitations I don't have in mind?
Advantages of Field Codes:
- Easy to insert
- Visual highlighting of fields
- Get deleted as whole field when deleted by backspace
- Brackets are bolder than regular brackets, so it's better to see them and differentiate between brackets inside the JS
- No spellchecking inside fields
The XML for {ABC} is:
<w:r>
<w:rPr>
<w:lang w:val="en-GB"/>
</w:rPr>
<w:fldChar w:fldCharType="begin"/>
</w:r>
<w:r>
<w:rPr>
<w:lang w:val="en-GB"/>
</w:rPr>
<w:instrText xml:space="preserve">
ABC
</w:instrText>
</w:r>
<w:r>
<w:rPr>
<w:lang w:val="en-GB"/>
</w:rPr>
<w:fldChar w:fldCharType="end"/>
</w:r>
Here are two pictures of a regular test template and one with field codes. The cursor is in both inside the “Work Title” field:
Juri Wolf commented