Version 2015/2/26
By Yeh, Hsin Yuan
This idea of this google-doc add-on is to save users time by providing several text utilities. With this add-on, users can insert datetime from the pulldown menu directly. It also helps users to add parentheses to selection, add thousands separators to numbers and do conversion between width form of fonts. The datetime format is customizable. It can be used in different cultural context.
A new version has been updated.
You can now add a “*” in the format to remove the leading zero. For example, if “%d” yields “02”, then the “%*d” would be “2”. This is also valid for %h, %j, %m,...ect.
Inserts the datetime into the document.
You may insert the datetime from the pull-down menu. You have three choices: Yesterday, Today and Tomorrow. Just select the item, the respective datetime value will insert to the document at the cursor position.
You may change the format of these values by moving up your favorite format item to top in the formats list. You can find the format list in the “Format Editing Form” in sidebar. See “Format Editing” below for details.
You can bring up the sidebar by the “View more options” menuitem.
The “Select Day” is for changing the base day to “yesterday” or “tomorrow” from the default value “ today”.
The “Select Format” is for choosing proper datetime format in context to insert.
By clicking on the blue “Insert” button. The item content on the above Selected Format will be inserted into the document.
By clicking on “Edit Format” button, the Format Editing Form would show up.
You may delete the selected format by the button on the right. But you can not delete them all. If there is only one format left on the list, it can not be deleted.
You may sort the formats by the buttons. The top format will be used for the three menuitems to generate their datetime value.
The last item “New Format” is for adding new format. Just click on this item, then input new format in the text field
The functions on this section are applied to text selection. You have to select some text before proceeding. Like this:
This function add paired symbols to your text selection. For example:
These are options that you can use to encapsulate your selection. Just click on your favorite symbol to make it happen.
This function adds thousands separators into your selection. Only the numbers in the selection would be applied.
This function converts the letter case in the selection. There are three options: “lower” button converts all alphabets to lowercase, “Title” button converts the first letter to uppercase and the others to lowercase, “UPPER” button converts all alphabets to uppercase.
This function converts the selection between fullwidth and halfwidth form. The fullwidth and halfwidth form is a symbol in two kinds of writing style. The fullwidth form is visually double width than the halfwidth one, in fact, these two are different unicode characters. Below are some characters of halfwidth and fullwidth.
This function is only available for CJK locale. In context of punctuations, the mappings between fullwidth and halfwidth forms are different. For example, the halfwidth full stop “.” should maps to “。”, not “.”(this is what the above “Conversion of Fullwidth/Halfwidth” does). This function only converts punctuation symbols in CJK writing traditions. Below is the mapping table of the punctuation conversion:
Halfwidth To Fullwidth | Fullwidth To Halfwidth | ||
‘ | ‘ | ‘ | ' |
“ | “ | “ | " |
{T} | {T} | {T} | {T} |
(T) | (T) | (T) | (T) |
[T] | [T] | [T] | [T] |
[[T]] | 『T』 | 『T』 | [[T]] |
, | , | , | , |
. | 。 | 。 | . |
.. | ‥ | ‥ | .. |
... | … | … | ... |
<T> | 〈T〉 | 〈T〉 | <T> |
<<T>> | 《T》 | 《T》 | <<T>> |
! | ! | ! | ! |
? | ? | ? | ? |
: | : | : | : |
- | — | — | - |
; | ; | ; | ; |
、 | 、 | ||
- | - | ||
— | - |
- Open the Chrome and a Google Docs Document.
- Open the sidebar of the TextFactory by “View more options”
- In the sidebar, click the “Edit Format” button on the lower right.
Open the javascript console with keyboard shortcut:
[Before you are going to press on the keyboard, please mouse-click on any empty area in the sidebar again to make sure the sidebar being the focus frame.]
4.1 For MS Windows users, please open the developer tool by Ctrl+Shift+J , then click on the tab of “Console”, it would something like this:
4.2 For Mac OS users, please open the developer tool by ⌘+Option+J , then click on the tab of “Console”, it would something like this:
- If something goes wrong, the Google Chrome would drop its complains on the javascript console, like this:
- please take a screenshot of the console which includes the message on the console as much as possible.
- Appreciation! it’s all. Please mail the screenshots to me at [email protected]
If you have any question about the console, you may consult this document of Google:https://developer.chrome.com/devtools/docs/console
Welcome any suggestion and comments. Contacts:iapyeh@gmail.com