我在我的反应应用程序中使用ckeditor4-react包。当我想将图像添加到文本时,文件浏览器正在打开,我选择图像或上传图像但我无法更改图像的大小或添加替换文本。因为文本字段已禁用。
let c = {
filebrowserBrowseUrl: 'http://localhost:3002/admin/photopicker',
filebrowserUploadUrl: `https://api.cloudinary.com/v1_1/${config.cloud_name}/upload`
};
<CKEditor
config={c}
ref="editor"
data={this.props.data}
onChange={this.props.onEditorChange}
onFileUploadRequest={this.onFileUploadRequest}
onFileUploadResponse={this.onFileUploadResponse}
onDialogShow={this.onDialogShow} />
我希望编辑大小,如演示:https://ckeditor.com/docs/ckeditor4/latest/examples/image.html
Alternative Text, width, height, border, HSpace and VSpace fields are not editable
在我看来,你的ckeditor反应包已经安装了
config.readOnly
属性设置为true。
尝试在CKEditor标记下包含此内容:
readOnly={false}
或者,更改包配置。
请参阅:CKEditor readOnly config property了解更多信息。