简体   繁体   English

TinymceBundle和Symfony2链接中的绝对URL

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

I have installed TinymceBundle in my Symfony 2.8 project and it worked. 我已经在我的Symfony 2.8项目中安装了TinymceBundle ,它可以正常工作。 But if I use it to send an email and bundle generate relative urls. 但是,如果我用它发送电子邮件并捆绑,则会生成相对的URL。

I tried 我试过了

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

But this didn't work. 但这没有用。

Can you help me ? 你能帮助我吗 ?

Following is my configuration : 以下是我的配置:

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"

I find where is my problem. 我发现我的问题在哪里。

I use : 我用 :

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

to add absolute link, but this have to be in config.yml like this : 添加绝对链接,但这必须在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