New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vcmt

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vcmt

Full-featured comment system

  • 1.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
decreased by-64.71%
Maintainers
1
Weekly downloads
 
Created
Source

💡 简介

vcomment 🧵 B3log 分布式社区的评论组件,欢迎加入下一代社区网络。

🛠️ 使用文档

CommonJS

  • 安装依赖
npm install vcmt --save
  • 在代码中引入并初始化对象,可参考 index.js
import Vcomment from '../src/index'

const vcomment = new Vcomment({
  id: 'comments',
  postId: '1353745196751',
  userName: 'vanessa',
  url: 'http://localhost:8080',
  currentPage: 3,
  vditor: {
    hljsEnable: false,
    hljsStyle: "github"
  }
})

vcomment.render()

HTML script

<!-- <script src="https://cdn.jsdelivr.net/npm/vcmt@1.3.1/dist/index.min.js" defer></script> -->
<script src="https://unpkg.com/vcmt@1.3.1/dist/index.min.js" defer></script>

示例代码

API

options
说明默认值
id渲染元素的 id-
postId文章 id-
userName用户名-
url评论 API 地址"https://ld246.com"
currentPage评论页码1
error获取列表错误回调-
vditor编辑器参数-
vditor.hljsEnable是否启用高亮true
vditor.hljsStyle高亮样式"github"
vditor.emoji自定义表情 { [key: string]: string }{}
vditor.lang语言'zh_CN'
methods
说明
render渲染评论
parseMarkdown(vditorOptions: IOptionsVditor)Markdown 渲染
lazyLoadImage图片延迟加载

欢迎关注 B3log 开源社区微信公众号 B3log开源

image-d3c00d78

Keywords

FAQs

Package last updated on 14 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc