在 iframe 中调用 Etherpad 的正确格式是啥

Posted

技术标签:

【中文标题】在 iframe 中调用 Etherpad 的正确格式是啥【英文标题】:What is proper format for calling Etherpad in iframe在 iframe 中调用 Etherpad 的正确格式是什么 【发布时间】:2021-11-07 12:30:36 【问题描述】:

我正在尝试通过这种方式在网页上调用 etherpad。

<iframe src='http://pad.domain/p/PAD_NAME?sessionID=sessionID&authorName=authorName&userName=userName&showChat=false&showLineNumbers=false' width=600 height=400></iframe>

这是在网页上包含 etherpad 的正确方法吗?

当我使用这种方式然后调用 /sethtml API 时,API 所做的更改会保存在 DB 中,但不会反映在 pad 中。

【问题讨论】:

【参考方案1】:

最后,我像下面这样调用了 etherpad,它工作得非常好。

<iframe src='http://pad.domain/p/PAD_NAME&authorName=authorName&showChat=false&showLineNumbers=false' width=600 height=400></iframe>

此外,当使用唯一的 padID 时,/setHTML API 现在工作正常。可能主要错误是调用 etherpad。

【讨论】:

以上是关于在 iframe 中调用 Etherpad 的正确格式是啥的主要内容,如果未能解决你的问题,请参考以下文章

如何正确更新 etherpad-lite?

在etherpad中更改颜色而不是文本的背景颜色

Etherpad:setHTML API 响应成功,但更新后的 html 在 etherpad 上不可见

如何在插件的 padUpdate 钩子中获取 etherpad 的文本?

查看最近编辑的 etherpad

etherpad 如何识别作者颜色?