Hello,
how is it possible to add html code to news article? without insert tags...
i need to add simple html code but as soo as i add it the editor just removes it..
thank you
Hello,
how is it possible to add html code to news article? without insert tags...
i need to add simple html code but as soo as i add it the editor just removes it..
thank you
In Settings there is a list of allowed tags.
Double check all the tags you are trying to add are in this list.
no unfortunately the tags are allowed... and it works in articles, but doesnt work(eliminated) from the news...
There are "valid elements" and "extended valid elements" in the TinyMCE configuration. All other HTML elements are stripped.
Contao Community Moderator
→ Support options
thank you!
is it possible to add some tags to tinymce? where the file to edit?
Can you post the code snippet that you are trying to insert?
Contao Community Moderator
→ Support options
it's just simple facebook like button that i need to put on each news item
with code
<iframe src="........."></iframe> or
<div class="fb-like" data-href="site.ru" data-send="true" data-width="450" data-show-faces="true"></div>
You can try to add to the TinyMCE configuration file "system/config/tinyMCE.php" the <iframe> tag to the list of "extended valid elements":
Code:extended_valid_elements : "q[cite|class|title],article,section,hgroup,figure,figcaption,iframe[src|style|width|height|scrolling|marginwidth|marginheight|frameborder]",
Contao Community Moderator
→ Support options
thank you! looks like it working...
but after i added the tag to .php file the tinyMCE editor no longer is shown in the backend... only plain html window.
Maybe you've done something wrong!? I have attached a modified TinyMCE configuration file where I added the <iframe> tag. Try to replace your file with this one.
Another possibility would be:
- Create a new file "fblike.php" in the Contao templates directory "[TL_ROOT]/templates"
[/*:m:33wo20te]- Insert there the Facebook Like button code:
If you prefer to use the HTML5 code snippet instead then add the following code to the "fblike.php" file:Code:<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexample.com%2Fpage%2Fto%2Flike&send=false&layout=standard&width=450&show_faces=false&action=like&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
[/*:m:33wo20te]Code:<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/de_DE/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-like" data-send="false" data-layout="standard" data-width="450" data-show-faces="false" data-action="like" data-colorscheme="light"></div>- Include the code snippet in your news article via the file insert tag
[/*:m:33wo20te]Code:{{file::fblike.php}}
Contao Community Moderator
→ Support options
I found another tutorial that describes the Facebook integration.
Contao Community Moderator
→ Support options
This is a cool method xchs, I used your method to put up a few on my website's header. Thanks for this method.
[attachment=0:2agn7ew4]CONTAO-ID.PNG[/attachment:2agn7ew4]
Bookmarks