@drnugent在CKEditor的源代码是: <div class="dnd-atom-wrapper type-image context-sdl_editor_representation atom-align-center" contenteditable="false"> <div class="dnd-drop-wrapper"> <!-- scald=4:sdl_editor_representation {"link":""} --> <div class="image"> <img alt="" src="http://.../xxx.jpg" style="height:100px; width:200px"> </div> <!-- END scald=4 --> </div> </div>
。
但是在数据库中是: <div class="dnd-atom-wrapper type-image context-sdl_editor_representation atom-align-center" contenteditable="false"> <div class="dnd-drop-wrapper"> [scald=4:sdl_editor_representation {"link":""}] </div> </div>
。
高度和宽度不保存。在HTML输出由原子上下文呈现(这里是编辑器表示)之后: <div class="dnd-drop-wrapper"> <div class="image"> <img width="182" height="71" alt="" src="http://.../xxx.jpg" class="image-style-none" typeof="foaf:Image"> </di> </di>
当你说图像保持相同的大小时,你的意思是说,高度和宽度属性不会在HTML输出中呈现?或者你的意思是图像没有被转码? – drnugent
是的,我的意思是高度和宽度属性。 – Mamin
在CKEditor中调整高度/宽度后,您可以单击编辑器的“查看HTML”按钮,查看它是直接设置高度/宽度属性还是使用style =“”属性?输入格式可能会剥离一些属性,并且如果将其切换为更容许的输入格式,则应该停止执行此操作。 – drnugent