Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I think the fullcalendar jquery-plugin is a really great solution. However, I noticed the plugin escapes (htmlEscape) the title. But I need to format some strings in the title, for example bold text, colors, or small images.

The solution with another plugin (for example qTip, like in the examples) will not work the right way for me. Is there anyway to format the title text?

question from:https://stackoverflow.com/questions/3410157/html-in-title-string-of-fullcalendar-jquery-plugin

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
221 views
Welcome To Ask or Share your Answers For Others

1 Answer

I did this instead as the other views use the same class but not spans and I forced in the title from the event rather than making an additional request for the text.

eventRender: function (event, element) {
    element.find('.fc-event-title').html(event.title);
}

In v2, you may use:

element.find('span.fc-title').html(element.find('span.fc-title').text());

The span class is fc-title as opposed to fc-event-title.

Credit to j00lz for the comment confirming the change .


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...