2014-04-02 42 views
1

我在几天内寻找解决方案,但我没有找到。 我的问题: 我将一个原子(图像)放到wysiwyg(CKeditor)文本区(body)上。 我想调整此图像的大小。所以我点击ckeditor图标图标,更改宽度和高度属性。 我保存了我的文章。但图像保持原始大小。Drupal烫伤:在wysiwyg文本区域调整图像大小

我试图改变原子上下文和代码转换器,但它不完全是我想要的。 我想在wysiwyg文本区域动态更改图像大小。

你有解决我的问题吗? 谢谢。

Drupal 7的 烫伤7.x的-1.1 所见即所得7.x的-2.2 CKEDITOR 4.3.1

+0

当你说图像保持相同的大小时,你的意思是说,高度和宽度属性不会在HTML输出中呈现?或者你的意思是图像没有被转码? – drnugent

+0

是的,我的意思是高度和宽度属性。 – Mamin

+0

在CKEditor中调整高度/宽度后,您可以单击编辑器的“查看HTML”按钮,查看它是直接设置高度/宽度属性还是使用style =“”属性?输入格式可能会剥离一些属性,并且如果将其切换为更容许的输入格式,则应该停止执行此操作。 – drnugent

回答

0

@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>