示例#1
0
        public IContentEditor CreateEditorFromMoniker(IContentEditorSite contentEditorSite, IInternetSecurityManager internetSecurityManager, IMoniker moniker, uint codepage, HtmlInsertOptions options, string color, int dlControlFlags, string wpost)
        {
            codepage = EmailShim.GetCodepage(codepage);
            string name;
            string html = HTMLDocumentHelper.MonikerToString(moniker, codepage, out name);

            if (CultureHelper.IsRtlCodepage(codepage))
            {
                EmailContentTarget target =
                    GlobalEditorOptions.ContentTarget as EmailContentTarget;
                if (target != null)
                {
                    target.EnableRtlMode();
                }
            }

            if (string.IsNullOrEmpty(html))
            {
                html = "<html><body></body></html>";
            }

            html = EmailShim.GetContentHtml(name, html);

            // Create a IHtmlDocument2 from the html which will then be loaded into the editor
            IHTMLDocument2 htmlDocument;

            htmlDocument = HTMLDocumentHelper.StringToHTMLDoc(html, name);

            return(new ContentEditorProxy(this, contentEditorSite, internetSecurityManager, htmlDocument, options, dlControlFlags, color, wpost));
        }
示例#2
0
 public void SetSpellingOptions(string bcp47Code, uint sobitOptions, bool useAutoCorrect)
 {
     if (CultureHelper.IsRtlCulture(bcp47Code))
     {
         EmailContentTarget target =
             GlobalEditorOptions.ContentTarget as EmailContentTarget;
         if (target != null)
         {
             target.EnableRtlMode();
         }
     }
 }
示例#3
0
 public void SetSpellingOptions(string dllName, ushort lcid, string[] mainLexFiles, string userLexFile, uint sobitOptions, bool useAutoCorrect)
 {
     _spellingState = new SpellingOptionState(
         dllName, lcid, mainLexFiles, userLexFile, sobitOptions, useAutoCorrect);
     _spellingState.Apply(contentEditor, factory.GlobalSpellingOptions);
     if (CultureHelper.IsRtlLcid(lcid))
     {
         EmailContentTarget target =
             GlobalEditorOptions.ContentTarget as EmailContentTarget;
         if (target != null)
         {
             target.EnableRtlMode();
         }
     }
 }