的文件夾結構TinyMCE的或CKEDITOR一體化的問題是這樣的:與Zend
Application
-- Layouts
---- layout.phtml (the 'template' file which loads all the .phtml files into, like insert.phtml form the pages folder, and loads init.js)
-- Modules
---- Admin
------ Views
-------- Scripts
---------- Pages
------------ insert.phtml (the actual file where I want to use tinyMCE)
Library
Public
-- Tinymce
---- tiny_mc.js
-- Jquery
---- init.js (loads the tiny_mce.js file using this code:
我把這個用裝載機一textarea和看起來像這樣:
$('.textEditor').Loader({
url: ['../../../tinymce/tiny_mce.js'],
debug: [true],
cache: [true],
success: function(target){
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
editor_selector : "textEditor",
plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
});
}
});
當我凝視我的控制檯我得到這個:
Loading: ../../../tinymce/tiny_mce.js
Loaded: ../../../tinymce/tiny_mce.js (126ms)
/dgpcms/public/admin/pages/insert//langs/en.jsFailed to load resource: the server responded with a status of 404 (Not Found)
/dgpcms/public/admin/pages/insert//plugins/style/editor_plugin.jsFailed to load resource: the server responded with a status of 404 (Not Found)
/dgpcms/public/admin/pages/insert//plugins/layer/editor_plugin.jsFailed to load resource: the server responded with a status of 404 (Not Found)
/dgpcms/public/admin/pages/insert//plugins/table/editor_plugin.jsFailed to load resource: the server responded with a status of 404 (Not Found)
/dgpcms/public/admin/pages/insert//themes/advanced/editor_template.jsFailed to load resource: the server responded with a status of 404 (Not Found)
....等等所有插件....
如何讓tinyMCE忽略Zend App的MVC結構? 或如何解決這個問題?
在此先感謝
這是我.htacces文件的內容在我的公共文件夾中找到:
SETENV APPLICATION_ENV發展
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule !\.(js|ico|gif|jpg|png|css|txt|swf)$ index.php
編輯:03-11-2010
更改.h中的某些內容taccess文件,並改回以前的樣子設置(如上面的情況),但錯誤已經改變:
Loading: ../../../tinymce/tiny_mce.js
Loaded: ../../../tinymce/tiny_mce.js (230ms)
/langs/en.jsFailed to load resource: the server responded with a status of 404 (Not Found)
/themes/advanced/editor_template.jsFailed to load resource: the server responded with a status of 404 (Not Found)
/plugins/layer/editor_plugin.jsFailed to load resource: the server responded with a status of 404 (Not Found)
/plugins/table/editor_plugin.jsFailed to load resource: the server responded with a status of 404 (Not Found)
/plugins/save/editor_plugin.jsFailed to load resource: the server responded with a status of 404 (Not Found)
等了所有插件
所以它現在正在尋找在其他然後纔是文件夾。任何人有任何想法?
編輯:05-11-2010
這是真的煩我了!我用CKeditor嘗試過,但同樣的問題發生。我嘗試在'RewriteEngine Off'文件夾中放置一個.htaccess文件(對於tinyMCE和CKeditor),但這沒有什麼區別。
編輯:22-11-2010
加載在我的佈局文件的工作TinyMCE的。不能以這種方式最好的解決辦法,但最好再沒有什麼......
tiny_mce.js從佈局模板中調用的外部文件(init.js)中調用,因此我無法在代碼中使用任何php。 – 2010-11-01 15:55:59
那麼你gatta使用絕對url – tawfekov 2010-11-01 16:03:52
與相對url沒有區別 – 2010-11-02 08:48:03