botanjs/src/Astro/Blog/AstroEdit/SmartInput/CandidateAction/Footnote.js
raw ยท 1080 bytes
(function ()
{
var ns = __namespace( "Astro.Blog.AstroEdit.SmartInput.CandidateAction" );
/** @type {System.utils.IKey} */
var IKey = __import( "System.utils.IKey" );
/** @type {System.utils.DataKey} */
var DataKey = __import( "System.utils.DataKey" );
/** @type {Dandelion.IDOMElement} */
var IDOMElement = __import( "Dandelion.IDOMElement" );
/** @type {Dandelion} */
var Dand = __import( "Dandelion" );
/** @type {Astro.Blog.AstroEdit.SmartInput.ICandidateAction} */
var Footnote = function ( visualizer, key )
{
this.visualizer = visualizer;
this.key = key;
};
Footnote.prototype.GetCandidates = function( handler )
{
handler( false );
};
Footnote.prototype.Process = function( content )
{
this.visualizer.insertSnippet( "footnote", { "value": content } );
};
Footnote.prototype.Retreat = function( sender, e )
{
return sender.value == "" && e.keyCode == 8; // Backspace
};
ns[ NS_EXPORT ]( EX_CLASS, "Footnote", Footnote );
})();