Symfony2图像路线在tinymce与elfinder

时间:2015-06-04 10:22:26

标签: symfony tinymce elfinder

我使用Simfony2和StfalconTinymceBundle以及FMElfinderBundle。 将图像从elfinder放到tinymce时我有问题。我希望图像路由是'/uploads/elfinder/image.jpg',但我得到像'../../../../ elfinder / image.jpg'

我的elfinder的config.yml是

fm_elfinder:
instances:
    default:
        locale: %locale% # defaults to current request locale
        editor: tinymce4 # other options are tinymce, tinymce4, form, custom and simple
        fullscreen: true # defaults true, applies to simple and ckeditor editors
        theme: smoothness # jquery theme
        include_assets: true # disable if you want to handle loading of the javascript and css assets yourself
        connector:
            debug: false # defaults to false
            roots:       # at least one root must be defined
                uploads:
                    show_hidden: false # defaults to false
                    driver: LocalFileSystem
                    path: uploads/elfinder
                    upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
                    upload_deny: ['all']
                    upload_max_size: 2M

Tinymce配置

stfalcon_tinymce:
include_jquery: true
tinymce_jquery: true
selector: ".tinymce"
theme:
    advanced:
        theme: "advanced"
        file_browser_callback : elFinderBrowser
        plugins:
            - "advlist autolink lists link image charmap print preview hr anchor pagebreak"
            - "searchreplace wordcount visualblocks visualchars code fullscreen"
            - "insertdatetime media nonbreaking save table contextmenu directionality"
            - "emoticons template paste textcolor"
        toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | code"
        toolbar2: "print preview media | forecolor backcolor emoticons | stfalcon | example"
        image_advtab: true

由于

0 个答案:

没有答案