{{/* Template Attributes: * CustomInit: do not initialize the editor automatically * ContainerId: id attribute for the container element * ContainerClasses: additional classes for the container element * MarkdownPreviewInRepo: the repo to preview markdown * MarkdownPreviewContext: preview context (the related url path when rendering) for the preview tab, eg: repo link or user home link * MarkdownPreviewMode: content mode for the editor, eg: wiki, comment or default * TextareaName: name attribute for the textarea * TextareaContent: content for the textarea * TextareaMaxLength: maxlength attribute for the textarea * TextareaPlaceholder: placeholder attribute for the textarea * TextareaAriaLabel: aria-label attribute for the textarea * DropzoneParentContainer: container for file upload (leave it empty if no upload) * DisableAutosize: whether to disable automatic height resizing */}} {{$ariaLabel := or .TextareaAriaLabel .TextareaPlaceholder}} {{$repo := .MarkdownPreviewInRepo}} {{$previewContext := .MarkdownPreviewContext}} {{$previewMode := .MarkdownPreviewMode}} {{$previewUrl := print AppSubUrl "/-/markup"}} {{if $repo}} {{$previewUrl = print $repo.Link "/markup"}} {{end}} {{$supportEasyMDE := or (eq $previewMode "comment") (eq $previewMode "wiki")}}