我已经在我的Symfony 2.8项目中安装了TinymceBundle并且它有效。但是,如果我用它来发送电子邮件和捆绑生成相对网址。
我试过
{{ 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"
答案 0 :(得分:0)
我发现我的问题在哪里。
我用:
{{ 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"