MarkdownPanel

버전 2.2.0 (99.9 KB) 작성자: Jonathan Suever
Control which displays markdown as HTML within a MATLAB control
다운로드 수: 255
업데이트 날짜: 2024/6/25

MATLAB FEX Minimum Version

MarkdownPanel

Control which displays markdown as HTML within a MATLAB control


This control utilizes the Showdown javascript library to convert markdown into HTML and then uses MATLAB's own uihtml component to display the resulting HTML.

It behaves like any other graphics object within MATLAB in that all properties can either be set upon object construction

h = MarkdownPanel('Parent', uifigure(), 'Content', '# Hello World!');

Or after object creation using the returned handle

h = MarkdownPanel();
h.Parent = uifigure();
set(h, 'Position', [0, 0, 0.5, 0.5])

To set the actual Markdown content, use the Content property. You can provide either a string, or a cell array of strings which will automatically create a multi-line entry

set(h, 'Content', '#Hello World')
set(h, 'Content', {'#Hello World', 'This is a test...'})

You can use the Options property to modify options that are specific to how Showdown renders the markdown. By default, we use all of the default settings except that we enable support for tables.

h.Options.tables = true;

The Options property is simply a struct where the fieldnames are the option names and the value is the option value. You can modify this struct to adjust an option.

% Enable support for tasklists
h.Options.taskslists = true

A complete list of options can be found in the Showdown documentation


Usage

panel = MarkdownPanel();

Outputs

panel, Graphics Object, The graphics handle that can be used to manipulate the appearance of the control


Demo

A demo application has been bundled with this code to show how to use some of the features. To run this demo, simply type the following into the MATLAB console.

MarkdownPanel.demo()

Markdown Demo Application


Attribution

Copyright (c) <2024> Jonathan Suever.
All rights reserved

This software is licensed under the BSD license

인용 양식

Jonathan Suever (2024). MarkdownPanel (https://github.com/suever/MarkdownPanel/releases/tag/v2.2.0), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2024a
R2019b 이상 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Toolbox Distribution에 대해 자세히 알아보기
태그 태그 추가

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
2.2.0

See release notes for this release on GitHub: https://github.com/suever/MarkdownPanel/releases/tag/v2.2.0

2.1.0

See release notes for this release on GitHub: https://github.com/suever/MarkdownPanel/releases/tag/v2.1.0

2.0.0

* Updated to work on MATLAB R2021+
* Utilizes uihtml which requires a uifigure
* Updates Showdown JS to v2.1.0

1.0.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.