SVGEdit——SVG在线编辑器

SVGEdit是一个基于Web的JavaScriptSVG编辑器,支持在任何现代浏览器中运行。用户可以通过NPM安装和构建项目,本地启动后通过浏览器访问。文章提供了集成到Web应用的示例代码,包括引入CSS、创建编辑器容器以及初始化和配置编辑器的步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

资料

git地址:

GitHub - frangoteam/svgedit: Powerful SVG-Editor for your browser

视频搬运:

Introduction to SVG-edit(2.2)_哔哩哔哩_bilibili

demo示例:

SVG-edit

简介

SVGEdit 是一个快速的,基于Web的,JS实现的,SVG画图编辑器,可工作于任何现代浏览器。SVGEdit基于强大的SVG画布库@svgedit/svgcanvas。

当前版本为V7.

本地安装步骤:

集成到web应用

<html><head>
   <!-- You need to include the CSS for SVGEdit somewhere in your application -->
  <link href="./svgedit.css" rel="stylesheet" media="all"></link>
</head>

<body>
  <!-- svgedit container can be positionned anywhere in the DOM
       but it must have a width and a height -->
  <div id="container" style="width:100%;height:100vh"></div>
</body>
<script type="module">
  /* You need to call the Editor and load it in the <div> */
  import Editor from './Editor.js'
  /* for available options see the file `docs/tutorials/ConfigOptions.md */
  const svgEditor = new Editor(document.getElementById('container'))
  /* initialize the Editor */
  svgEditor.init()
  /* set the configuration */
  svgEditor.setConfig({
          allowInitialUserOverride: true,
          extensions: [],
          noDefaultExtensions: false,
          userExtensions: []
  })
</script>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值