Comments (13)
你们也有这个问题吗
from braft-editor.
http://margox.github.io/braft-editor/ 你访问这个DEMO,会有这个问题么? 贴一下你的代码看看?
from braft-editor.
{
qiNiuToken && <BraftEditor {...editorProps}
viewWrapper=".ant-form-item-control-wrapper"
contentFormat='html'
onRawChange={handleRawChange}
onHTMLChange={handleHTMLChange}
initialContent={storeDetail.content}/>
}
from braft-editor.
demo刚试了一下 是可以
from braft-editor.
应该是我这边放在form里引起的
from braft-editor.
额。form里面阻止了你的输入事件么
from braft-editor.
ant design的form表单 我也不知道什么原因
<FormItem label="专题正文:" hasFeedback {...formItemLayout} className={styles.contentEditor}> <div style={{width: '100%'}}> { qiNiuToken && <BraftEditor {...editorProps} viewWrapper=".ant-form-item-control-wrapper" contentFormat='html' onRawChange={handleRawChange} onHTMLChange={handleHTMLChange} initialContent={storeDetail.content}/> } <span style={storeDetail.content == null || storeDetail.content == '<p></p>' || storeDetail.content == ''?{display:'inline',color: '#f04134'}:{display:'none',color: '#f04134'}}>专题正文未填写</span> </div> </FormItem> <FormItem label='专题banner:' {...formItemLayout}>
这样写就正常,但是下面套在{getFieldDecorator就不行了
<FormItem label="专题正文:" hasFeedback {...formItemLayout} className={styles.contentEditor}> {getFieldDecorator('content', { initialValue: storeDetail.content, })( <div style={{width: '100%'}}> { qiNiuToken && <BraftEditor {...editorProps} viewWrapper=".ant-form-item-control-wrapper" contentFormat='html' onRawChange={handleRawChange} onHTMLChange={handleHTMLChange} initialContent={storeDetail.content}/> } <span style={storeDetail.content == null || storeDetail.content == '<p></p>' || storeDetail.content == ''?{display:'inline',color: '#f04134'}:{display:'none',color: '#f04134'}}>专题正文未填写</span> </div> )} </FormItem>
from braft-editor.
initialContent={storeDetail.content} 感觉和这一行有关系
from braft-editor.
不不 ,我试过了,就是表单Form的{getFieldDecorator造成的
from braft-editor.
我改了下代码,现在可以了,但是添加时候的链接会自动加前缀不~ 我加了一个baidu的网站,然后请求接口保存,我看了下发给后台的a标签是正常的href="www.baidu.com", 再请求接口查询的时候 返回的json里也是正常的href,但是我用谷歌调试工具选中这个a标签查看元素时 ,href却是:
<a class="braft-link" href="http://localhost:8000/inspiration/inspirationTheme/specialStore/www.baidu.com" target=""><span data-offset-key="d4plb-0-0"><span data-text="true"> </span></span><span data-offset-key="d4plb-0-1" style="font-size: 14px;"><span data-text="true">当90后</span></span></a>
from braft-editor.
没有加上http://
或者https://
的话,会被识别成相对路径,所以不要忘了加上http://
或者https://
啦
from braft-editor.
哦哦,我试试
from braft-editor.
恩,是没加前缀的原因
from braft-editor.
Related Issues (20)
- 全屏模式下有必要z-index:99999这么大嘛bro
- image toolbar上的操作会触发editor onChange
- 图片回显后无法显示,图片格式回显错误的解决方案
- 不再更新了吗?
- 请问如何通过某个api 在编辑器顶部或者底部插入自定义block
- 如何实现监听内容变化? HOT 2
- 多媒体上传视频格式能不能再扩展一些
- reopen: ctrl+x 剪切后会跳到顶部
- QQ群进不去了
- 添加网络资源,嵌入iframe,编辑初始化显示为空
- 能否更新react的版本,17.
- 复制网络图片到编辑器时,怎么拦截替换成自己服务器地址? HOT 1
- 插入视频后,不展示缩省图
- qiankun 框架使用braft editor的media 功能有兼容问题,排查后发现是因为源码使用了setImmediate, 换setTimeout就可以
- 插入视频后组件onChange获取val,首次调用val.toHTML()返回空
- 支持服务端渲染吗
- Cannot read properties of null (reading 'getBoundingClientRect')
- 图片删除
- Mention
- onChange未正确获取内容
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from braft-editor.