Needs work
Project:
Annotation
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
27 Feb 2009 at 21:07 UTC
Updated:
12 Dec 2013 at 02:38 UTC
Jump to comment: Most recent, Most recent file
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.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 386190-9.patch | 17.07 KB | jody lynn |
| #8 | annotations-through-revisions.patch | 17.07 KB | jody lynn |
| #7 | 386190.patch | 14.36 KB | jody lynn |
Comments
Comment #1
drummIs 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.
Comment #2
drummhttp://drupal.org/node/368409
Comment #3
drummComment #4
hernani commentedHello,
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
Comment #5
rwohlebI haven't touched the annotation code in a while so I'm changing the assignment on this ticket.
Comment #6
jody lynnComment #7
jody lynnThis 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.
Comment #8
jody lynnThis one also carries annotations across editing including new revisions.
Comment #9
jody lynnMinor improvement since last patch, to ensure only the spans added by annotation are removed from node bodies after edit.
Comment #10
jody lynnCommitted.
Comment #11
jody lynnAs 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);
Comment #12
BrockBoland commented