此文將會介紹:
Image 模組(image)
Tinymce 模組(tinymce) + tinymce 編輯器檔案 (下載)
Image Assist 模組 (img_assist)
檔案配置
image/
img_assist/
tinymce/安裝tinymce plugin
return $plugins;前面加入下面給行$plugins['drupalimage'] = array();
$plugins['drupalimage']['theme_advanced_buttons1'] = array('drupalimage');
$plugins['drupalimage']['extended_valid_elements'] = array('img[class|src|border=0|alt|title|width|height|align|name]');
$plugins['drupalbreak'] = array();
$plugins['drupalbreak']['theme_advanced_buttons3'] = array('drupalbreak', 'drupalpagebreak');搬移及安裝
== 將三個資料夾都移至 drupal/sites/all/modules裡頭
接下來都是web畫面,到admin/build/modules啟用image, tinymce, img_assist三個模組
權限設定
== 到admin/user/access設定權限, 如圖:

access img_assist 打開,可以在發文時插入圖片
create image 和 access img_assist 都打開,發文時插入、上傳新圖片
建立tinymce profile
== 在tinymce設定頁面(admin/settings/tinymce)新增一個profile,然後可以選擇button,如圖:

在button列表最後,可以看到多兩個DrupalImage和Drupal teaser/Body Break,勾選以打開~
注意,此設定中,可以用tinymce權限的角色,access img_assist 權限也要打開,drupalimage才有用
關掉image assist預設的button
== 在img_assist設定頁面(admin/settings/img_assist),找到Access settings底下的Textarea image link,如圖:

因為image assist在沒有裝tinymce時,有自己的button,因此需要取消顯示,將他選為Do not show link,交給tinymce處理。
建立給tinymce用的圖片大小 (optional)
== 在image設定頁面,增加新的大小(admin/settings/image),如圖:

== 在img_assist設定頁面,設定預設的縮圖及彈出視窗的縮圖大小,如圖:

取消html排版亂碼的方式
<?php
function tinymce_config($profile) {
//....
$init['preformatted'] = $settings['preformatted'] ? $settings['preformatted'] : 'false';
// 在這之後加入以下這一行
$init['apply_source_formatting'] = true;
?>
回應
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
咦 模組不是應該放在drupal/modules底下
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
答案在 sites/all/README.txt
Re:
請問 依照說明安裝, 大部分都正常, 但是 點選 DrupalImage 這個button 時,
似乎找不到網頁 ( 會跳到首頁) .
點選 Drupal Image 時, 連結的 URL 為
http://Server_ip/drupal/sites/all/index.php?q=img_assist/load/tinymce
sites/all 目錄下應該沒有這個index.php 請問是哪裡有問題? 謝謝
晚上再測試時 若改為 http://Server_ip/drupal/?q=img_assist/load/ 可以看到一個
Browse Image 或 上傳 a new image 的網頁
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
jp問題已經解決了
必須要將 原文裡面的
搬移及安裝
== 將三個資料夾都移至 drupal/sites/all/modules裡頭
改成 搬移到 drupal/modules 如此就可以了.
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
我也有類似的組合
是用Excerpt + Pictures
Pictures是(image類似的功能,不過不用節點,比較像是imagecache的用法)
Excerpt則是teaser與content分開來寫,對於插入圖案的控制更容易拿來排版歐。
而且Pictures在TinyMCE的plugin也跟這篇文章提供的方法雷同。
各得其所。
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
Pictures 看起來不錯用,多謝推薦!
(有空的話可以寫一下模組介紹哦)
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
用page建立內容之後,
沒辦法顯示圖片,
而出現以下:
[img_assist|nid=5|title=yes|desc=|link=none|align=left|width=250|height=141]
請問是什麼問題?
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
要把 image 的語法打開
到/admin/settings/filters 的設定中
裡面有個 image 顯示之類的
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
可以囉,謝謝
把admin/settings/filters/裡面的
Inline images
Add images to your posts with Image assist.
這個打勾就可以了
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
我是安裝了tinymce也啟動了,但要設定時他就會說
Lastly, only users with the access tinymce permission will be able to use TinyMCE
不管我如何設定使用權限就是不給我用....我其他設定也可以成功的說
有大大知道是哪邊出了問題嗎?
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
有去權限設定的地方分配權限給特定角色嗎?
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
謝謝大大的回應
已找到問題所在了......原來是改版面時不小心有東西給刪了
所以顯示會少了增加profile
已經沒問題了
謝謝
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
大家可以在image_assist模组介绍里发现,好像image_assist 模组,以后不支持tinymce了。
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
搞了一個晚上,怎麼還是沒看到呀!?
都按圖做了=.=
Drupal teaser/Body Break選鈕找不到!
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
去功能/按鈕設定部份找看看?
也有可能是因為版本不同,建議還是看一下 readme.txt
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
安裝到權限設定這一步後,出現以下信息:
Image import Import directory has not been configured.
The import directory must be configured and exist in order for the Image import module to function.
ImageMagick advanced options ImageMagick image toolkit is not properly installed
The sites/all/modules/image/image_imagemagick.inc file must be copied to includes in order for the ImageMagick image toolkit to function.
sites/default/files/images/import目錄不存在。
請問該怎麼辦?
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
手動新增目錄?
Re: 所見即所得編輯器 + 圖片上傳 (tinymce + img_assist)
手動新增目錄後:
import path:
sites/default/files/images/import
但仍然出現以下信息:
Image import Import directory has not been configured.
The import directory must be configured and exist in order for the Image import module to function.