hufe921 / canvas-editor Goto Github PK
View Code? Open in Web Editor NEWrich text editor by canvas/svg
Home Page: https://hufe.club/canvas-editor
License: MIT License
rich text editor by canvas/svg
Home Page: https://hufe.club/canvas-editor
License: MIT License
0.9.28
No response
复制一个有服务端跨域限制图片,然后执行打印
打印报错:Draw.ts:523 Uncaught (in promise) DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
能正常打印
No response
No response
对于富文本编辑器一个很好的实践,同时,完成度也很高,非常感谢开源。
原因是想增加vue、react的示例的时候,发现核心代码editor和示例是揉在一起的,如果使用monorepo管理,可以更好的组织代码。当然,可能您这样做,有自己的考量
您是否会对这样的pr感兴趣?还是说目前的重心主要是项目的稳定,架构方面不会做较大的修改?
0.9.29
No response
初始化的时候,设置defaultTrMinHeight,表格行高没有变化,但是设置defaultRowMargin的时候,表格行高会跟着变化。
defaultRowMargin对文字的行高起作用;defaultTrMinHeight对表格的最小行高起作用。
初始化的时候,设置defaultTrMinHeight,表格行高没有变化,但是设置defaultRowMargin的时候,表格行高会跟着变化。
No response
No response
现在有个新项目,我想使用这个编辑器
0.9.27
No response
1、表格在文档最前面的时候,表格前面有一行空行,不能删除;见图
2、表格高度,目前 可以随着文字增加而变高,但是 不能随着文字的减少而缩减;
1、表格在文档最前面的时候,希望不要有空行,就算有空行希望可以删除;
2、表格行高可以随文字内容动态变化;
1、表格在文档最前面的时候,表格前面有一行空行,不能删除;见图
2、表格高度,目前 可以随着文字增加而变高,但是 不能随着文字的减少而缩减;
No response
No response
建议后续添加保存和导入功能,现在看来写作都是一次性的。
none
0.9.31
No response
Open the context menu and select the paste option.
Paste option in context menu works normally.
Exception occurs: Uncaught (in promise) TypeError: navigator.clipboard.readText is not a function.
As shown in the previous image.
System: Windows 11
Browser: Firefox 111.0.1
No response
首先先膜拜一下大佬,感谢感谢。
最近也在看富文本的几个技术方向,放弃了slate.js,正好看到这个项目,很棒。
不知最近有没有目录功能的计划,简单看了下代码应该挺麻烦的。
我也尝试一下,争取提pr
目录功能可能涉及:
0.9.31
No response
Should fit the paper size correctly.
https://drive.google.com/file/d/1fiLr6gDKh3Qc-K2JP2SR_TD6ajcrhJl0/view?usp=sharing
System:
OS: macOS 13.3.1
CPU: (10) arm64 Apple M1 Max
Memory: 193.17 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.16.0 - /usr/local/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.1.2 - /opt/homebrew/bin/npm
Browsers:
Chrome: 112.0.5615.137
Edge: 112.0.1722.58
Firefox: 112.0.1
Safari: 16.4
Is it possible to modify it this way?
public setPaperSize(width: number, height: number) {
const dpr = window.devicePixelRatio
this.options.width = width
this.options.height = height
this.container.style.width = `${this.getWidth()}px`
this.pageList.forEach((p, i) => {
p.width = this.getWidth() * dpr // replace width with this.getWidth()
p.height = this.getHeight() * dpr // replace height with this.getHeight()
p.style.width = `${this.getWidth() }px`
p.style.height = `${this.getHeight() }px`
this._initPageContext(this.ctxList[i])
})
this.render({
isSubmitHistory: false,
isSetCursor: false
})
}
Great project.
Is there a license for this project? For example, MIT, Apache, etc. If there is, could you please add the license information to the project.
Thank you
能给个联系方式吗,我觉得你编辑器的风格很适合我们的需求,能不能交流下。
0.9.23
No response
1、表格内文字现在不能垂直居中
2、纵向合并单元格后,在合并单元格内点击回车,第一行会跟着增高
3、表格整体没有复制功能
希望作者可以解决帮忙解决上述问题
1、表格内文字现在不能垂直居中
2、纵向合并单元格后,在合并单元格内点击回车,第一行会跟着增高
3、表格整体没有复制功能
No response
No response
0.9.23
No response
defaultTdHeight配置项没有起作用
defaultTdHeight配置项起作用
defaultTdHeight配置项没有起作用
No response
No response
输入emoji表情如:😀 或生僻字录入后无法正常显示或编辑
Hi, I saw that the page number setting options were improved which looks great.
I would like to suggest the implementation of some more configuration possibilities, which can make the editor more robust and flexible, are the following:
The last two suggestions could also be applied to setting up the header/footer. From which page the header/footer can be displayed, or which pages the header/footer will NOT be displayed.
I imagine these settings could be defined in the editor's configuration, in the 'pageNumber' property, and applied when the editor is rendering the pages.
I don't know if it's easy to implement, and if you're interested in these proposals. I believe that the editor will meet the most diverse scenarios with these additional settings.
Again congratulations on the project. Hugs.
通过自由选择控制渲染配置,能产生自由的布局与更大的应用场景。
此前,我一直在寻找一款可自由控制光标和虚拟键盘弹出(移动端)的富文本编辑器、我使用了contentEditable来实现但效果不是很好(受到输入法实现的影响)。
当前我希望让这个库允许初始化时关闭header、footer及pageNumber等独特场景下的渲染,以便实现纯编辑器的效果,对此:
当然渐进地全部实现貌似是更好的选择,只是我还不清楚其中有哪些期望的功能会带来更多的问题。我相信这对于扩展应该是有帮助的,分块布局或许能带来更好的规划?例如想要实现导航目录和文档备注仅需要将其填充到一个横向布局的块内元素,至于其是否作为独立插件以及如何进行数据交互则是细节实现了。
v0.9.27
No response
1、拖动表格最后一列向左移动
2、向左拖动到目标位置后停止向左拖动
3、再次向右拖动到目标位置后,停止拖动
4、向右拖动到目标位置放下后表格位置未发生变化(期望位置在最后拖动位置)
表格最后一列应该在步骤3的位置
表格最后一列的位置还原了(步骤2),未发生位置变化
No response
No response
被这个编辑器惊艳到了。做的很棒。想知道能实现想钉钉文档里的编辑器效果吗?
你好,可以直接导入个svg文件吗,然后在上面做一些编辑?
你好,可以直接导入个svg文件吗,然后在上面做一些编辑?
是否有导出word的方法?
有在文档末尾追加文字的API吗?
这个编辑器非常棒,已star,有没有相关的文档,例如前后端的配置等等。谢谢!
main
No response
现象:打印出来的字体显示效果是模糊的
调优:手动在打印时,调高canvas的scale缩放比例,可以提高清晰度,但是太高了会导致空白,稍微调高一些也只是改善而没有彻底解决。
类似Office或者腾讯在线文档,打印出来的字笔画是清晰正常的。
看起来可能时toDataUrl时生成图片的清晰度问题,不知道有没有什么更好的解决方案。
打印字体模糊
No response
No response
Error when selecting all table rows
No response
With the mouse select all the lines of the table, as exemplified in the video below.
That the error is not thrown: Uncaught TypeError: R is undefined.
After selecting all rows in the table, releasing the mouse button throws an exception.
System: Windows 11
Browsers: Firefox 111.0.1; Edge 112.0.1722.39; Chrome 111.0.5563.147.
No response
你好,使用过程中,发现表格分页功能还不是很完善,例如跨页的表格在修改列宽的时候,不能够同步,请问有计划什么时候完善表格的分页功能吗?
另外:能否加个qq交流一下,我的是838472035。
HI 兄弟,方便留个邮箱或者微信吗?想交流一下
页眉页脚内容编辑功能,有没有计划?
有没有实现的思路?
方便留个邮箱或者微信吗?想交流一下
fontsize现在只能executeSizeAdd和executeSizeMinus去增加或减小,能直接设置多少像素吗?
希望支持续打功能
希望支持续打功能
目前打印输出的是图片,有没有计划实现非图片打印方式
0.9.23
No response
只有数据获取接口,没有数据回写接口
希望作者大神能够提供
只有数据获取接口,没有数据回写接口
No response
No response
0.9.23
No response
在mac系统使用搜狗输入法输入中文
没有文字候选框出现,或定位错误
应该显示文字候选框并正确定位
macos
No response
main
https://hufe.club/canvas-editor/
打开的功能菜单能在失焦的时候能自动关闭
弹出的功能菜单如果不再次点击相应图标会一直显示
No response
No response
main
https://hufe.club/canvas-editor/
如上图,高亮设置的文本显示其正确的背景样式
No response
No response
Hi, it's a fantastic project!
It would be great if you add some contribution guidelines or some roadmap with the priorities to start to get more contributions.
我的作品如下,欢迎技术交流
http://hcview.cn/demo/HCEmrViewLib/index.html
Hi, I noticed the implementation of selection using Shift key. But when testing I realized that if you invert the direction key, the selection does not work in the normal way, which should 'clear" a character.
What happens is that the selection continues to be added, but from the reverse side. An example image follows.
Reinforcing that you are doing an excellent job, hugs.
表格的边框线能否有方法可以隐藏呢?
表格的边框线能否有方法可以隐藏呢?
首先,你太优秀了。做到了我想做但是做不到的事情,感谢你的贡献,好想请你喝☕️...
期待以下功能实现,不知你这边是否有兴趣纳入到你的next features。
我不知道这些功能该如何实现,以及您是否对这些内容感兴趣。
期待你的反馈,再次感谢你的贡献。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.