Giter Club home page Giter Club logo

widget-drawio's Introduction


GitHub release (latest by date including pre-releases) GitHub Release Date GitHub License GitHub last commit GitHub repo size hits GitHub all releases


简体中文 | English


widget-drawio

A draw.io widget for Siyuan Notes.

PREVIEW

preview

FUNCTION

To use the widget in your browser, please visit http(s)://host:port/widgets/drawio/?id=<widget block ID>.

For other URL parameters, please refer to Supported URL parameters.

  • Load and save.
    • The resource files set in the block attributes custom-data-assets and data-assets are automatically loaded on load.
    • Use File -> Save Ctrl + S or Save As Ctrl + Shift + S -> SiYuan Note to save the resource file to the resource folder data/assets.
      • The currently supported save formats are *.drawio, *.png, *.svg, *.html, all of which can be loaded and edited again.
        • *.svg files can be inserted to other locations in the notebook using Insert image link or Insert IFrame link, and can be updated synchronously when the source files change.
        • *.png files can be inserted to other locations in the notebook using Insert image link or Insert IFrame link, and can be updated synchronously when the source files change.
        • *.html files can be inserted to other locations in the notebook using Insert IFrame link, and can be updated synchronously when the source files change.
      • Resource file reference URL are updated to the block attributes custom-data-assets when saved.
      • The Save/Save As action creates a new file when the file name is changed, and the Save/Save As action updates the current file when the file name is not changed.
  • Other custom block attributes
    • Presentation mode.
      • Set custom block attribute lightbox: 1
      • The mode can only be viewed and cannot be edited.
      • After you delete the attribute or change the value of the property to a different value, you can exit the mode by refreshing.
    • Theme mode
      • Set custom block attribute dark: 0 | 1 | auto.
      • The default is the last used theme mode.
    • Theme
      • Set custom block attribute ui: kennedy | min | atlas | dark | sketch | simple.
      • The default is the last used theme.
  • The Open in New Tab feature needs to be used in conjunction with the plugin Web Page View (webview)

START

The widget has been put on the shelves at SiYuan community bazaar and can be installed directly in the Bazaar.

REFERENCE & THANKS

Author Project License
JGraph jgraph/drawio Apache-2.0 License

ps: Sort in no particular order.

CHANGE LOG

CHANGELOG.md

widget-drawio's People

Contributors

zuoqiu-yingyi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

widget-drawio's Issues

建议将编辑好的文件显示为SVG

希望能在资源文件夹里面单独建一个文件夹保存drawio文件,然后在文档里面的drawio文件调整为svg显示,不要显示源文件,那么些UI全部还在,图像也不方便居中

插入挂件-可以自动弹出新建对话框吗

插入挂件都是要插入一个流程图,一定要新建,目前需要自己从菜单找到新建,是否可以自动弹出新建流程图的弹框?插入挂件后自动弹出如下框:
image

重命名 ctrl+s 保存思源 旧名流程图仍然存在

步骤:
1.新建默认名流程图
2.简单改动,保存到思源
3.ctrl+s 呼出保存面板改名并保存(保留id)
4.打开assets路径确认流程图资源,出现新名称流程图存档资源,旧名称流程图存档资源未被删除

求助思源笔记灯箱模式预览大小

image
思源笔记中drawio的灯箱模式,里面的流程图大小每次观看需要调整到填充大小,文档一刷新就变得很小了,每次都需要调整。能不能我调整一次这个大小,下一次就不用调整了!作者大大

又出现无法和思源关联的情况了 #14

edge100,无论是新建还是编辑历史的,都无法与思源关联了,没有思源的选项。
image

  1. 使用无痕模式
  2. 清除cookie或者localstoragy
  3. 换chrome
    以上尝试均无效

资源文件误删,向前兼容

两个问题

  1. 保存的drawio资源文件会,无论是否被引用,都会被被思源笔记误杀(设置-资源-未引用资源)
  2. 不能兼容之前的格式:之前群里有一个drawio的版本,当时是吧文件保存为字符,类似于下面这种格式,但是在你这个新的版本中无法兼容(渲染)之前的数据
<iframe frameborder="0" style="width: 938px; height: 444px;" src="widgets/drawio/?highlight=0000ff&amp;edit=_blank&amp;layers=1&amp;nav=1#RzZVRk5owEIB%2FTR7thIQiPlpUnGk7tuPM1bu3GLaQCoQLoej9%2BgYJIuM55WauM31xki%2Frsvl2RUSD7BgqViRfZQQpIjg6IrpAhPjezHw24NQC6jotiJWIWoR7sBUv0EKno5WIoLSsRVrKVItiCLnMc%2BB6wJhSsh6G%2FZRpNAAFi2FQRgO2nKVwE%2FZ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GB5xNRhY9II3djAH%2FDHISRn6ryPeeoOzVNCb82TfzSr3ybbMHcnSs3ZfB9oZ%2BEy%2FIr450rwAyi0nCJ%2FhnwfLT00C9A8uNuRQkkOZTmiKXd6cEfjK7JHmyX%2BSLPe282abf9ePp9d%2FbnR5R8%3D"></iframe>

更新挂件后打不开了

更新了挂件版本,然后卡这个界面
image
尝试使用url/widgets/drawio/?id=...访问也一样,查看网页报了如下错误
image

使用的是思源笔记3.0.1docker版,重启docker无效,重装挂件无效

新建流程图 无法保存到设备,即使读取后修改也无法自动、手动保存

image_247

保存出错步骤:
1.文件->新建流程图
2.随便添加元素->点击保存->到设备
3.保存出错。

读取出错步骤
1.文件->从...打开->设备->打开drawio蓝图存档
2.读取出错

另外还有一点就是 流程图存档文件默认保存到到工作空间下思源所有笔记公共的assets里的,但是每个思源笔记其实是可以自建assets的,希望当存在自建assets文件夹存在时自动保存到自建assets资源文件夹下,与思源逻辑保持一致性。

draw预览问题

大佬 后续有出预览模式和编辑模式的区分的计划吗?现在只有编辑模式总会在浏览的场景误触

不显示形状

image

以前可以使用,重新更新插件后就这样了,删除插件重下也是这样

建议更改为新插件形式

drawio采用挂件形式直接嵌入文档页面中不太方便,要拖大框体,还有相关的菜单栏,看图很不方便,建议改成新插件的方式,类似于excalidraw插件,可以独立创建绘图和导出绘图,如下图:
iShot_2023-09-09_21 45 04

保存时提示: The request is not allowed by the user agent or the platform in the current context.

你好,感谢作者移植这个插件.

我在笔记文档中插入该这个挂件,然后打开了一个drawio.svg文件后, 编辑后再次保存报了如下错误, svg文件保存在工作空间data/assets 目录下的, 请问这时什么原因导致的呢

The request is not allowed by the user agent or the platform in the current context.

image

我是用的是思源社区版本v2.11.4, win10
https://github.com/siyuan-community/siyuan/releases/tag/v2.11.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.