繁体   English   中英

TinymceBundle和Symfony2链接中的绝对URL

[英]Absolute URL in a Link with TinymceBundle and Symfony2

我已经在我的Symfony 2.8项目中安装了TinymceBundle ,它可以正常工作。 但是,如果我用它发送电子邮件并捆绑,则会生成相对的URL。

我试过了

{{ tinymce_init({
    relative_urls : false,
    remove_script_host : false,
    convert_urls : true,})}}

但这没有用。

你能帮助我吗 ?

以下是我的配置:

stfalcon_tinymce:

        selector: ".tinymce"
        # Get current language from the parameters.ini
        language: %locale%
        # 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 with almost all enabled plugins
            advanced:
                 plugins:
                     - "advlist lists link image charmap print preview hr pagebreak"
                     - "searchreplace wordcount visualblocks visualchars code fullscreen"
                     - "insertdatetime media nonbreaking save table contextmenu directionality"
                     - "emoticons paste textcolor"
                 toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
                 toolbar2: "print preview | forecolor backcolor emoticons"

我发现我的问题在哪里。

我用 :

 {{ tinymce_init({
    relative_urls : false,
    remove_script_host : false,
    convert_urls : true,})}}

添加绝对链接,但这必须在config.yml中,如下所示:

stfalcon_tinymce:

        selector: ".tinymce"
        # Get current language from the parameters.ini
        language: %locale%
        # 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 with almost all enabled plugins
            advanced:
                 relative_urls: false
                 remove_script_host : false
                 convert_urls : true
                 plugins:
                     - "advlist lists link image charmap print preview hr pagebreak"
                     - "searchreplace wordcount visualblocks visualchars code fullscreen"
                     - "insertdatetime media nonbreaking save table contextmenu directionality"
                     - "emoticons paste textcolor"
                 toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
                 toolbar2: "print preview | forecolor backcolor emoticons"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM