umodoc / editor

Umo Editor is an open-source document editor, based on Vue3 and Tiptap. Umo Editor 是一个基于 Vue3 和 Tiptap 的适合于国人使用的本土化开源文档编辑器。
https://editor.umodoc.com/en/docs
MIT License
171 stars 30 forks source link

[功能建议]: 当通过html进行文档内容回显,如果html内容包含很多图片资源加载。能否实现懒加载。目前文档内容中图片很多的时候,页面渲染很慢 #14

Closed shenghui-shan closed 1 month ago

shenghui-shan commented 2 months ago

你的功能建议是否和某个问题相关?

当通过html进行文档内容回显,如果html内容包含很多图片资源加载。能否实现懒加载。

你希望看到什么解决方案?

1、资源使用懒加载方式

你考虑过哪些替代方案?

No response

你有其他上下文或截图吗?

No response

其他说明

No response

意向参与贡献

umodoc commented 2 months ago

@shenghui-shan 感谢您的建议,我们会考虑添加该功能。

shenghui-shan commented 2 months ago

你们准备哪个版本添加呢? 大概多久开发时间? 可以的话我能否参与下?

shenghui-shan commented 2 months ago

const content= new Array(5000).fill( "

地保标识的制作、安装采用集团最新发布的保护标识设置指南(试行)

" );

editorRef.value.setContent(content);

页面渲染会很卡,编辑时候也很卡

umodoc commented 2 months ago

你们准备哪个版本添加呢? 大概多久开发时间? 可以的话我能否参与下?

@shenghui-shan 暂时还没有明确的时间节点,欢迎贡献代码

umodoc commented 2 months ago

const content= new Array(5000).fill( "

地保标识的制作、安装采用集团最新发布的保护标识设置指南(试行)

" );

editorRef.value.setContent(content);

页面渲染会很卡,编辑时候也很卡

@shenghui-shan 我们会持续不断的优化性能的。

shenghui-shan commented 2 months ago

const content= <img type="image/jpeg" src="https://picsum.photos/200/300" width="553" height="293" left="0" top="0" draggable="false" rotatable="false" equalproportion="true" flipx="false" flipy="false" uploaded="true" error="false"/> 111 22 editorRef.value.setContent(content); 为什么这种html的数据,图片没有渲染出来? @umodoc

而且控制台报警告 ### [Vue warn]: Extraneous non-props attributes (attach) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. at <TImageViewer modelValue=false onUpdate:modelValue=fn images= [] ... > at at <TConfigProvider global-config=

umodoc commented 2 months ago

@shenghui-shan 控制台警告是v2.1.0版本引入的一个bug,下一版本会修复,请尽量使用规范的html

shenghui-shan commented 2 months ago

content.value = <img src="http://xx:9000/9c6c0415/bg1.jpg">; 这种是可以正常显示, 但img标签如添加闭合标签,如 <img src="http://xx:9000/9c6c0415/bg1.jpg" /> 就不会显示了

shenghui-shan commented 2 months ago

问题: 为什么设置完html内容后,编辑器的滚动条会默认滚动到最下面?怎么禁用这个功能呢?

umodoc commented 2 months ago

问题: 为什么设置完html内容后,编辑器的滚动条会默认滚动到最下面?怎么禁用这个功能呢?

@shenghui-shan 见:https://github.com/umodoc/editor/discussions/15

umodoc commented 2 months ago

content.value = <img src="http://xx:9000/9c6c0415/bg1.jpg">; 这种是可以正常显示, 但img标签如添加闭合标签,如 <img src="http://xx:9000/9c6c0415/bg1.jpg" /> 就不会显示了

@shenghui-shan 这个是tiptap关于非闭合标签的一个解析的问题,但目前我们一时找不到对应的issue和相关的文档。

shenghui-shan commented 2 months ago

readonly 为true的时候 ,目录大纲跳转定位失效 @umodoc

umodoc commented 1 month ago

@shenghui-shan 控制台警告是v2.1.0版本引入的一个bug,下一版本会修复,请尽量使用规范的html

@shenghui-shan v2.2.0版本已经修复该问题

umodoc commented 1 month ago

readonly 为true的时候 ,目录大纲跳转定位失效 @umodoc

@shenghui-shan v2.2.0版本已经修复该问题