Posted by rwohleb on February 27, 2009 at 9:07pm
| Project: | Annotation |
| Version: | master |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Jody Lynn |
| Status: | needs work |
Issue Summary
The filter system doesn't support passing contexts. I've hacked away to do this, but it's not ideal. Investigate if we can just do something with nodeapi.
Comments
#1
Is this sane?
Lorem ipsum dolor sit amet.</p><p>Consectetur <em>adipisicing</em> elit.is two regions.Stripping all HTML tags, get the instance number of the selection's text, in case the same text occurs multiple times.
This makes text editable and handles filter reconfigurations. It does break if filters insert non-HTML text or if the HTML filter takes out the span tags, but I think those are problems anyway. It requires no PHP processing on output. The spans may get a bit stacked, but all that needs to be done is go through clicked span's parents and find the associated comments.
#2
http://drupal.org/node/368409
#3
#4
Hello,
I am using this module, and I extended it in order to support cck fields. Unfortunately the only way i managed to do it was by hacking cck, adding a function call in content.module before the sanitize operation of each fields.
Does anyone have an idea how can we correctly allow the filter to understand to which field is it being applied?
Thanks
Hernani
#5
I haven't touched the annotation code in a while so I'm changing the assignment on this ticket.
#6
#7
This patch switches from abuse of the filter system to use of straight node_load. Seems to work fine and lets annotations survive node editing, but needs more thorough testing.
#8
This one also carries annotations across editing including new revisions.
#9
Minor improvement since last patch, to ensure only the spans added by annotation are removed from node bodies after edit.
#10
Committed.
#11
As a cleanup for upgrading sites, we also should remove the old HTML comments (they can break teaser handling). We need an update function to truly clean that up, but as a quick fix this works:
/**
* Add the annotations to the text.
*/
function annotation_text_add_markup($text, $node, $teaser = FALSE) {
// Remove any old annotations html comments that are lingering from older
// version of annotations.
$text = str_replace('', '', $text);