[tw] Re: [tw5] Introducing new text editor toolbar

2017-04-07 Thread Paul Boughner
Whats the process for adding a button to apply a highlight? 

I am currently using the stamp button to insert "@@ hl.ToDo" at the head, 
and "@@" to close it.

 @@ hl.ToDo -text- @@ 

I use this to tag things in journals and then use a list to search for that 
particular highlight. Which automagically gives me lists of ToDo, research, 
add to quiz, etc.

I would like to add a highlight button like the stamp button to choose the 
highlight.

On Monday, March 7, 2016 at 12:34:19 PM UTC-5, Jeremy Ruston wrote:
>
> I’m pleased to say that TiddlyWiki is finally getting an extensible rich 
> text editor toolbar in the core. There’s a preview you can try out here:
>
> http://rich-text-editor.tiddlyspot.com/
>
>
> The breakthrough was (re)-discovering how to avoid losing the selection 
> when clicking on one of the toolbar buttons. The solution turns out to be 
> as simple as embedding the textarea in an iframe. There are some 
> complexities stemming from the fact that the content of the iframe doesn’t 
> inherit the prevailing CSS styles.
>
> Anyhow, the code is complete enough to be usable. Besides the expected 
> formatting operations there are a couple of interesting additions:
>
> * An “excise” button that slices the selected text into a new tiddler and 
> replaces it with a link or transclusion to the new tiddler
> * A “stamp” button that brings up an extensible list of snippets that can 
> be selected with a single click
>
> It’s still a work in progress; the things left to are listed in the pull 
> request:
>
> https://github.com/Jermolene/TiddlyWiki5/pull/2315
>
> I’m interested in feedback on how well it works on different 
> browser/operating system combinations, but please feel free to post any 
> thoughts or questions too,
>
> Best wishes
>
> Jeremy.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8c483b32-3779-496b-a571-05819cee213b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [tw5] Introducing new text editor toolbar

2016-03-23 Thread Alain Dutech

Hello,

while I'm not a great fan of toolbars (I usually unview them), I must say 
that Jeremy did a great and nice work. And this will greatly enhance people 
usablility of TW5.

Nevertheless, I even tried to add "my" completion popup window in this new 
text-iframe widget. (see http://snowgoon88.github.io/TW5-extendedit). In 
the "module" branch I modified the module so that it can be easily included 
to any textarea and I tried to add it to the text-iframe. But this poses 
problem within the iframe element...

1) if I create my "popup" div element alongside the this.iframeTextArea of 
the widget, the CSS rules are messed up because of the "new" document of 
the iframe. 
2) if I create my "popup" div element outside of the iframe, as a sibling 
of the this.dummyTextArea  of the widget, the popup looks fine but then the 
computation of the position of the popup is rather hard to compute (up to 
now).

Well... Anyone knows how I could somehow transfer the CSS definition of my 
popup elements so that they apply and are reconised inside the "#document" 
of the iframe ?? That would help me a lot.
Is this the purpose of the following lines in the widget ? No other way 
around ?

// Copy the styles from the dummy textarea
var textAreaStyles = window.getComputedStyle(this.dummyTextArea,null),
styleText = [];
$tw.utils.each(textAreaStyles,function(name,index) {
styleText.push(name + ": " + textAreaStyles[name] + ";");
});
this.iframeTextArea.style.cssText = styleText.join("");
this.iframeTextArea.style.display = "block";
this.iframeTextArea.style.width = "100%";


Again, "bravo" and nice job.
Alain
PS : my plan would be to be able to also "stamp" by using a slight 
deviation of the completion popup...


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7c9db70f-65ca-44f3-b324-d9065ca3e749%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [tw5] Introducing new text editor toolbar

2016-03-10 Thread 'Mark S.' via TiddlyWiki
Hi Scott,

How do you activate this feature?

Thanks,
Mark


On Thursday, March 10, 2016 at 10:42:52 AM UTC-8, Scott Simmons (Secret-HQ) 
wrote:
>
> On Wednesday, March 9, 2016 at 6:17:49 PM UTC-5, Mark S. wrote:
>
> The problem with a toolbar connected with the tiddler is that the tools 
>> quickly get scrolled away as the text gets longer.  If the toolbar was in 
>> the sidebar, then the tools would be still available as one writes.
>>
>
> There's a still-experimental feature in TW5 to make the titles of tiddlers 
> "stick" to the top of the screen as you scroll down. Unfortunately, it only 
> works in *some* browsers — but if this could ever become a universal 
> feature, I think it would be handy to make it available for the formatting 
> bar, too — so that, as you scroll down the page, the bar always remains 
> visible on the screen.
>
> An alternative might be to wrap the bar in a CSS class and make is 
> user-configurable for the bar to have a fixed position (*position:fixed; 
> margin-top:0;* or *position:fixed; margin-bottom:0;*).
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b8c1524e-3d64-4eec-8665-98005697fc0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [tw5] Introducing new text editor toolbar

2016-03-07 Thread Eric Shulman
On Monday, March 7, 2016 at 9:13:22 PM UTC-8, Mark S. wrote:
>
> Hi Eric,
>
> Thanks for your explainer. But there's something wrong with your macro 
> definition. It seems to want the tiddler= attribute rather than the 
> combined field=tiddler!!field. 
>

oops... yes.  tiddler="""$tid$""" field="!!caption"
 

> Also, is the idea that only the caption OR the title shows up? I could fix 
> it, but it would show both caption and title when both were available. 
>

The way the <$view> is *nested*, it will show the caption field if it 
exists, OR the title field if no caption field exists but not both.

It's a basic database design requirement that key linking fields be 
> immutable. Title fields should float on top of the data independently so 
> they can be freely altered as the use case is refined. I guess if I was 
> going to depend on a macro solution I would want one that would create 
> links based on a separate id field. But I suppose the link macro would have 
> to do some sort of expensive field search so ... I don't know.
>

If the "title" field was named "ID", and the "caption" field was named 
"title", you would have what you want, without having to implement 
completely separate handling for a custom ID field.

-e

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0948cec1-c258-4e6c-9b66-ec376e815639%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [tw5] Introducing new text editor toolbar

2016-03-07 Thread 'Mark S.' via TiddlyWiki
Hi Eric,

Thanks for your explainer. But there's something wrong with your macro 
definition. It seems to want the tiddler= attribute rather than the 
combined field=tiddler!!field. 

Also, is the idea that only the caption OR the title shows up? I could fix 
it, but it would show both caption and title when both were available. 

I don't suppose there's a simple way to make a macro that can do if/else 
choices? 

It's a basic database design requirement that key linking fields be 
immutable. Title fields should float on top of the data independently so 
they can be freely altered as the use case is refined. I guess if I was 
going to depend on a macro solution I would want one that would create 
links based on a separate id field. But I suppose the link macro would have 
to do some sort of expensive field search so ... I don't know.

Thanks!
Mark
 



On Monday, March 7, 2016 at 11:30:00 AM UTC-8, Eric Shulman wrote:
>
> On Monday, March 7, 2016 at 10:16:51 AM UTC-8, Mark S. wrote:
>>
>> The little arrow buttons give an NS_ERROR_FAILURE message.
>>
>> The problem with linking/transcluding via titles is that then you either 
>> have to stick with that title forever or be willing to go back and edit all 
>> the places it is referenced. I often find myself wanting to change a title 
>> -- sometimes the muse just isn't there when you're doing your first draft. 
>> As a consequence, I rarely use the linking feature.  It would be useful if 
>> there were a way to link via some ID field which would never have to change.
>>
>
> Use of a special "unique tiddler ID" field has been suggested many times, 
> for both TiddlyWiki Classic and TiddlyWiki5.  Typically, after much 
> discussion of alternative architectures and backward compatibility, we 
> generally come back to the fact that TiddlyWiki already has a field that 
> holds a unique ID for each tiddler: the *title* field, and that what is 
> really being discussed is a distinction between a tiddler's ID and the 
> title that people see.
>
> In TiddlyWiki5, the "caption" field can be used to provide that 
> distinction.  For example, in the <> or <> macros, if a tiddler 
> has a caption field, then that text is displayed as the tab title or table 
> toc link text, respectively.  Note that this is simply a TW core standard 
> *convention*.  There is no requirement for a tiddler to have a caption 
> field and, by default, only some of the core functions use the caption 
> field.
>
> For your purposes, you could extend this default usage to display the 
> caption text in place of the title text, by modifying the 
> $:/core/ui/ViewTemplate/title shadow definition, and replace
> <$view field="title"/>
> with
> <$view field="caption"><$view field="title"/>
>
> For links, you could just use *pretty link syntax* to show the desired 
> text, while using the title "ID" as the link target:
> [[this is what the reader sees|TiddlerID]]
> or, alternatively, you could use a "caption link" macro to assemble a link 
> using the target tiddler's caption text, like this:
> \define clink(tid)
> <$link to="""$tid$"""><$view field="""$tid$!!caption"""><$view field=
> """$tid$!!title"""/>
> \end
> which you would invoke like this:
> <>
>
> There are probably some other places where you might want some 
> customizations, but once you have tweaked things to suit your needs, you 
> can just think to yourself "title = ID caption = display text".  Of 
> course, if you don't provide a caption on a given tiddler, everything 
> should fall back nicely to using the title text as the display text, just 
> as before.
>
> Hope this helps,
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios
> InsideTiddlyWiki: The Missing Manuals
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3372dd67-779b-48cf-bf08-b181d52648af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [tw5] Introducing new text editor toolbar

2016-03-07 Thread 'Mark S.' via TiddlyWiki
Suggestion for stamp: Add a 3rd possibility to do a transclusion AND a 
link. That way the user can quickly navigate back to the source snippet 
when changes are required.

Mark

On Monday, March 7, 2016 at 9:34:19 AM UTC-8, Jeremy Ruston wrote:
>
> I’m pleased to say that TiddlyWiki is finally getting an extensible rich 
> text editor toolbar in the core. There’s a preview you can try out here:
>
> http://rich-text-editor.tiddlyspot.com/
>
>
> The breakthrough was (re)-discovering how to avoid losing the selection 
> when clicking on one of the toolbar buttons. The solution turns out to be 
> as simple as embedding the textarea in an iframe. There are some 
> complexities stemming from the fact that the content of the iframe doesn’t 
> inherit the prevailing CSS styles.
>
> Anyhow, the code is complete enough to be usable. Besides the expected 
> formatting operations there are a couple of interesting additions:
>
> * An “excise” button that slices the selected text into a new tiddler and 
> replaces it with a link or transclusion to the new tiddler
> * A “stamp” button that brings up an extensible list of snippets that can 
> be selected with a single click
>
> It’s still a work in progress; the things left to are listed in the pull 
> request:
>
> https://github.com/Jermolene/TiddlyWiki5/pull/2315
>
> I’m interested in feedback on how well it works on different 
> browser/operating system combinations, but please feel free to post any 
> thoughts or questions too,
>
> Best wishes
>
> Jeremy.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a539c58c-4bde-48e6-a702-8d8c1bba9904%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: [tw5] Introducing new text editor toolbar

2016-03-07 Thread andrew harrison
This is so awesome. Not to take away anything because this is so awesome,
but it would be nice if I could remove or add buttons like from a toolbar
in the control panel.

On Mon, Mar 7, 2016 at 1:02 PM, Jeremy Ruston 
wrote:

> Hi Sylvain
>
> > Maybe can you add a title to detail with a label on mouse over ?
>
> That is the plan, as part of the internationalisation that I also need to
> do. I’ve updated the checklist:
>
> https://github.com/Jermolene/TiddlyWiki5/pull/2315
>
> Best wishes
>
> Jeremy.
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/31B2757E-F001-4B97-BEB5-0CFB1727FF4E%40gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAL0r7zvCucBXsKF5GSbpGgCw_05Uk%2BPoZfhkVY8u638mG9v_Og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: [tw5] Introducing new text editor toolbar

2016-03-07 Thread Jeremy Ruston
Hi Sylvain

> Maybe can you add a title to detail with a label on mouse over ?

That is the plan, as part of the internationalisation that I also need to do. 
I’ve updated the checklist:

https://github.com/Jermolene/TiddlyWiki5/pull/2315

Best wishes

Jeremy.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/31B2757E-F001-4B97-BEB5-0CFB1727FF4E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [tw5] Introducing new text editor toolbar

2016-03-07 Thread Sylvain Naudin
I'm so happy :)
Thank you Jeremy for this nice feature which help many new users !!

Maybe can you add a title to detail with a label on mouse over ?


Cheers,
Sylvain


Le lundi 7 mars 2016 18:34:19 UTC+1, Jeremy Ruston a écrit :
>
> I’m pleased to say that TiddlyWiki is finally getting an extensible rich 
> text editor toolbar in the core. There’s a preview you can try out here:
>
> http://rich-text-editor.tiddlyspot.com/
>
>
> The breakthrough was (re)-discovering how to avoid losing the selection 
> when clicking on one of the toolbar buttons. The solution turns out to be 
> as simple as embedding the textarea in an iframe. There are some 
> complexities stemming from the fact that the content of the iframe doesn’t 
> inherit the prevailing CSS styles.
>
> Anyhow, the code is complete enough to be usable. Besides the expected 
> formatting operations there are a couple of interesting additions:
>
> * An “excise” button that slices the selected text into a new tiddler and 
> replaces it with a link or transclusion to the new tiddler
> * A “stamp” button that brings up an extensible list of snippets that can 
> be selected with a single click
>
> It’s still a work in progress; the things left to are listed in the pull 
> request:
>
> https://github.com/Jermolene/TiddlyWiki5/pull/2315
>
> I’m interested in feedback on how well it works on different 
> browser/operating system combinations, but please feel free to post any 
> thoughts or questions too,
>
> Best wishes
>
> Jeremy.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/60c89390-6590-47fe-9a0c-1839ba10e4a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [tw5] Introducing new text editor toolbar

2016-03-07 Thread Eric Shulman
On Monday, March 7, 2016 at 10:16:51 AM UTC-8, Mark S. wrote:
>
> The little arrow buttons give an NS_ERROR_FAILURE message.
>
> The problem with linking/transcluding via titles is that then you either 
> have to stick with that title forever or be willing to go back and edit all 
> the places it is referenced. I often find myself wanting to change a title 
> -- sometimes the muse just isn't there when you're doing your first draft. 
> As a consequence, I rarely use the linking feature.  It would be useful if 
> there were a way to link via some ID field which would never have to change.
>

Use of a special "unique tiddler ID" field has been suggested many times, 
for both TiddlyWiki Classic and TiddlyWiki5.  Typically, after much 
discussion of alternative architectures and backward compatibility, we 
generally come back to the fact that TiddlyWiki already has a field that 
holds a unique ID for each tiddler: the *title* field, and that what is 
really being discussed is a distinction between a tiddler's ID and the 
title that people see.

In TiddlyWiki5, the "caption" field can be used to provide that 
distinction.  For example, in the <> or <> macros, if a tiddler 
has a caption field, then that text is displayed as the tab title or table 
toc link text, respectively.  Note that this is simply a TW core standard 
*convention*.  There is no requirement for a tiddler to have a caption 
field and, by default, only some of the core functions use the caption 
field.

For your purposes, you could extend this default usage to display the 
caption text in place of the title text, by modifying the 
$:/core/ui/ViewTemplate/title shadow definition, and replace
<$view field="title"/>
with
<$view field="caption"><$view field="title"/>

For links, you could just use *pretty link syntax* to show the desired 
text, while using the title "ID" as the link target:
[[this is what the reader sees|TiddlerID]]
or, alternatively, you could use a "caption link" macro to assemble a link 
using the target tiddler's caption text, like this:
\define clink(tid)
<$link to="""$tid$"""><$view field="""$tid$!!caption"""><$view field=
"""$tid$!!title"""/>
\end
which you would invoke like this:
<>

There are probably some other places where you might want some 
customizations, but once you have tweaked things to suit your needs, you 
can just think to yourself "title = ID caption = display text".  Of 
course, if you don't provide a caption on a given tiddler, everything 
should fall back nicely to using the title text as the display text, just 
as before.

Hope this helps,

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
InsideTiddlyWiki: The Missing Manuals

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/07b9f9f8-890b-4a9a-94d7-a9c3e08108c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: [tw5] Introducing new text editor toolbar

2016-03-07 Thread 'Mark S.' via TiddlyWiki
The little arrow buttons give an NS_ERROR_FAILURE message.

The problem with linking/transcluding via titles is that then you either 
have to stick with that title forever or be willing to go back and edit all 
the places it is referenced. I often find myself wanting to change a title 
-- sometimes the muse just isn't there when you're doing your first draft. 
As a consequence, I rarely use the linking feature.  It would be useful if 
there were a way to link via some ID field which would never have to change.

Mark

Pale Moon Version: 25.8.1 (x86)
Firefox 33
Windows 7

On Monday, March 7, 2016 at 9:34:19 AM UTC-8, Jeremy Ruston wrote:
>
> I’m pleased to say that TiddlyWiki is finally getting an extensible rich 
> text editor toolbar in the core. There’s a preview you can try out here:
>
> http://rich-text-editor.tiddlyspot.com/
>
>
> The breakthrough was (re)-discovering how to avoid losing the selection 
> when clicking on one of the toolbar buttons. The solution turns out to be 
> as simple as embedding the textarea in an iframe. There are some 
> complexities stemming from the fact that the content of the iframe doesn’t 
> inherit the prevailing CSS styles.
>
> Anyhow, the code is complete enough to be usable. Besides the expected 
> formatting operations there are a couple of interesting additions:
>
> * An “excise” button that slices the selected text into a new tiddler and 
> replaces it with a link or transclusion to the new tiddler
> * A “stamp” button that brings up an extensible list of snippets that can 
> be selected with a single click
>
> It’s still a work in progress; the things left to are listed in the pull 
> request:
>
> https://github.com/Jermolene/TiddlyWiki5/pull/2315
>
> I’m interested in feedback on how well it works on different 
> browser/operating system combinations, but please feel free to post any 
> thoughts or questions too,
>
> Best wishes
>
> Jeremy.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/85abdba9-7fee-4e39-b80a-8e40c86a8fe4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.