Sha256: 0dff2fd34e84b52fb756938d0ba3d9668af75ffa3bce6ae4d8d4dfa09ad93c0f
Contents?: true
Size: 1.55 KB
Versions: 4
Compression:
Stored size: 1.55 KB
Contents
"use strict"; namespace('Zen.Editor'); /** * Textile driver for the text editor that ships with Zen. * * @since 0.2.6 */ Zen.Editor.Textile = new Class( { Extends: Zen.Editor, /** * Overrides Zen.Editor.bold. * * @since 0.2.6 * @param {element} editor The textarea to insert the tags into. */ bold: function(editor) { editor.insertAroundCursor({before: '*', after: '*'}); }, /** * Overrides Zen.Editor.italic. * * @since 0.2.6 * @param {element} editor The textarea to insert the tags into. */ italic: function(editor) { editor.insertAroundCursor({before: '_', after: '_'}); }, /** * Overrides Zen.Editor.link. * * @since 0.2.6 * @param {element} editor The textarea to insert the tags into. */ link: function(editor) { var link = prompt('URL', 'http://'); editor.insertAroundCursor( { before: '"', after: '":' + link }); }, /** * Overrides Zen.Editor.ul. * * @since 0.2.6 * @param {element} editor The textarea to insert the tags into. */ ul: function(editor) { editor.insertAroundCursor( { before: "\n* " }); }, /** * Overrides Zen.Editor.ol. * * @since 0.2.6 * @param {element} editor The textarea to insert the tags into. */ ol: function(editor) { editor.insertAroundCursor( { before: "\n# " }); } });
Version data entries
4 entries across 4 versions & 1 rubygems