ckeditor中的插入图像出现问题
Issue with insertion image in ckeditor
我正在将图像插入到ckeditor 4.4.0的内容中。当我把图片的urlhttp://www.asge.org/uploadedImages/Patients/National_Colorectal_Cancer_Awareness_Month/NCCAM_Banner_36x12.jpg并设置图像大小和位置。图像在当前预览中显示正确。之后,我将数据保存到数据库中,它从html中过滤img样式标记,因此我无法获得正确的img。我当前的ckeditor配置是
CKEDITOR.editorConfig = function( config ) {
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
// config.toolbar = 'Full';
config.toolbarGroups =
[
{ name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
{ name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton',
'HiddenField' ] },
'/',
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
'-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
'/',
{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
];
config.allowedContent= 'true';
};
我的输入数据:
<img alt="" src="http://www.asge.org/uploadedImages/Patients/National_Colorectal_Cancer_Awareness_Month/NCCAM_Banner_36x12.jpg" style="float:right; height:100px; width:300px" />
输出数据:
<img alt="" src="http://www.asge.org/uploadedImages/Patients/National_Colorectal_Cancer_Awareness_Month/NCCAM_Banner_36x12.jpg" />
错误:
config.allowedContent= 'true';
好的:
config.allowedContent= true;
顺便说一句。您还错误地配置了工具栏。请注意,有两种设置-config.toolbar
和config.toolbarGroups
。阅读工具栏自定义指南中的更多信息。
相关文章:
- Phonegap-(安卓/iphone)多个图像的图像库出现问题
- 画布图像的问题
- 客户端图像调整大小.任何已知问题
- 阵列中随机图像的问题
- mouseOver上的隐藏图像问题
- Three.js CanvasRenderer,在将图像纹理设置为平面时出现问题
- 图像自适应调整大小+Javascript的问题
- 使用Javascript对象为具有两个背景图像的DIV设置样式时出现问题
- 图像缩略图库中的“下一个”和“上一个”按钮中的“问题”
- 在服务器上通过jQueryAjax上传加载的图像时出现问题
- Jquery图像循环问题
- 使用Angularjs和ionic的图像大小问题
- 图像上传功能将++(+1)副本添加到下一次上传.出了什么问题或如何重置“选定图像”
- 图像滑块中的分页问题
- 图像J宏路径问题
- 图像计时器中的问题
- Heroku 部分不提供我的一些图像,以前有人遇到过这个问题
- SVG到图像的转换问题
- AngularJS:下载二进制图像时出现异步问题
- HTML或Javascript问题-图像测试