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

Help 想在富文本编辑器中插入 #498

Open
yuwanchun opened this issue Jan 13, 2025 · 2 comments
Open

Help 想在富文本编辑器中插入 #498

yuwanchun opened this issue Jan 13, 2025 · 2 comments

Comments

@yuwanchun
Copy link

问题描述

怎样给a标签中添加id等自定义属性?如果使用自定义新元素的话,生成的HTML tag还能用a标签吗?还是说我需要随便另起一个变量名?HTML tag的名称定义有什么要求吗?

wangEditor 版本

wangeditor-next 5.6.27

是否查阅了文档 ?

(文档链接 https://cycleccc.github.io/docs/

最小成本的复现步骤

(请告诉我们,如何最快的复现该问题?)

  • 步骤一
  • 步骤二
  • 步骤三
@cycleccc
Copy link
Owner

在 a 标签上加入自定义属性不行,只能在自定义元素上加入自定义属性。或是你可以看一下源码中的
https://github.com/cycleccc/wangEditor-next/tree/master/packages/plugin-float-image
通过这种方式覆盖原有的解析逻辑

@yuwanchun
Copy link
Author

那我自定义新元素的话,我看文档里不建议使用a标签,自定义新元素的命名不能用a的话,可以随便起吗?生成的 HTML tag 有什么命名规则吗?

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

No branches or pull requests

2 participants