Closed franck-thorck closed 1 month ago
Hello, did you get it to work?
Not to 100% I understand that I needed to add it to the toolbar directly in the config in Craft CMS for CKEditor. So now I have the button in the toolbar, but I'm not able to display it correctly on frontend.
The old code was only: {{ entry.publicationContenu|parseFootnoteMarkers }}
When I checked the documentation I saw that the entry or the block need to have a field for footernotes right ?
You have to provide your actual footnotes before you can parse text for markers.
There’s a direct setter setFootnoteDefinitions
, which works well for structured data like from a table field. Or you parse notes from a text / rich text field using parseFootnoteDefinitions
. You then have to make sure you configure the expected syntax in a footnotes.php config file.
Everything is good but I have this error:
carlcs\footnote\services\Footnotes::parseMarkers(): Argument #1 ($str) must be of type string, null given, called in
Finally fix it the CKEditor field returns null if the field is empty, I set by default empty
Ah! This is something parseMarkers() should probably take care of. I’ve taken a note and will add that in with the next update. Thanks for the feedback!
Hi,
I migrated a project from Craft CMS 4 to 5, and before to upgrade to version 5, I migrated all my redactor fields and configs into CKEditor fields and config.
I already had the Footnote plugin with Redactor and everything worked fine, and now with CKEditor I'm not able to enable the plugin and config in CKEditor config. When I add this following code in my CKEditor config in Craft CMS, the footnote toolbar item not display.
"footnote": { "footnoteAddAfter": "lists" },