Drupal Scald:在所见即所得文本区域调整图像大小

时间:2014-04-02 09:58:32

标签: drupal drupal-7 drupal-modules

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

我试图改变原子上下文和转码器,但这并不是我想要的。 我想在一个所见即所得的文本区域中动态地更改图像大小。

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

Drupal 7 烫伤7.x-1.1 Wysiwyg 7.x-2.2 CKeditor 4.3.1

1 个答案:

答案 0 :(得分: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>

相关问题