Question about EditSectionPlugin

41 views
Skip to first unread message

axelm

unread,
Jun 27, 2011, 5:17:00 PM6/27/11
to tiddl...@googlegroups.com
Hello all,
I have the "http://www.TiddlyTools.com/#EditSectionPlugin" installed and this in a tiddler:

<<editSection [[My Notes]]>>
!!!!!My Notes
some text
!!!!!


It renders like this:

"edit section...
My Notes
some text

"

How can I have it just display the text I entered, ie; "some text"

I don't want:
(1) The empty line between "edit section.." and "My Notes"
(2) The text "My Notes"
(3) The empty line after "some text"

any help will be appreciated,

axelm

Eric Shulman

unread,
Jun 27, 2011, 6:00:58 PM6/27/11
to TiddlyWiki
> <<editSection [[My Notes]]>>
> !!!!!My Notes
> some text
> !!!!!

> How can I have it just display the text I entered, ie; "some text"
>
> I don't want:
> (1) The empty line between "edit section.." and "My Notes"
> (2) The text "My Notes"
> (3) The empty line after "some text"

You need to create a "hidden section" by using TW comment markers (/%
and %/). The enclosing /% and %/ prevent TW from *rendering* the
hidden section, but it will still be recognized as a data source for
section references.

You also need to correctly refer to the section within the current
tiddler:
* [[Some Name]] is a reference to a separate, stand-alone tiddler
* [[TiddlerName##SectionName]]" is a reference to a section within a
given tiddler.

For convenience, EditSectionPlugin supports an abbreviated form of
section reference that *implies* the current tiddler title:
"[[##SectionName]]". This makes it easy to rename the containing
tiddler, (or copy the content to another tiddler), without having to
edit the macro parameter to change the referenced tiddler title.
Thus:

<<editSection [[##MyNotes]]>>/%
!!!!!My Notes
some text
!!!!!
%/

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
----------
Was this answer useful? If so, please help support TiddlyTools:

TiddlyTools direct contributions: (paypal)
http://www.TiddlyTools.com/#Donate
UnaMesa tax-deductible contributions:
http://about.unamesa.org/Participate (paypal)
TiddlyWiki consulting:
http://www.TiddlyTools.com/#ELSDesignStudios
http://www.TiddlyTools.com/#Contact

axelm

unread,
Jun 27, 2011, 7:17:30 PM6/27/11
to tiddl...@googlegroups.com
Hello Eric,

I put this in a tiddler like you said:

<<editSection [[##MyNotes]]>>/%
!!!!!My Notes%/
some text
!!!!!

I put the "%/" behind the "My Notes"
but now, when I want to edit, the edit panel comes up empty and I can't save any text that I put into it.

axelm

axelm

unread,
Jun 27, 2011, 7:29:17 PM6/27/11
to tiddl...@googlegroups.com
Never mind, this works:

<<editSection [[##My Notes]]>>/%
!!!!!My Notes
%/
some text
/%
!!!!!%/

Now the only minor problem is, in the edit panel the "/%" and "%/" show up like this:

%/
some text
/%

axelm

Eric Shulman

unread,
Jun 27, 2011, 8:03:12 PM6/27/11
to TiddlyWiki

Why did you put comment markers INSIDE the section content? That
makes no sense. As I previously indicated in my example, the *entire
section* is surrounded by the comment markers. In fact, you *cannot*
use comment markers inside the hidden section content, because TW
comments don't "nest". As a result, any comment markers within the
content would break the surrounding comment that is hiding the
section, causing part of the hidden section to become visible when the
tiddler is rendered.

Also, as a side note: there's no need to use multiple "!" to specify
the section delimiters. You can use a single "!" for the section
start and a single "!" for the section end.

The following syntax -- exactly as indicated -- will work as desired:
----
<<editSection [[##My Notes]]>>/%
!My Notes
some text
!%/
----

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Was this answer useful? If so, please help support TiddlyTools:
http://www.TiddlyTools.com/#Donate
TiddlyWiki consulting services:
http://www.TiddlyTools.com/#ELSDesignStudios
http://www.TiddlyTools.com/#Contact

axelm

unread,
Jun 27, 2011, 8:11:20 PM6/27/11
to tiddl...@googlegroups.com
But I wanted the text "some text" to show, just not the header.

axelm


Eric Shulman

unread,
Jun 27, 2011, 8:25:27 PM6/27/11
to TiddlyWiki
Addendum:

upon careful re-reading of your OP, you want to *display* the section
content inline, just without rendering the surrounding section
delimiters. This can be done by embedding a <<tiddler>> macro
following the <<editSection>> macro, like this:

----
<<editSection [[##My Notes]]>><<tiddler [[##My Notes]]>>/%
!My Notes
some text
!%/
----

Note: By default, the TWCore <<tiddler>> macro doesn't know how to
process the abbreviated [[##sectionname]] syntax, and will blindly
treat it as a literal tiddler named "##sectionname", rather than a
reference to a section of the current tiddler.

Currently, to add the abbreviated syntax handling to the <<tiddler>>
macro, you can install either of these plugins:
http://www.TiddlyTools.com/#SectionLinksPlugin
http://www.TiddlyTools.com/#PasteUpPlugin

I'm also considering adding the same extension to the <<tiddler>>
handler directly into EditSectionPlugin, so that you won't need to
install another plugin to get support for "intra-tiddler section
references".

However, in the long run, I think that this feature would best be
added directly to the TWCore and applied to handlers for <<tiddler>>,
<<tabs>>, <<slider>>, etc., so that hidden sections can easily be used
to embed sliders or tabsets that are stored in the same tiddler,
rather than needing separate tiddlers to define the content of each
slider/tab.

your thoughts?

-e

axelm

unread,
Jun 27, 2011, 9:11:28 PM6/27/11
to tiddl...@googlegroups.com
Yes, that is kind of "double mubble".
But that works great now, exactly how I wanted it, totally "inline".
Looks great, and people can edit certain parts of a tiddler without having to go into edit mode.
When you go into edit mode everything is selected!
My wife managed on several occasions to press a key after going into edit mode and delete all!
Backups are great too.

Thank you very much for your help Eric.

Actually come to think of it, one more thing:
When you click on the "edit section..." button, the edit panel comes up, but nothing is selected. You have to click again and then everything is selected.
How can I change it so that the cursor would be placed at the end as soon as the panel opens? It must have something to do with this:

onfocus="this.select()"

just guessing...

axelm


axelm

unread,
Jun 29, 2011, 2:07:21 PM6/29/11
to tiddl...@googlegroups.com
Also a question for Eric:

How can I change the font in the edit panel?

I tried several ways, but it doesn't want to change.

thank you,

axelm


axelm

unread,
Jul 5, 2011, 4:42:30 PM7/5/11
to tiddl...@googlegroups.com
Hello All,

I have the http://www.TiddlyTools.com/#EditSectionPlugin installed.

Can someone tell me how to change the font type and size in the editor panel ? I have tried with the help of FireBug but no luck.


much appreciated,

axelm

Reply all
Reply to author
Forward
0 new messages