We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
背景:项目需求中 添加超链接需要携带 name 属性 (主要用来做锚点),目前改了源码 实现了添加链接携带 name 属性, 如下图:
问题: 当我调用toHTML(), 将编辑器内容转为html后, name属性丢失, 但是使用toRAW()方法可以看到name属性是存在的, 如下图:
toHTML:
toRAW:
另:hooks中也可以获取到name属性 const hooks = { 'toggle-link': ({ href, target, name }) => { href = href.indexOf('http') === 0 ? href : http://${href}; return { href, target, name }; }, };
http://${href}
求助:我如何在调用toHTML()之后,保证name属性不会丢失?
The text was updated successfully, but these errors were encountered:
修改了 braft-convert 的源码, toHTML()方法可以带上name属性了
Sorry, something went wrong.
不是braft-convert这个源码,应该是braft-utils/dist/content.js这个文件里边的toggleSelectionLink方法吧。参数加上name就好。
Can you share the code, my editorState.toHtml() doesn't return anything.
editorState.toHtml()
Issue raised here.
该怎么改
No branches or pull requests
背景:项目需求中 添加超链接需要携带 name 属性 (主要用来做锚点),目前改了源码 实现了添加链接携带 name 属性, 如下图:
问题:
当我调用toHTML(), 将编辑器内容转为html后, name属性丢失, 但是使用toRAW()方法可以看到name属性是存在的, 如下图:
toHTML:
toRAW:
另:hooks中也可以获取到name属性
const hooks = {
'toggle-link': ({ href, target, name }) => {
href = href.indexOf('http') === 0 ? href :
http://${href}
;return { href, target, name };
},
};
求助:我如何在调用toHTML()之后,保证name属性不会丢失?
The text was updated successfully, but these errors were encountered: