wangeditor-team / wangEditor

wangEditor, open-source Web rich text editor 开源 Web 富文本编辑器
http://www.wangeditor.com/
MIT License
17.44k stars 3.31k forks source link

iframe 动态插入wandEditor使用问题 #4549

Closed ITso-easy closed 2 years ago

ITso-easy commented 2 years ago

继之前的问题; 在开始同步引入styel 入下图

image

创建wangEditor的时候 把样式插入进去

image

页面效果展示无没有问题, 功能使用有问题:入下图所示

1658116201593

wangfupeng1988 commented 2 years ago

什么操作导致了这个 bug ?

你的说明复现步骤。

ITso-easy commented 2 years ago

一共两个问题;

第一个问题;复现之前的报错;操作如下图所示

image

第二问题:iframe里面动态插入的 编辑框 操作栏无法使用(未禁用状态)如下图

image

wangfupeng1988 commented 2 years ago

这个场景好麻烦。。。我复现不了哇。

ITso-easy commented 2 years ago

那请问第二个问题请问能复现吗,iframe里面动态插入富文本编辑框,操作栏不能使用的问题

wangfupeng1988 commented 2 years ago

你单独弄一个 demo ,仅去实现“iframe里面动态插入富文本编辑框”这个一个功能(别的功能不管),看能复现吗?

能的话,提交到这里(三选一)

ITso-easy commented 2 years ago

我打开网址是这样的, 但是我不知道在哪里提交;请问应该怎么操作

涅槃重生 @.***

 

------------------ 原始邮件 ------------------ 发件人: "wangeditor-team/wangEditor" @.>; 发送时间: 2022年7月19日(星期二) 上午9:35 @.>; @.**@.>; 主题: Re: [wangeditor-team/wangEditor] iframe 动态插入wandEditor使用问题 (Issue #4549)

你单独弄一个 demo ,仅去实现“iframe里面动态插入富文本编辑框”这个一个功能(别的功能不管),看能复现吗?

能的话,提交到这里(三选一)

https://codesandbox.io/

https://codepen.io/

https://stackblitz.com/

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

wangfupeng1988 commented 2 years ago

你做一个 demo ,提交到 github ,给我链接也可以

ITso-easy commented 2 years ago

我这边网络不太好,github上传不上去。我打了一个压缩包给你。

涅槃重生 @.***

 

------------------ 原始邮件 ------------------ 发件人: "wangeditor-team/wangEditor" @.>; 发送时间: 2022年7月19日(星期二) 上午10:41 @.>; @.**@.>; 主题: Re: [wangeditor-team/wangEditor] iframe 动态插入wandEditor使用问题 (Issue #4549)

你做一个 demo ,提交到 github ,给我链接也可以

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

从QQ邮箱发来的超大附件

test-project.rar (122.0K, 无限期)进入下载页面:http://mail.qq.com/cgi-bin/ftnExs_download?k=71313432972698cba4d7b5224431541b06060c0454030051195706035a1c525602001953560453190d540d0650045f0403500205622166405142401f1243095e5152401c1050143409&t=exs_ftn_download&code=4142b1f4

wangfupeng1988 commented 2 years ago

传到 gitee 或 coding.net 也可以

ITso-easy commented 2 years ago

github 地址 https://github.com/ITso-easy/iframe-wangEditor

涅槃重生 @.***

 

------------------ 原始邮件 ------------------ 发件人: "wangeditor-team/wangEditor" @.>; 发送时间: 2022年7月20日(星期三) 上午8:07 @.>; @.**@.>; 主题: Re: [wangeditor-team/wangEditor] iframe 动态插入wandEditor使用问题 (Issue #4549)

传到 gitee 或 coding.net 也可以

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

wangfupeng1988 commented 2 years ago

通过你的源码来看 https://github.com/ITso-easy/iframe-wangEditor/blob/main/src/components/home.vue

你是把一个 Vue 组件的 DOM 直接塞到了 iframe 中,也就是把生成了编辑器的 DOM 直接塞到了 iframe 中。 这种方法感觉很不合理,没讲过这样用的。

如果用 iframe ,我还是建议通过 src 来加载。例如你先定义一个前端路由 /page/editor ,然后把路由写到 iframe src 中。这样还比较合理。

ITso-easy commented 2 years ago

您好作者,在使用你的wangEditor过程中,用到了插件公式wangEditor-plugin-formula

这个弹框让用户自己输入latex语法, 但是用户一般都不知道格式,请问如何改造次弹框 让它有个初始化的模板格式 用户在使用的时候选一个自己想要的公式模板,然后输入值就可以了; 如下图所示这样

非常感谢作者。提供帮助

涅槃重生 @.***

 

------------------ 原始邮件 ------------------ 发件人: "wangeditor-team/wangEditor" @.>; 发送时间: 2022年7月27日(星期三) 中午1:27 @.>; @.**@.>; 主题: Re: [wangeditor-team/wangEditor] iframe 动态插入wandEditor使用问题 (Issue #4549)

Closed #4549 as completed.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

wangfupeng1988 commented 2 years ago

@ITso-easy 看这里 https://github.com/wangeditor-team/wangEditor/issues/4799

ITso-easy commented 1 year ago

可是我的业务是这样的,后台返回一个iframe页面的src地址,内容很多,有表单、有表格之类的。前端是通过动态js修改某几个指定的DOM元素,替换成wangEditor。 所以你说的这种方案好像不太适合他,请问有别的替代方案吗

涅槃重生 @.***

 

------------------ 原始邮件 ------------------ 发件人: "wangeditor-team/wangEditor" @.>; 发送时间: 2022年7月25日(星期一) 上午9:11 @.>; @.**@.>; 主题: Re: [wangeditor-team/wangEditor] iframe 动态插入wandEditor使用问题 (Issue #4549)

通过你的源码来看 https://github.com/ITso-easy/iframe-wangEditor/blob/main/src/components/home.vue

你是把一个 Vue 组件的 DOM 直接塞到了 iframe 中,也就是把生成了编辑器的 DOM 直接塞到了 iframe 中。 这种方法感觉很不合理,没讲过这样用的。

如果用 iframe ,我还是建议通过 src 来加载。例如你先定义一个前端路由 /page/editor ,然后把路由写到 iframe src 中。这样还比较合理。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>