0

我正在将 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

谢谢

4

0 回答 0