The most flexable way of doing a dropcap is just to use the span style in the text manually, but this may be awkward...so I figured it might be better to make it a plugin....but maybe not.
Here is the question... should something like a "First Letter Drop Cap" be a part of the "style" and not require an article editor to enter it? If so, I guess a plugin lile the nl2br one that just automatically turns the first alpha character into a dropcap makes sense...but might not be dered in all cases...
Alternately, is this situation more like a "markup"? For example (as a quick test) I added the line:
Code: Select all
'/(?<!\\\\)\[dropcap(?::\w+)?\](.*?)\[\/dropcap(?::\w+)?\]/si' => "<span style=\"float:left;font-size:80px;line-height:50px;padding-top:2px;font-family: Times,serif,Georgia;opacity: 0.75;\">\\1</span>",
into the serendipity_event_bbcode plugin as a test. This lets an article author put in a dropcap anywhere they want by using [dropcap]L[dropcap].
Does this approach make more sense (not necessarily in the BBCode plugin...I just used that for a test)?
Lastly, what is the purpose of the s9y markup plugin? Does it provide markup that other types don't? (can't locate a document on it). Would this be the most sensible place to "extend" markups?
Alternately, would a content_rewrite that supports regexp be too dangerous? Then one could easily define any type of markup rewrite from the backend-admin.