Easy way to get HTML into an event title
See original GitHub issueHi there, I’m using fullcalendar (nice work~) and find what it seem to be a missing function. When you put html in the event title, it’ll always be html-escaped, I understand it’s the best default way, as some title may contain some html char and user input that should be bulletproof .
But why you don’t have put an (bool) textEscape {default : TRUE}
option in Event Source Object ?
(and in Event Object to as it’s the same)
I’m a big boy, I’m able to deal with htmlEscape by myself and I think I’m not the only one here… (i’ve found many issue about html in title on google) But having to use an ugly hook with eventRender just to put a span for a glyphicons seem to be a bit overkill for me…
Tanks, Blag
TL;DR :
- adding option
(bool) textEscape {default : TRUE}
onEvent Source Object
andEvent Object
- dealing with this kind of data :
{
"events": [
{
"title": "<b>Event in bold</b> 1",
"start": "2011-04-04"
},
{
"title": "<span class=""glyphicons""></span> Event with glyphicons",
"start": "2011-05-05"
}
// etc...
],
"textEscape": false, // new option to disable the auto escape
"color": "yellow", // an option!
"textColor": "black" // an option!
}
or
{
"events": [
{
"title": ">> Event escaped",
"start": "2011-04-04"
},
{
"title": "<span class=""glyphicons""></span> Event with HTML !",
"start": "2011-05-05",
"textEscape": false // new option to disable the auto escape
}
// etc...
],
"color": "yellow", // an option!
"textColor": "black" // an option!
}
Issue Analytics
- State:
- Created 8 years ago
- Reactions:33
- Comments:38 (5 by maintainers)
Top Results From Across the Web
How can I insert HTML into an event title in fullCalendar 4?
In your eventRender, look for the selector of the title and change the innerHtml: eventRender: function(info) { ... let selector = info.el.
Read more >HTML title tag - W3Schools
Go for a longer, descriptive title (avoid one- or two-word titles); Search engines will display about 50-60 characters of the title, so try...
Read more >How to get the title of an HTML page ? - GeeksforGeeks
Example 2: This example gets the title of document by first selecting the title by tag name and then taking the element at...
Read more >title - HTML: HyperText Markup Language - MDN Web Docs
Use the title attribute on an iframe to clearly identify the content of the iframe to screen readers. Open main menu. Home ·...
Read more >Topic Tag: Event Title - WordPress.org
Topic Tag: Event Title · [Simple Calendar - Google Calendar Plugin] event-title in Full calendar grid only showing one line. Started by: evonne01...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you already got HTML in the title you could do something like this: