自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

前端:開源免費(fèi)的瀏覽器端Markdown編輯器——Vditor上手體驗(yàn)

系統(tǒng) 瀏覽器
Vditor是一款專業(yè)的瀏覽器端Markdown編輯器,其支持所見即所得、即時(shí)渲染以及分屏預(yù)覽模式,類似于Typora。Vditor采用TypeScript實(shí)現(xiàn),可支持原生JavaScript、Vue、React和Angular等多種框架。

一、編輯器簡介

圖片

Vditor是一款專業(yè)的瀏覽器端Markdown編輯器,其支持所見即所得、即時(shí)渲染以及分屏預(yù)覽模式,類似于Typora。Vditor采用TypeScript實(shí)現(xiàn),可支持原生JavaScript、Vue、React和Angular等多種框架。此外,Vditor提供桌面版,支持Windows、Linux、MacOS,同時(shí)也支持瀏覽器擴(kuò)展、安卓和iOS版本。無論是在哪個(gè)平臺(tái)上使用,Vditor都能夠提供高效、優(yōu)質(zhì)的Markdown編輯體驗(yàn)。

官網(wǎng):https://b3log.org/vditor/

GitHub:https://github.com/Vanessa219/vditor

桌面版下載:https://b3log.org/siyuan/download.html

二、功能特性

圖片

圖片

三、編輯器模式初始化設(shè)定

2.1 所見即所得模式

即所得模式對(duì)不熟悉 Markdown 的用戶較為友好,熟悉 Markdown 的話也可以無縫使用。

new Vditor('vditor', {
  "height": 360,
  "cache": {
    "enable": false
  },
  "value": "## 所見即所得(WYSIWYG)\n所見即所得模式對(duì)不熟悉 Markdown 的用戶較為友好,熟悉 Markdown 的話也可以無縫使用。 ",
  "mode": "wysiwyg"
})

圖片

2.2 即時(shí)渲染模式

對(duì)熟悉 Typora 的用戶應(yīng)該不會(huì)感到陌生,理論上這是最優(yōu)雅的 Markdown 編輯方式。

new Vditor('vditor', {
  "height": 360,
  "cache": {
    "enable": false
  },
  "value": "## 即時(shí)渲染(IR)\n即時(shí)渲染模式對(duì)熟悉 Typora 的用戶應(yīng)該不會(huì)感到陌生,理論上這是最優(yōu)雅的 Markdown 編輯方式。",
  "mode": "ir"
})

圖片

2.3 分屏預(yù)覽(SV)

該模式目前沒有發(fā)現(xiàn)具體的使用場(chǎng)景。

new Vditor('vditor', {
  "height": 360,
  "cache": {
    "enable": false
  },
  "value": "## 分屏預(yù)覽(SV)\n傳統(tǒng)的分屏預(yù)覽模式適合大屏下的 Markdown 編輯。",
  "mode": "sv",
  "preview": {
    "mode": "editor"
  }
})

圖片

2.4 分屏預(yù)覽模式

分屏預(yù)覽(SV)\n傳統(tǒng)的分屏預(yù)覽模式適合大屏下的 Markdown 編輯

new Vditor('vditor', {
  "height": 360,
  "cache": {
    "enable": false
  },
  "value": "## 分屏預(yù)覽(SV)\n傳統(tǒng)的分屏預(yù)覽模式適合大屏下的 Markdown 編輯。",
  "mode": "sv",
  "preview": {
    "mode": "both"
  }
})

圖片

四、案例代碼

直接采用最原始的html提供完整的示例代碼,直接可以運(yùn)行。       

<html>
    
    <head>
  <title>vditor編輯器</title>
     <link rel="stylesheet"  />
    <script src="https://unpkg.com/vditor/dist/index.min.js"></script>
    </head>    
    <body>
        <input type="button" onclick="getContent()" value="確定" />
        <div id="content">
        </div>
        <script>
            var vditor = null;
            window.onload = function() {
                vditor = new Vditor(document.getElementById('content'), {
                    cache: {
                        enable: false
                    },
                    "mode": "sv",
                    "preview": {
                        "mode": "both"
                    }
                });


            }
      // 測(cè)試數(shù)據(jù)填充
            function getContent() {


                vditor.setValue("## 測(cè)試 \n ### 二級(jí)標(biāo)題 ");
            }
</script>
    </body>


</html>

圖片

參考資料:https://b3log.org/vditor/

責(zé)任編輯:武曉燕 來源: 小明互聯(lián)網(wǎng)技術(shù)分享社區(qū)
相關(guān)推薦

2020-09-18 06:00:51

開源Markdown編輯器

2017-05-23 19:19:16

開源Markdown編輯器

2023-12-15 09:59:14

開源GIF編輯器圖片格式

2024-02-21 16:40:06

Web代碼編輯器開源

2023-09-10 23:22:33

Zettlr筆記編輯器

2022-01-10 18:16:24

編輯器Typora Markdown

2020-04-09 14:23:44

PythonMarkdown編輯器

2023-12-26 08:01:06

開源視頻編輯器軟件

2011-08-03 17:53:03

注冊(cè)表編輯器

2012-11-14 16:54:28

瀏覽器

2021-11-24 09:12:11

Markdown編輯器Linux

2021-10-27 14:55:57

Mark TextMarkdown編輯器

2016-08-02 10:35:40

LinuxMarkdown編輯器

2021-10-21 10:58:03

Markdown編輯器

2012-05-03 15:30:32

2022-12-02 07:24:46

2021-12-23 10:59:30

開源技術(shù) 軟件

2022-06-13 08:24:45

Typora編輯器

2023-04-17 11:03:52

富文本編輯器MTE

2015-06-17 10:23:06

點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)