Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.73 KB

README.md

File metadata and controls

53 lines (35 loc) · 1.73 KB

syn·co·pate (sĭng'kə-pāt', sĭn'-)

tr.v., -pat·ed, -pat·ing, -pates.

  1. Grammar. To shorten (a word) by syncope.
  2. Music. To modify (rhythm) by syncopation.
  3. Web Development. * To synchronize a textarea with a basic "rich text editor", using very little code. * A response to my (i.e., Corey Innis) Pivotal Labs "blab"

[Late Latin syncopāre, syncopāt-, from syncopē, syncope. See syncope.]

(shake, shake, shake) shake your booty

Hey, you wanna get down tonight? Check out:

  • example/index.html; that's the way (i like it)
  • the screw unit spec suite in spec/suite.html; stayin' alive

you should be dancing

For your own site,

  • copy and reference:

    • lib/jquery.js
    • lib/disco.js
    • lib/sycopate.js
  • get your groove on:

    $('textarea.syncopate').syncopate({
      // 'commands' is an array of arrays, grouping editor commands.
      // check out https://developer.mozilla.org/En/Rich-Text_Editing_in_Mozilla
      commands : [
        ['bold', 'italic', 'underline'],
        ['indent', 'outdent']
      ]
    });
    

reach out (i'll be there)

Found an issue? Let us know (in GitHub's issue tracker)!