Re: custom edit widget

espen <[email protected]> Mon, 8 Jun 2015 07:46:30 -0700 (MST)
Newsgroups gmane.comp.web.zope.plone.user
Message-ID <[email protected]>
Hi and thanks for your suggestion

8. juni 2015 kl. 12:43 skrev Jean Jordaan [via Plone] <ml-node+s293351n7573963h6-PKuAHvtXa09l57MIdRCFDg@public.gmane.org>:

> On Thu, Jun 4, 2015 at 6:44 PM, Espen Moe-Nilssen <[hidden email]> wrote:
> 
> > Hi 
> > 
> > How difficult would it be to make a text widget that does the following: 
> > 
> > 1) Admin adds content 
> >    <*t(15,0,"1  ")><t-4>Some text here.<t$> 
> > 
> > 2) Editor edits it, for him/her it looks like 
> >   Some text here 
> > 
> > 3) The admin exports it to a text file that contains 
> >        <*t(15,0,"1  ")><t-4>Edited text here.<t$>
> 
> That reminds me of WordPerfect codes :-) 

the format dates back to ‘the early 90s, but they are actually Xpress Tags ( http://www.quark.com )
> 
> Plomino does something along these lines .. You edit richtext and format text 
> in certain styles. Upon export, the styles turn into this kind of XML: 
> 
> """ 
> <p>How many legs ? <span class="plominoFieldClass">legs</span> 
> </p> 
> """ 
> 
> The trick would be to prevent the Editor from messing things up by copying 
> things, adding line breaks, etc. Making the formatting visible (e.g. dotted box 
> outline) might help. 

I am considering doing this:
1) Have a search / replace that converts all codes to html comments
2) Then search replace (back) those comments that are similar to html codes
    (typically, this would be <B> <I> <$> (which is ‘all styles off)


3) On export: search replace ‘back’.

————

I think keeping it as Xpress Tags will be better than XML here, since this is about  books with several hundred pages

(As far as I know, I dont have support for kerning etc. when using XML here ( http://www.fonts.com/content/learning/fyti/using-type-tools/kerning-in-quarkxpress-and-indesign )



PS: If anyone has interest in ‘such things’, ping me and I will ‘tell you how it went’



Espen



--
View this message in context: http://plone.293351.n2.nabble.com/custom-edit-widget-tp7573950p7573964.html
Sent from the General Questions mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
Plone-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-users