我设法让我的 Quill 工作,但现在我想像我们在这个论坛上那样制作一个漂亮的分屏,但我无法弄清楚的一件事是如何在预览端将 Quill 的输入转换为漂亮的文本.
我能够显示文本,但它仍然包含我当然不想要的所有 html 标签。
所以这是我到目前为止的 Quill 设置:
export default class AddSpark extends Component {
constructor(props) {
super(props);
this.onChange = this.onChange.bind(this);
this.state ={
content: '',
};
}
onChange(html) {
this.setState ({ content: html });
console.log(html)
}
render() {
return (
<div>
<Col xs={12} md={6}>
<form ref={(input) => this.sparkForm = input} onSubmit={(e) => this.createSpark(e)}>
<ControlLabel>Select your city</ControlLabel>
<select id="formControlsCity" placeholder="Choose your city" onChange={this.onChange} className="form-control" onClick={ moreOptions } ref={(input) => this.city = input}>
<option value="select">Choose your city</option>
<option value="Beijing">Beijing</option> …
Run Code Online (Sandbox Code Playgroud)我有两个数组,一个是网址,另一个是内容.它们看起来像这样:
const link = [ 'www.test0.com', 'www.test1.com', 'www.test2.com' ]
const content = [ 'this is test0 content', 'this is test1 content', 'this is test2 content' ]
Run Code Online (Sandbox Code Playgroud)
如何同时映射两个数组并在新创建的元素中使用它们的值?
我需要使用我的reactplayer的url值和内容的值作为播放器下面的文本.
所以看起来应该是这样的:
<Reactplayer url"link0" />
<ControlLabel>content0</ControlLabel>
Run Code Online (Sandbox Code Playgroud)
这可能吗?什么是更好的设置方法?
我在"探索流星"一书之后建立了我的第一个Meteor添加.
但是现在我遇到了以下错误:
错误:在ian中找不到accounts_ui.styl的插件:accounts-ui-bootstrap-3;*.styl的插件在发布时处于活动状态,但现在没有
我相信这与我目前的手写笔包有关.它目前运行1.0.7并且不允许我更新到最新版本.
更新后我收到此错误:错误:包名称必须包含小写ASCII字母:"2.513.4"
如果我删除并再次添加它也不会安装最新版本.
欢迎任何想法.
干杯,多米尼克
我似乎找不到我的问题。有人看到我做错了什么吗?这个项目是用 Meteor 和 React 制作的。
我的导入文件:
import _ from 'lodash';
import { lorem, faker } from 'faker';
import { Comments } from '../../api/comments/comments';
import { insertComment } from '../../api/comments/methods.js';
import { Bert } from 'meteor/themeteorchef:bert';
Meteor.startup(() => {
// Great place to generate some data
// Check to see if data excists in the collection
// See if the collection has any records
const numberRecords = Comments.find({}).count();
if (!numberRecords) {
// Generate some data...
_.times(100, () => {
const title …
Run Code Online (Sandbox Code Playgroud)