繁體中文版


Text Factory User Guide

Version 2015/2/26

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.

Insert Date

Inserts the datetime into the document.

From Menu Item

IMG1==========

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.

From Sidebar

IMG2

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.

Format Editing

IMG3

By clicking on “Edit Format” IMG4 button, the Format Editing Form would show up.

The selected format itemIMG5 would appear in the text field

IMG7

You may delete the selected format by the IMG8 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 IMG9IMG10buttons. The top format will be used for the three menuitems to generate their datetime value.

The last item “New Format”IMG11 is for adding new format. Just click on this item, then input new format in the text field

Format Text

IMG13

The functions on this section are applied to text selection. You have to select some text before proceeding. Like this:

IMG14

Put into Parentheses

This function add paired symbols to your text selection. For example:

IMG15

These are options that you can use to encapsulate your selection. Just click on your favorite symbol to make it happen.

IMG16

Add Thousands Separator

This function adds thousands separators into your selection. Only the numbers in the selection would be applied.

IMG17

Convert Letter Case

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.

IMG18

Conversion of Fullwidth/Halfwidth

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.

IMG19

Conversion of Fullwidth/Halfwidth Punctuations

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>>
! !
? ?
: :
- -
; ;
   
    -
    -

Step-by-Step: How to know what’s wrong by the Chrome Console.

  1. Open the Chrome and a Google Docs Document.
  2. Open the sidebar of the TextFactory by “View more options”

IMG20

  1. In the sidebar, click the “Edit Format” button on the lower right.

IMG21Then, it would be:

  1. 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:

IMG23

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:

IMG24

  1. If something goes wrong, the Google Chrome would drop its complains on the javascript console, like this:

IMG25

  1. please take a screenshot of the console which includes the message on the console as much as possible.
  2. Appreciation! it’s all. Please mail the screenshots to me at iapyeh@gmail.com

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

Release Notes

2018-02-09

Open all the source codes to be accessible on the Github repository. (repository name: TextFactory)

2018-01-02

feature: enable user to set time zone manually

2017-11-08

fixes: Typo, Calendar in daylight saving area, workaround for script’s issue #36759856

2017-10-7

format: %+d, %enB and %enb. For “%+d %enB, %Y” would insert “1st October 2017”.

2017-4-18:

feature: insert date from calendar

2016-10-09:

feature: add format for the Hebrew and lunar calendar.

2016-03-05

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.

2016-2-27:

feature: the leading zero will be removed by prefixing * to the existing format.