Re: [tw] Re: Proposed change to HTMLFormattingPlugin (@Eric)

2012-07-27 Thread tiziano de togni

Il 26/07/2012 13:13, Eric Shulman ha scritto:


In any case, if you find that my alternative suggested usage as
described above would be acceptable for your purposes, and you can
wait a bit for me to write, test and publish some new code, then I
would be glad to add that functionality to the standard
HTMLFormattingPlugin.


Eric, thanks for your kind reply,

I agree that using a wiki tag instead of a new special-meaning CSS 
classname could be a good and clean alternative to my proposal (and good 
for my purposes), the change is pretty straightforward.


So, there's no need to wait, I see that you are busy with Tiddliwiky 
development, and I made it as my homework. Here is the revised code:

http://tizziano.altervista.org/files/myHTMLFormattingPlugin.txt

note: there is another slight change in my version. I made the formatter 
to wrap his content into a div element instead of span. The reason 
is that, as I understand, valid (X)HTML doesn't allow nesting block 
elements inside inline elements [1].


Really I don't realize why generic content is often nested in a span 
element, this happens also with the tiddler macro that I modified too.



[1] 
http://www.w3.org/community/webed/wiki/Your_first_web_site_Part_2_-_HTML_elements_in_detail#Block_versus_inline.3F_What_is_he_talking_about.3F


Best regards
--
tiziano de togni
__
http://tiziano.tiddlyspot.com

--
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.



[tw] Re: Proposed change to HTMLFormattingPlugin (@Eric)

2012-07-26 Thread Eric Shulman

 For me the main need in HTML formatting is the ability to insert
 internal links to other tiddlers, and secondly the ability to use some
 very selected macros that don't mess up the validity of HTML.
 So I modified the original plugin in order to wikify only the elements
 I need to be wikified (those marked with class=wikify).

 Since I use this modified version in a TiddlyWiki that I'm going to
 publish, I'm asking if you wish to update your plugin or how to proceed
 if my changes are not so good for you.

Currently, you can use a tag of nowiki within an HTML block to
completely disable parsing of TW-formatted content.  However, this is
accomplished in a very simple way: if the plugin detects the text
nowiki *anywhere* in the HTML content, it just bypasses the extra
'wikify' handling, so that only the browser's native HTML processing
is applied.

What you need for your use-case a bit more 'finely-grained' control,
to selectively enable/disable wikification within portions of the
HTML-syntax block.

Rather than introduce a new special-meaning CSS classname, I'm
inclined to extend the current usage of nowiki, so that it can be
paired with /nowiki.  Thus, you would be able to write something
like:

html
nowikithis content is just HTML syntax/nowiki
this line has a TiddlerName that is wikified (and thus, linked)
nowikiand this is more HTML syntax/nowiki
/html

of course, this is somewhat awkward syntax, so I'm also considering
support for wiki.../wiki syntax as well, which would let you
write the above more simply, as:

html
nowiki
this content is just HTML syntax
this has a wikiTiddlerName/wiki that is wikified (and thus,
linked)
and this is more HTML syntax
/nowiki
/html

With regard to publishing your modified plugin: you are free to do
so... however, you should read these two tiddlers first:
   http://www.tiddlytools.com/#LegalStatements
   http://www.tiddlytools.com/faq.html#FAQ_ModifyingTiddlyToolsPlugins

Basically, you need to *rename* the plugin tiddler so it is clearly
differentiated from the official TiddlyTools-distributed version.
You should also comment each line of code (or or at least each section
of code) that you have added and/or modified, so that the differences
between your altered version and the original TiddlyTools version can
be quickly identified.

In any case, if you find that my alternative suggested usage as
described above would be acceptable for your purposes, and you can
wait a bit for me to write, test and publish some new code, then I
would be glad to add that functionality to the standard
HTMLFormattingPlugin.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY TIP JAR...
   http://www.TiddlyTools.com/#Donations

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to tiddlywiki@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.