예제 #1
0
        public Document(
            IEnumerable <BlockSyntax> blockSyntaxes   = null,
            IEnumerable <InlineSyntax> inlineSyntaxes = null,
            ExtensionSet extensionSet  = null,
            Resolver linkResolver      = null,
            Resolver imageLinkResolver = null,
            bool encodeHtml            = true)
        {
            this.linkResolver      = linkResolver;
            this.imageLinkResolver = imageLinkResolver;
            this.extensionSet      = extensionSet ?? ExtensionSet.commonMark;
            this.encodeHtml        = encodeHtml;

            this._blockSyntaxes.AddRange(blockSyntaxes ?? new List <BlockSyntax>());
            this._blockSyntaxes.AddRange(this.extensionSet.blockSyntaxes);

            this._inlineSyntaxes.AddRange(inlineSyntaxes ?? new List <InlineSyntax>());
            this._inlineSyntaxes.AddRange(this.extensionSet.inlineSyntaxes);
        }
예제 #2
0
 public CustomMarkdown(
     Key key         = null,
     string data     = null,
     bool selectable = false,
     MarkdownStyleSheet markdownStyleSheet = null,
     SyntaxHighlighter syntaxHighlighter   = null,
     MarkdownTapLinkCallback onTapLink     = null,
     string imageDirectory                   = null,
     ExtensionSet extensionSet               = null,
     MarkdownImageBuilder imageBuilder       = null,
     MarkdownCheckboxBuilder checkboxBuilder = null,
     ScrollPhysics physics                   = null,
     bool shrinkWrap                     = false,
     Widget contentHead                  = null,
     Widget relatedArticles              = null,
     List <Widget> commentList           = null,
     RefreshController refreshController = null,
     bool enablePullDown                 = false,
     bool enablePullUp                   = false,
     OnRefresh onRefresh                 = null,
     NotificationListenerCallback <ScrollNotification> onNotification = null,
     float initialOffset = 0f,
     bool needRebuildWithCachedCommentPosition = false,
     bool isArticleJumpToCommentStateActive    = false
     ) : base(key, data, markdownStyleSheet, syntaxHighlighter,
              onTapLink, imageDirectory, extensionSet, imageBuilder, checkboxBuilder, selectable)
 {
     this.padding           = EdgeInsets.all(16);
     this.physics           = physics;
     this.shrinkWrap        = shrinkWrap;
     this.contentHead       = contentHead;
     this.relatedArticles   = relatedArticles;
     this.commentList       = commentList;
     this.refreshController = refreshController;
     this.enablePullDown    = enablePullDown;
     this.enablePullUp      = enablePullUp;
     this.onRefresh         = onRefresh;
     this.onNotification    = onNotification;
     this.initialOffset     = initialOffset;
     this.needRebuildWithCachedCommentPosition = needRebuildWithCachedCommentPosition;
     this.isArticleJumpToCommentStateActive    = isArticleJumpToCommentStateActive;
 }
예제 #3
0
 public Markdown(
     Key key         = null,
     string data     = null,
     bool selectable = false,
     MarkdownStyleSheet markdownStyleSheet = null,
     SyntaxHighlighter syntaxHighlighter   = null,
     MarkdownTapLinkCallback onTapLink     = null,
     string imageDirectory                   = null,
     ExtensionSet extensionSet               = null,
     MarkdownImageBuilder imageBuilder       = null,
     MarkdownCheckboxBuilder checkboxBuilder = null,
     ScrollPhysics physics                   = null,
     bool shrinkWrap = false
     ) : base(key, data, markdownStyleSheet, syntaxHighlighter,
              onTapLink, imageDirectory, extensionSet, imageBuilder, checkboxBuilder, selectable)
 {
     this.padding    = EdgeInsets.all(16);
     this.physics    = physics;
     this.shrinkWrap = shrinkWrap;
 }