Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2009-10-28 11:25:08

dlublink
Xinha Community Member
Registered: 2006-05-15
Posts: 10

Drag and drop clumping

Hey all,


dlublink@dev:~/xinha$ svn info
Path: .
URL: http://svn.xinha.webfactional.com/trunk
Repository Root: http://svn.xinha.webfactional.com
Repository UUID: bdcdd039-d5ef-0310-875c-f7949af66bfe
Revision: 1191
Node Kind: directory
Schedule: normal
Last Changed Author: ray
Last Changed Rev: 1190
Last Changed Date: 2009-07-17 06:13:24 -0400 (Fri, 17 Jul 2009)

I am trying to use Xinha to allow my users to setup the page layout of their articles and stuff. So I put a lorem ipsum in the page, a few bogus images, title, date and author. The user than moves around the different elements ( can remove some if (s)he wants). Once this is done, they save it.

When I generate the page, I search for the classes that I had inserted in the dummy text, and replace the text between the tags.

Example :

<span class="the_title">A bogus title</span><p class="article_body">Lorem ipsum....</p>

becomes :

<span>Title of article</span><p>Body of article</p>.

My difficulty is that I need to control the dragging/dropping/editing, if the user highlights "bogus" and moves it somewhere else, I need for the entire text and surrounding tags to move with it. Same thing if they put italics, bold or underline, it needs to apply to the entire span.

Any ideas how to do this ? I thought about putting images, but than it breaks the capabilities of xinha!

Thanks!

David

Last edited by dlublink (2009-10-28 11:25:36)

Offline

#2 2009-11-10 09:27:04

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Drag and drop clumping

You would need to write a plugin to detect such changes and, if it's possible at all, use the methods like getAllAncestors() to determine where you should insert nodes.

In short.  Hard.


James Sleeman

Offline

Board footer

Powered by FluxBB