jquery - How to use css formatting in Full Calendar JSON string being passed from PHP page?
one text
I would like to format the title element of my calendar element, to take a new line and add the part I specify as bold. I have the following PHP page which is where I am passing the event data to the calendar which is all working ok.
$deliveryDateArray[] = array(
'mainID' => $row["orderMainID"],
'id' => $row["orderBuildandDeliveryID"],
'title' => $row["lastName"] . " (" . $row["postcode"] . ") | " . $row["productName"] . $insulation2." || ".$materials,
'start' => $row["deliveryDate"],
'url' => 'orderViewSort.php?orderID=' . $row["orderMainID"],
'color' => $color,
'materials' => $insulation
);
echo json_encode($deliveryDateArray);
I have tried adding "<'b'>" and "</br" in front of it but if I do that it will just echo the full string out with the in the event name.
For reference this is how the title is getting applied to the calendar
var calendar = $('#calendar').fullCalendar({
editable:true,
header:{
left:'prev,next today',
center:'title',
right:'month,agendaWeek',
},
editable: true,
droppable: true,
events: 'LoadAllTeams.php'
Is there any way I can do this?
EDIT I added the "\n" which brought the page break through, but not sure how to bring the bold through for a specific part of the title string.
'title' => $row["lastName"] . " (" . $row["postcode"] . ") | " . $row["productName"] . $insulation2." ||\n ".$materials
Thanks.
Source