Skip to content

Commit 49dc982

Browse files
committed
[update] event_text article
Modernize template example and clean text template details
1 parent e762d49 commit 49dc982

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

docs/api/template/event_text.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,19 @@ description: "specifies the event's text"
1414

1515
### Parameters
1616

17-
- `start` - (required) *Date* - the date when an event is scheduled to begin
17+
- `start` - (required) *Date* - the date when an event is scheduled to begin
1818
- `end` - (required) *Date* - the date when an event is scheduled to be completed
1919
- `event` - (required) *object* - the event object
2020

2121
### Returns
22-
- ` text` - (string) - html text for rendering in the scheduler
22+
- `text` - (string) - HTML text for rendering in the Scheduler
2323

2424
### Example
2525

2626
~~~jsx
27-
scheduler.templates.event_text=function(start, end, event){
28-
return "<a href='http://some.com/details.php?for="+event.id+"'>"
29-
+event.text+"</a>";
30-
}
27+
scheduler.templates.event_text = (start, end, event) => {
28+
return `<a href='http://some.com/details.php?for=${event.id}'>${event.text}</a>`;
29+
};
3130
~~~
3231

3332
**Applicable views:** [Day view](views/day.md), [Week view](views/week.md), [Units view](views/units.md)
@@ -37,7 +36,7 @@ scheduler.templates.event_text=function(start, end, event){
3736

3837
### Details
3938

40-
Note that for Month and Timeline Views you need to use the [event_bar_text](api/template/event_bar_text.md) template to specify the event's text.
39+
Note that for Month and Timeline views you need to use the [`event_bar_text`](api/template/event_bar_text.md) template to specify the event's text.
4140

4241
### Related Guides
4342
- [Day View Templates](views/day-view-templates.md)

0 commit comments

Comments
 (0)