#pragma warning disable 1591 //------------------------------------------------------------------------------ // // Ce code a été généré par un outil. // Version du runtime :4.0.30319.42000 // // Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si // le code est régénéré. // //------------------------------------------------------------------------------ namespace BookAStar.Droid { using System; using System.Collections.Generic; using System.Linq; using System.Text; [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorTemplatePreprocessor", "4.2.0.680")] public partial class MarkdownEditor : MarkdownEditorBase { #line hidden #line 1 "MarkdownEditor.cshtml" public string Model { get; set; } #line default #line hidden public override void Execute() { WriteLiteral("\r\n\r\n\r\n \r\n \r\n "); #line 28 "MarkdownEditor.cshtml" Write(Html.Write(Model)); #line default #line hidden WriteLiteral("\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n var toolbarOptions = [ ['bold', 'italic', 'underline', 'strike'], // toggled buttons ['blockquote', 'code-block'], [{ 'header': 1 }, { 'header': 2 }], // custom button values [{ 'list': 'ordered' }, { 'list': 'bullet' }], [{ 'indent': '-1' }, { 'indent': '+1' }], // outdent/indent ['link', 'image'], ['clean'] // remove formatting button ]; var quill = new Quill('#bubble-container', { modules: { toolbar: toolbarOptions }, placeholder: 'Composez votre texte ...', theme: 'snow' }); function getMD() { return markdownize($('#bubble-container div.ql-editor').html()) } quill.on('text-change', function (delta, oldDelta, source) { if (source === ""user"") { invokeCSharpAction(getMD()); } }); "); } } // NOTE: this is the default generated helper class. You may choose to extract it to a separate file // in order to customize it or share it between multiple templates, and specify the template's base // class via the @inherits directive. public abstract class MarkdownEditorBase { // This field is OPTIONAL, but used by the default implementation of Generate, Write, WriteAttribute and WriteLiteral // System.IO.TextWriter __razor_writer; // This method is OPTIONAL // /// Executes the template and returns the output as a string. /// The template output. public string GenerateString () { using (var sw = new System.IO.StringWriter ()) { Generate (sw); return sw.ToString (); } } // This method is OPTIONAL, you may choose to implement Write and WriteLiteral without use of __razor_writer // and provide another means of invoking Execute. // /// Executes the template, writing to the provided text writer. /// The TextWriter to which to write the template output. public void Generate (System.IO.TextWriter writer) { __razor_writer = writer; Execute (); __razor_writer = null; } // This method is REQUIRED, but you may choose to implement it differently // /// Writes a literal value to the template output without HTML escaping it. /// The literal value. protected void WriteLiteral (string value) { __razor_writer.Write (value); } // This method is REQUIRED if the template contains any Razor helpers, but you may choose to implement it differently // /// Writes a literal value to the TextWriter without HTML escaping it. /// The TextWriter to which to write the literal. /// The literal value. protected static void WriteLiteralTo (System.IO.TextWriter writer, string value) { writer.Write (value); } // This method is REQUIRED, but you may choose to implement it differently // /// Writes a value to the template output, HTML escaping it if necessary. /// The value. /// The value may be a Action, as returned by Razor helpers. protected void Write (object value) { WriteTo (__razor_writer, value); } // This method is REQUIRED if the template contains any Razor helpers, but you may choose to implement it differently // /// Writes an object value to the TextWriter, HTML escaping it if necessary. /// The TextWriter to which to write the value. /// The value. /// The value may be a Action, as returned by Razor helpers. protected static void WriteTo (System.IO.TextWriter writer, object value) { if (value == null) return; var write = value as Action; if (write != null) { write (writer); return; } //NOTE: a more sophisticated implementation would write safe and pre-escaped values directly to the //instead of double-escaping. See System.Web.IHtmlString in ASP.NET 4.0 for an example of this. writer.Write(System.Net.WebUtility.HtmlEncode (value.ToString ())); } // This method is REQUIRED, but you may choose to implement it differently // /// /// Conditionally writes an attribute to the template output. /// /// The name of the attribute. /// The prefix of the attribute. /// The suffix of the attribute. /// Attribute values, each specifying a prefix, value and whether it's a literal. protected void WriteAttribute (string name, string prefix, string suffix, params Tuple[] values) { WriteAttributeTo (__razor_writer, name, prefix, suffix, values); } // This method is REQUIRED if the template contains any Razor helpers, but you may choose to implement it differently // /// /// Conditionally writes an attribute to a TextWriter. /// /// The TextWriter to which to write the attribute. /// The name of the attribute. /// The prefix of the attribute. /// The suffix of the attribute. /// Attribute values, each specifying a prefix, value and whether it's a literal. ///Used by Razor helpers to write attributes. protected static void WriteAttributeTo (System.IO.TextWriter writer, string name, string prefix, string suffix, params Tuple[] values) { // this is based on System.Web.WebPages.WebPageExecutingBase // Copyright (c) Microsoft Open Technologies, Inc. // Licensed under the Apache License, Version 2.0 if (values.Length == 0) { // Explicitly empty attribute, so write the prefix and suffix writer.Write (prefix); writer.Write (suffix); return; } bool first = true; bool wroteSomething = false; for (int i = 0; i < values.Length; i++) { Tuple attrVal = values [i]; string attPrefix = attrVal.Item1; object value = attrVal.Item2; bool isLiteral = attrVal.Item3; if (value == null) { // Nothing to write continue; } // The special cases here are that the value we're writing might already be a string, or that the // value might be a bool. If the value is the bool 'true' we want to write the attribute name instead // of the string 'true'. If the value is the bool 'false' we don't want to write anything. // // Otherwise the value is another object (perhaps an IHtmlString), and we'll ask it to format itself. string stringValue; bool? boolValue = value as bool?; if (boolValue == true) { stringValue = name; } else if (boolValue == false) { continue; } else { stringValue = value as string; } if (first) { writer.Write (prefix); first = false; } else { writer.Write (attPrefix); } if (isLiteral) { writer.Write (stringValue ?? value); } else { WriteTo (writer, stringValue ?? value); } wroteSomething = true; } if (wroteSomething) { writer.Write (suffix); } } // This method is REQUIRED. The generated Razor subclass will override it with the generated code. // ///Executes the template, writing output to the Write and WriteLiteral methods.. ///Not intended to be called directly. Call the Generate method instead. public abstract void Execute (); } } #pragma warning restore 1591