• First thanks for a elegant and simple calendar. Is there a way to use markup in the event description. Like links, bold, img, and so on. I see the whole event is link-able, i just want to use in the description only. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author i4nd90

    (@i4nd90)

    Glad it’s of use to you ??

    You can achieve what you’re after by adjusting the HTML template:

    Taking the pre-packaged “Full size calendar” instance as an example, you would change this section of the code from

    <% if (event.url) {  %><a target="_blank" href="<%= event.url %>" <% } else {  %><div <% }  %> class="event-item">
    	<span class="event-item-date">
    		<% if (event.end != event.start) {
    			startMY = moment(event.start).format("MM YY");
    			endMY = moment(event.end).format("MM YY");
    			if (startMY === endMY) { %>
    				<%= moment(event.start).format("D") %>–<%= moment(event.end).format("D MMMM") %>
    			<% } else { %>
    				<%= moment(event.start).format("D MMMM") %> – <%= moment(event.end).format("D MMMM") %>
    			<% }
    		} else {  %>
    			<%= moment(event.start).format("D MMMM") %>
    		<% } %>
    	</span>
    	<span class="event-item-name"><%= event.title %></span>
    	<% if (event.time) {  %>
    		<span class="event-item-time"><%= event.time %></span>
    	<% } %>
    	<% if (event.desc) {  %>
    		<span class="event-item-desc"><%= event.desc %></span>
    	<% } %>
    <% if (event.url) {  %></a><% } else {  %></div><% }  %>

    and replace it with

    <div class="event-item">
    	<span class="event-item-date">
    		<% if (event.end != event.start) {
    			startMY = moment(event.start).format("MM YY");
    			endMY = moment(event.end).format("MM YY");
    			if (startMY === endMY) { %>
    				<%= moment(event.start).format("D") %>–<%= moment(event.end).format("D MMMM") %>
    			<% } else { %>
    				<%= moment(event.start).format("D MMMM") %> – <%= moment(event.end).format("D MMMM") %>
    			<% }
    		} else {  %>
    			<%= moment(event.start).format("D MMMM") %>
    		<% } %>
    	</span>
    	<span class="event-item-name"><%= event.title %></span>
    	<% if (event.time) {  %>
    		<span class="event-item-time"><%= event.time %></span>
    	<% } %>
    	<% if (event.desc) {  %>
    		<% if (event.url) {  %><a target="_blank" href="<%= event.url %>"><% } %>
    		<span class="event-item-desc"><%= event.desc %></span>
    		<% if (event.url) {  %></a><% } %>
    	<% } %>
    </div>

    Ian

    • This reply was modified 8 years, 5 months ago by i4nd90.
    • This reply was modified 8 years, 5 months ago by i4nd90.
    Thread Starter Ronnie Albert

    (@roway)

    When you save event, it strips the html. Thanks

    • This reply was modified 8 years, 5 months ago by Ronnie Albert.
    Plugin Author i4nd90

    (@i4nd90)

    I think simple BB code is a good idea for the description. I’ll implement and push an update in the next day or two.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Description Markup?’ is closed to new replies.