Comments (5)
第一点是因为我这边没有把空格抓换成 ,后面会改进,第二点,麻烦能贴下你的使用代码么?
from braft-editor.
render() {
const editorProps = {
height: 600,
contentFormat: 'html',
initialContent: this.props.content,
// onChange: this.handleChange,
onHTMLChange: this.props.onChange,
controls: [
'undo', 'redo', 'split', 'font-size', 'font-family', 'text-color',
'bold', 'italic', 'underline', 'strike-through', 'superscript',
'subscript', 'text-align', 'split', 'headings', 'list_ul', 'list_ol',
'blockquote', 'code', 'split', 'link', 'split', 'media'
],
colors:[
'#000000', '#333333', '#666666', '#999999', '#cccccc', '#ffffff',
'#61a951', '#16a085', '#07a9fe', '#003ba5', '#8e44ad', '#f32784',
'#c0392b', '#d35400', '#f39c12', '#fdda00', '#7f8c8d', '#2c3e50'
],
fontSizes:[
12, 14, 16, 18, 20, 24,
28, 30, 32, 36, 40, 48,
56, 64, 72, 96, 120, 144
],
fontFamilies:[
{
name: 'Araial',
family: 'Arial, Helvetica, sans-serif'
}, {
name: 'Georgia',
family: 'Georgia, serif'
}, {
name: 'Impact',
family: 'Impact, serif'
}, {
name: 'Monospace',
family: '"Courier New", Courier, monospace'
}, {
name: 'Tahoma',
family: "tahoma, arial, 'Hiragino Sans GB', 宋体, sans-serif"
}
],
media:{
image: true, // 开启图片插入功能
video: false, // 开启视频插入功能
audio: false, // 开启音频插入功能
validateFn: null, // 指定本地校验函数,说明见下文
uploadFn: this.uploadFn // 指定上传函数,说明见下文
}
}
if(this.props.ready){
return (
<div style={{background:'#fff'}}>
<BraftEditor {...editorProps}/>
</div>
)
}else{
return <div></div>
}
}
from braft-editor.
应该是转换的时候没有转换一个
,存在数据库里的是
<p>啊</p>
<p></p>
<p>啊</p>
<p></p>
一个空的p标签,但是我在网页上把p标签的默认margin设为0了
所以应该是这样:
<p>啊</p>
<p>
<br/>
</p>
<p>啊</p>
<p></p>
from braft-editor.
抽空做了软换行的功能,现在按Ctrl或者Shift + Enter,就能生成br而非p了,至于空格的问题,估计要再等等了😂😭🙄
from braft-editor.
感觉我这边把空格转成 来实现缩进,会伤及无辜,还是建议用css来控制段落的缩进吧
from braft-editor.
Related Issues (20)
- fusion.design
- 404
- 作者回家生孩子去了?
- BraftEditor.use 实现自定义的行内组件 entnty ,entnty 在输出的 html 中 onClick 事件不执行 HOT 1
- 如何获取光标当前位置呢?
- createEditorState方法无法正确识别空白符 HOT 2
- 请问modal中设置了onConfirm函数,但是在页面上的按钮却默认是disabled应该怎么调整 HOT 2
- 自定义modal在cancel和confirm之后会被销毁,个人觉得把这个控制权作为一个字段给出会更好
- 富文本中内容被全选删除或无内容的时候继续删除会产生报错
- 全屏模式下有必要z-index:99999这么大嘛bro
- image toolbar上的操作会触发editor onChange
- 图片回显后无法显示,图片格式回显错误的解决方案
- 不再更新了吗?
- 请问如何通过某个api 在编辑器顶部或者底部插入自定义block
- 如何实现监听内容变化? HOT 2
- 多媒体上传视频格式能不能再扩展一些
- reopen: ctrl+x 剪切后会跳到顶部
- QQ群进不去了
- 添加网络资源,嵌入iframe,编辑初始化显示为空
- 能否更新react的版本,17.
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.