By: David
Date: 2013-01-14
Time: 02:28
|
Feature ideaI often find myself doing something like this:
|
||
By: Sarah
Date: 2013-01-14
Time: 17:17
|
Re: Feature ideaI don't know if this helps, but you can always used multiple <w:t>s like this:
If you look in the source of a Word document, sentences are often broken up in this way to accommodate spelling/grammar error styling. |
||
By: David
Date: 2013-01-14
Time: 19:01
|
Re: Feature ideaSorry, but my knowledge of word is not good enough to figure this out. I don't understand how to get the <w:t> and </w:t> around the parentheses. I thought the w:t tag was the start of the document text and the /w:t was at the end. How do I get word to insert the tags?
Thanks, David |
||
By: Sarah
Date: 2013-01-14
Time: 19:31
|
Re: Feature ideaAh, I should have realized you were working in WYSIWYG. I don't know of a way to make Word include extra <w:t>s where you want them inside Word, the method I was talking about only works if you are editing document.xml directly.
You might want to look at the findBounds() function here: http://www.tinybutstrong.com/manual.php#coding_block_alias It looks like this will allow you to search for the nearest '(' as a method of encapsulating your block. Of course, this uses a block, which I know you wanted to avoid. Unfortunately I haven't worked with this so I can't tell you much more about it. I will point out that you may not need to stress about how Word is placing these tags. When I ran a basic test with a document containing only the content you provided, I used:
And it behaved correctly, because Word was already separating your string into multiple <w:t>s and TBS does its own cleanup. So that might be worth a try. Good luck. |
||
By: David
Date: 2013-01-14
Time: 19:40
|
Re: Feature ideaThanks. I will try to use the w:t on a few of these and see what I get. Do you know of inexpensive software that would provide an easy way to edit the XML directly on a Mac if I want to insert the tags manually?
|
||
By: Sarah
Date: 2013-01-14
Time: 20:43
|
Re: Feature ideaAny text editor will do it - there are lots of options. I use (Windows) Notepad++ with an XML Tools Plugin to format it so it is easy to read. I am sure there is a program that comes with your computer that is capable of it,
and from what I found on Google, Macs come pre-installed with xmllint, which is what does the formatting. If that doesn't work for you, I know there are many free options available - it is really a matter of preference. A quick google search for 'mac xml edit format' turned up plenty of free results. It looks like you can use Text Edit, which comes with the OS (?) - though you may need to check preferences if the tags don't display right off the bat. Keep in mind that if you decide to edit the xml directly, saving the file again in Word will likely undo your work on the xml (at least some of it - it depends what you change). |