Ejemplo n.º 1
0
        void EmbedTable()
        {
            EmbedTableCommand = new CommandBase((parameter, command) =>
            {
                Window.TableData = Window.Interop.GetJsonTableData();

                var parser = new TableParserHtml();

                if (Window.TableMode == "Grid Table")
                {
                    Window.TableHtml = parser.ToGridTableMarkdown(Window.TableData);
                }
                else if (Window.TableMode == "HTML Table")
                {
                    Window.TableHtml = parser.ToTableHtml(Window.TableData);
                }
                else
                {
                    Window.TableHtml = parser.ToPipeTableMarkdown(Window.TableData);
                }


                mmApp.Model.ActiveEditor.SetSelectionAndFocus(Window.TableHtml);
                Window.Close();
            }, (p, c) => true);
        }
Ejemplo n.º 2
0
        public void DataToHtmlTableMultiLineTest()
        {
            var data = GetTableMultiLineData();

            var    parser = new TableParserHtml();
            string html   = parser.ToTableHtml(data);

            Console.WriteLine(html);

            Assert.IsTrue(html.Contains("<td style=\"text-align: center\">Row 7 Column 2</td>"));
        }