Skip to content

timof1308/text-transform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript Text Transform Plugin

Author License Version

Getting Started

  1. download text-transform.js from repository
  2. include this file to your project
  3. make sure your HTML-syntax looks like this
<p id="to_replace" tt-text="JavaScript to encode and decode text" tt-chars="0011 "></p>
  1. initialize text-transform with
new Text_Transform('#to_replace');
  1. text-transform gets triggered either if element is in view or after DOM was loaded

How To Use

Option 1

Take a look at the example above.

  • use tt-text in your html element and specify the text you want to encode.
  • use tt-chars in your html element to specify the characters your text will be transformed to in random order.
  • if no tt-chars is set, default will be used: @!§$%&\/()=?+*#-_<>{}[]

Option 2 with extra options

  • define your html element
<p id="to_replace"></p>
  • set your JavaScript options
new Text_Transform('#to_replace', {
    text: "Option 2 with extra options",
    chars: "0011 ",
    loop: true,
    encode_delay: 10000,
    decode_delay: 4000
});
Options:
Option Description
text Text that will be decoded
chars Characters your text will be transformed to in random order
loop Run text transform in loop
encode_delay if loop is true time to wait until text-transform will be executed again
decode_delay time to wait until encoded text will be decoded again

About

JavaScript HTML Text-Transform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published