diff --git a/lib/gollum/frontend/public/javascript/gollum-editor/langs/textile.js b/lib/gollum/frontend/public/javascript/gollum-editor/langs/textile.js index 81639840..5411106b 100644 --- a/lib/gollum/frontend/public/javascript/gollum-editor/langs/textile.js +++ b/lib/gollum/frontend/public/javascript/gollum-editor/langs/textile.js @@ -97,7 +97,7 @@ var Textile = { h += '(' + res['alt'] + ')'; } h += '!'; - %.GollumEditor.replaceSelection( h ); + $.GollumEditor.replaceSelection( h ); } } }); @@ -108,4 +108,69 @@ var Textile = { jQuery.GollumEditor.defineLanguage('textile', Textile); + +var TextileHelp = [ + { + menuName: 'Phrase Modifiers', + content: [ + { + menuName: 'Emphasis / Strength', + data: '

To place emphasis or strength on inline text, simply place _ (underscores) around the text for emphasis or * (asterisks) around the text for strength. In most browsers, _mytext_ will appear as italics and *mytext* will appear as bold.

To force italics or bold, simply double the characters: __mytext__ will appear italic and **mytext** will appear as bold text.

' + }, + { + menuName: 'Citations / Editing', + data: '

To display citations, wrap your text in ?? (two question marks).

To display edit marks such as deleted text (strikethrough) or inserted text (underlined text), wrap your text in - (minuses) or + (pluses). For example -mytext- will be rendered as mytext and +mytext+ will be rendered as mytext

' + }, + { + menuName: 'Superscript / Subscript', + data: '

To display superscript, wrap your text in ^ (carets). To display subscript, wrap your text in ~ (tildes).

' + }, + { + menuName: 'Code', + data: '

To display monospace code, wrap your text in @ (at symbol). For example, @mytext@ will appear as mytext.

' + }, + { + menuName: 'Acronyms', + data: '

To create an acronym, suffix the acronym with the definition in parentheses. For example, JS(JavaScript) will be displayed as JS.

' + } + ] + }, + { + menuName: 'Block Modifiers', + content: [ + { + menuName: 'Headings', + data: '

To display a heading in Textile, prefix your line of text with hn., where n equals the heading size you want (1 is largest, 6 is smallest).

' + }, + { + menuName: 'Paragraphs / Quotes', + data: '

To create a new paragraph, prefix your first line of a block of text with p..

To create a blockquote, make sure at least one blank line exists between your text and any surrounding text, and then prefix that block with bq. If you need to extend a blockquote to more than one text block, write bq.. (note the two periods) and prefix your next normal paragraph with p.

' + }, + { + menuName: 'Code Blocks', + data: '

Code blocks in textile are simply prefixed like any other block. To create a code block, place the beginning of the block on a separate line and prefix it with bc.

To display a preformatted block, prefix the block with pre.

' + }, + { + menuName: 'Lists', + data: '

To create ordered lists, prefix each line with #. To create unordered lists, prefix each line with *.

' + } + ] + }, + { + menuName: 'Links / Images', + content: [ + { + menuName: 'Links', + data: '

To display a link, put the text you want to display in quotes, then a colon (:), then the URL after the colon. For example "GitHub":http://github.com/ will appear as GitHub.

' + }, + { + menuName: 'Images', + data: '

To display an image, simply wrap the image’s URL in ! (exclamation points). If you want to link the image to a URL, you can blend the image and link syntax: place your image URL in the exclamation points and suffix that with a colon and your URL. For example, an image at http://myurl/image.png that should link to http://myurl/ should be written as !http://myurl/image.png!:http://myurl/.

' + } + ] + } +]; + +jQuery.GollumEditor.defineHelp('textile', TextileHelp); + })();