コード例 #1
0
        public void HighlightRangeTest()
        {
            tinyMCE.Write(
                "Testing 1 2 3" + Keys.Enter +
                "Testing 4 5 6" + Keys.Enter +
                "Testing 7 8 9" + Keys.Enter +
                "Testing 10 11 12" + Keys.Enter);

            tinyMCE.HightlightRange(new Point(2, 0), new Point(5, 1));
        }
コード例 #2
0
        public void GetItemByText()
        {
            var beforeCut = "Testing 1 2 3" + Keys.Enter;

            tinyMCE.Write(beforeCut);
            tinyMCE.HightlightRange(new Point(7, 0), new Point(12, 0));
            menu.GetItemByText("Edit")
            .ConvertTo <DropDownMenuItemComponent>()
            .SelectOption("Cut")
            .AsElement()
            .Click();

            // Highlight all text.
            tinyMCE.HighlightAllText();
            var afterCut = tinyMCE.GetHighlightedText();

            Assert.AreNotEqual(afterCut, beforeCut);
        }