Skip to content

iapyeh/TextFactory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

繁體中文版

Text Factory Help

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.

Release Note (Mar 5, 2016)

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.

Insert Date

Inserts the datetime into the document.

From Menu Item

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

|IMG1|

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

|IMG2|

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

The selected format itemIMG4 would appear in the text field

|IMG6|

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

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

Format Text

|IMG12|

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

|IMG13|

Put into Parentheses

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

|IMG14|

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

|IMG15|

Add Thousands Separator

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

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.

|IMG16|

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.

|IMG17|

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”

|IMG18|

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

IMG19Then, 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:

|IMG21|

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:

IMG22

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

|IMG23|

  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 [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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published