Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 支持微前端 iframe 沙箱 #5518

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

keuby
Copy link

@keuby keuby commented Jun 10, 2023

No description provided.

@keuby
Copy link
Author

keuby commented Jun 10, 2023

在微前端 IFrame 环境下,instanceof 的判定会错乱,所以更改了 instanceof 的判定方式

@keuby
Copy link
Author

keuby commented Jun 10, 2023

#5387 #5178

@ALLLRON
Copy link

ALLLRON commented Jun 21, 2023

请问在wujie引入的plugins还需要补充jsBeforeLoaders、jsloader吗? 我试了一下这个代码 在降级/非降级模式下都不能正常使用

@keuby
Copy link
Author

keuby commented Jun 21, 2023

不需要,我这边使用的是 https://github.com/micro-zoe/micro-app,wujie 的话,可以提供一个 demo 吗,我可以尝试也适配一下

@ALLLRON
Copy link

ALLLRON commented Jun 21, 2023

demo的git地址:https://github.com/ALLLRON/wujie.git
分支:demo/wangeditor

启动main-vue & vue2 两个项目

@LunaYJ
Copy link

LunaYJ commented Jul 5, 2023

有人关注一下这个PR么? 对iframe 沙箱环境太有意义了

@keuby
Copy link
Author

keuby commented Jul 11, 2023

demo的git地址:https://github.com/ALLLRON/wujie.git 分支:demo/wangeditor

启动main-vue & vue2 两个项目

我尝试了一下,在这个 demo 项目里面是可以正常跑起来的。你使用的版本是是他的包的版本,你需要切换到我的分支用我的代码打包,才能使用我更新后的代码。

有谁可以联系到作者,需要把这个包发布一下 @wangfupeng1988

@lujiaxu111
Copy link

lujiaxu111 commented Aug 1, 2023

demo的git地址:https://github.com/ALLLRON/wujie.git分支:demo/wangeditor
启动main-vue & vue2 两个项目

我尝试了一下,在这个演示项目里面是可以正常的。你使用的版本是他包的版本,你需要用我的代码文件夹切换到我的分支,才能使用我更新后面的代码。

有人可以联系作者,需要把这个包发布一下@wangfupeng1988

我现在用公司的项目嵌入你的富文本编辑器可以正常使用,但是嵌入我的不行,需要额外配置一些东西吗?

@lujiaxu111
Copy link

demo的git地址:https://github.com/ALLLRON/wujie.git 分支:demo/wangeditor
启动main-vue & vue2 两个项目

我尝试了一下,在这个 demo 项目里面是可以正常跑起来的。你使用的版本是是他的包的版本,你需要切换到我的分支用我的代码打包,才能使用我更新后的代码。

有谁可以联系到作者,需要把这个包发布一下 @wangfupeng1988

你demo是正常的 但是我的富文本编辑器和你的配置的版本和代码都一样嵌入到我的项目就不行

@kunl
Copy link

kunl commented Sep 11, 2023

demo的git地址:https://github.com/ALLLRON/wujie.git 分支:demo/wangeditor
启动main-vue & vue2 两个项目

我尝试了一下,在这个 demo 项目里面是可以正常跑起来的。你使用的版本是是他的包的版本,你需要切换到我的分支用我的代码打包,才能使用我更新后的代码。

有谁可以联系到作者,需要把这个包发布一下 @wangfupeng1988

能先构建一下发个编译后的吗,我本地拉下来,构建有问题

@ALLLRON
Copy link

ALLLRON commented Sep 11, 2023

demo的git地址:https://github.com/ALLLRON/wujie.git 分支:demo/wangeditor
启动main-vue & vue2 两个项目

我尝试了一下,在这个 demo 项目里面是可以正常跑起来的。你使用的版本是是他的包的版本,你需要切换到我的分支用我的代码打包,才能使用我更新后的代码。
有谁可以联系到作者,需要把这个包发布一下 @wangfupeng1988

能先构建一下发个编译后的吗,我本地拉下来,构建有问题

wujie的demo是我做了适配的,所以可以。你可以拉取wangeditor源码编译一下后去对应处理。
主要是判断类似于 instanceof window.Selection导致的,其实就是iframe嵌入后,需要在子应用中获取到主应用的window.Selection。 第二个是copy的时候判断在shadowroot里一直为空,其实也是因为没有拿到的原因

@Yuanbiao123
Copy link

第二个是copy的时候判断在shadowroot里一直为空,其实也是因为没有拿到的原因

第二个是copy的时候判断在shadowroot里一直为空,其实也是因为没有拿到的原因

这个怎么选中这个怎么解决呢。 我搞半天不生效这个

@Yuanbiao123
Copy link

无界中集成了vue3。用的是@wangeditor/editor-for-vue@next 选中不生效 这个有人知道怎么改么

@keuby
Copy link
Author

keuby commented Nov 29, 2023

micro-zoe/micro-app#985

@AttackXiaoJinJin
Copy link

无界中集成了vue3。用的是@wangeditor/editor-for-vue@next 选中不生效 这个有人知道怎么改么

@Yuanbiao123 参考下这两个:Tencent/wujie#768 (comment)

https://wujie-polyfill.github.io/doc/plugins/selection.html

@AttackXiaoJinJin
Copy link

AttackXiaoJinJin commented Jan 30, 2024

@kunl 老哥能给 slate 提下吗,wangEditor model 层是用的 slate,这段源码一模一样的:https://github.com/search?q=repo%3Aianstormtaylor%2Fslate%20instanceof&type=code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants