5539 Posts in 1738 Topics by 1224 members
|Go to End|
13 February 2014 at 6:02am
I am trying to customize the tinymce in the CMS in order to be able to enter small html templates that are of the following form:
enter the text of your note here
without toggling to html edition.
I put this in mysite/_config.php
then I wrote the following templates in mysite/templates/
<div class="my-note"> enter the text of your note here
and similar for listing.html and code.html
Then I visited mysiteadress/dev/build
I have a button in the editor toolbar that allow to open a window and to chose the template.
But what is injected in my page is not the template but
<p> enter the text of your note here</p>
I don't understand why I have my text in paragraph instead of the div I put into the template?
Thank you for help.
13 February 2014 at 8:16am
I eventually had it working
I don't yet understand clearly but it has something to do with a line in my _config.php
At the beginning I had this line added with a long list of accepted tags but without div. I tried to add div but it was still not working. Thus I changed the list with '*
- ' and It worked.
But what I don't understand is why when I completely remove the line it goes on working ?!
13 February 2014 at 1:36pm
Important to note is that config changes do not take effect until you do a complete page load. AJAX loads don't refresh the config, no matter what you've changed in the code. So in normal use, since SS uses AJAX for all page loads, the config will never refresh after first logging in.
I, at least, have found no way around this.
It may explain that last concern you voiced, and perhaps also some others.
13 February 2014 at 8:53pm
Thank you Sygmoral
I have taken notice.
|Go to Top|