Hi, does Linodef support anchors for the node links [#NID] ?

Comments

Roi Danton’s picture

Title: node link anchor » Add option "attributes" to allow html attributes in embedded tags
Version: 6.x-1.0-rc3 » 6.x-1.x-dev
Component: Code (general) » Filter
Category: support » feature

Currently not. This functionality could be added by using an option to add html attributes to tags (like done in l()). Though the code is easy to write I'm focused on taglist UI/wysiwyg API support. So I'm happy about patches against dev release (easier option handling than in RC3) to add this option.

guillaumeduveau’s picture

Thank you Roi, it's what I thought. I currently have no time for this, maybe later with other features too, but you can count on me to test WYSIWYG API support as soon as you release the code.

Roi Danton’s picture

StatusFileSize
new9.31 KB

With this patch Linodef adds attributes to existing opening tags in the embedded content (e.g. div, img) or if non are present it surrounds the content with new tags that incorporates the attributes.

E.g. [#101:field_image,attributes="style='border: 1px solid #000;' title='an imagefield image with additional attributes'"]
will output
<img style="border: 1px solid #000;" title="an imagefield image with additional attributes" class="imagefield imagefield-field_image" height="000" width="000" src="path" alt="alt" />

Roi Danton’s picture

Status: Active » Needs review
StatusFileSize
new9.51 KB

Patch contained a wrong function.

Roi Danton’s picture

Status: Needs review » Fixed
guillaumeduveau’s picture

Hehe nice thanks man :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Michsk’s picture

This does not work with FCKeditor and CKeditor. They change the apostrophe toe
&#39;
I used

$body = str_replace("&#39;", "'", $body);

on line 26, that worked for me.

Also see: http://drupal.org/node/708158