我尝试在我的应用程序中使用stfalcon_tinymce,我按照doc安装进行操作,但是在加载页面时出现问题。
有很多javascript错误,没有加载任何资源js,每个js文件都有这种错误:http://rdva.dev/bundles/stfalcontinymce/vendor/tinymce/plugins/style/plugin.min.js 404(未找到) 这是正常的,因为在我的web / bundlesstfalcontinymce / vendor / tinymce / plugins文件夹中没有这个路径的文件......
我在tinymce(dev-master)上创建了一个composer.phar更新,资产:install,assetic:dump和cache:clear。 有人知道为什么我没有这些文件吗?
这是我的配置:
composoer.json
"stfalcon/tinymce-bundle": "dev-master",
"helios-ag/fm-elfinder-php-connector": "1.1.1",
"helios-ag/fm-elfinder-bundle": "dev-master",
config.yml
stfalcon_tinymce:
include_jquery: false
tinymce_jquery: true
selector : ".tinymce"
language: %locale%
base_url: %base_url%
# Custom buttons
tinymce_buttons:
stfalcon: # Id of the first button
title: "Stfalcon"
image: "http://stfalcon.com/favicon.ico"
theme:
# Simple theme: same as default theme
simple:
...
advanced:
theme: "advanced"
plugins: "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_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
entity_encoding: "raw"
file_browser_callback : elFinderBrowser
# Medium number of enabled plugins + spellchecker
medium:
...
# BBCode tag compatible theme (see http://www.bbcode.org/reference.php)
bbcode:
...
fm_elfinder:
locale: %locale%
editor: tinymce
tinymce_popup_path: "asset[bundles/stfalcontinymce/vendor/tiny_mce/tiny_mce_popup.js]"
showhidden: false
fullscreen: true
include_assets: true
connector:
debug: false # defaults to false
roots: # at least one root must be defined
uploads:
driver: LocalFileSystem
path: uploads
upload_allow: ['image/gif', 'image/png', 'image/jpg', 'image/jpeg', 'application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation']
upload_deny: ['all']
upload_max_size: 2M
layou.html.twig
{{ elfinder_tinymce_init() }}
{{ tinymce_init() }}
有人可以帮助我吗?
很多
答案 0 :(得分:0)
在layout.html.twig(http://pastebin.com/1Z0VKLrH)
中更改此
{% javascripts
'bundles/nfidbusinessmeeting/js/jquery-1.9.1.min.js'
'bundles/nfidbusinessmeeting/js/popin.js'
'bundles/nfidbusinessmeeting/js/bo.js'
'bundles/nfidbusinessmeeting/js/sorttable.js'
'bundles/nfiduser/js/validator.js'
'bundles/nfidpage/js/main.js'
'bundles/nfidbusinessmeeting/js/jquery.validate.min.js'
'bundles/nfidbusinessmeeting/js/jquery.validate.messages_fr.js'
'bundles/ineattheming/js/colorpicker.js'
filter='yui_js' %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
to(确保捆绑名称没问题,我不得不猜)
{% javascripts
'@NfidBusinessMeetingBundle/Resources/public/js/jquery-1.9.1.min.js'
'@NfidBusinessMeetingBundle/Resources/public/js/popin.js'
'@NfidBusinessMeetingBundle/Resources/public/js/bo.js'
'@NfidBusinessMeetingBundle/Resources/public/js/sorttable.js'
'@NfidUserBundle/Resources/public/js/validator.js'
'@NfidPageBundle/Resources/public/js/main.js'
'@NfidBusinessMeetingBundle/Resources/public/js/jquery.validate.min.js'
'@NfidBusinessMeetingBundle/Resources/public/js/jquery.validate.messages_fr.js'
'@IneatTheming/Resources/public/js/colorpicker.js'
filter='yui_js' %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}