I noticed that if I tried to add links or other formatting, Drop Cap removes all those if a Drop Cap is applied. This is because in dropcap.js on line 10 it takes the text with

var text = $(this).text();

and then adds all but the first letter to $paragraph in line 19:

$paragraph.html( text.slice(1) );

.text() removes all the formatting. I understand that while this is necessary to get only the first letter, but this function limits the ability to use this module.

Maybe one option could be to use drop cap as an input format? This would give it the possibility to strip html temporarily (I think?).

Comments

afox’s picture

input format = input filter of course.

lefnire’s picture

Crap, good find :s Short-term solution I'm trying to figure out some regex to replace the first letter, rather than this split/slice on text() business. Long-term solution, you're right about input filters -- that would probably be the better approach

glass.dimly’s picture

Version: 6.x-1.1 » 7.x-2.0-alpha2
Issue summary: View changes
Status: Active » Closed (fixed)

This is fixed in the 7x branch.