You are not logged in.
Pages: 1
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
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
Pages: 1