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

2016-03-29 Thread Jon
Hi Jeremy,

Noticed that a couple of the buttons have a different behaviour to the rest.

Pressing each of the buttons a 2nd time removes the formatting apart from 
those for monospaced and quotes.

Regards
Jon

On Monday, 28 March 2016 20:27:20 UTC+1, Alain Dutech wrote:
>
> About completion : Thank you for taking the time to answer me. I'll play 
> with both cases and see what comes out of the "stable" 5.12 release to, 
> then, finalize my approach.
> Alain 
>
> On Sat, Mar 26, 2016 at 7:18 PM, Jeremy Ruston  > wrote:
>
>> Hi Alain
>>
>> 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.
>>
>>
>> Thanks!
>>
>> 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).
>>
>>
>> I’d recommend option (2), mainly because I intend to refactor things so 
>> that the edit-text widget optionally wraps the textarea in an iframe, so 
>> your code will need to cope with both cases.
>>
>> 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 ?
>>
>>
>> Sadly, yes, this is the only working approach beyond replicating all the 
>> style definitions within the iframe. It’s not perfect though; for example, 
>> hover effects won’t get transferred. Anyhow, we maybe should refactor it 
>> into the dom utility module.
>>
>>
>> Again, "bravo" and nice job.
>>
>>
>> Thanks, and likewise with the autocompletion functionality, it’s great to 
>> have, and I hope I can help get it working well with the new toolbar stuff.
>>
>> Best wishes
>>
>> Jeremy
>>
>> 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+...@googlegroups.com .
>> To post to this group, send email to tiddl...@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.
>>
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "TiddlyWiki" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/tiddlywiki/6yUkcDzp7ko/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> tiddlywiki+...@googlegroups.com .
>> To post to this group, send email to tiddl...@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/CEC08DA3-47F7-46FC-9254-AF0638BBF36D%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/90c981f1-8fe8-4ec1-bb6c-74f3be500bcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-03-28 Thread Alain Dutech
About completion : Thank you for taking the time to answer me. I'll play
with both cases and see what comes out of the "stable" 5.12 release to,
then, finalize my approach.
Alain

On Sat, Mar 26, 2016 at 7:18 PM, Jeremy Ruston 
wrote:

> Hi Alain
>
> 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.
>
>
> Thanks!
>
> 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).
>
>
> I’d recommend option (2), mainly because I intend to refactor things so
> that the edit-text widget optionally wraps the textarea in an iframe, so
> your code will need to cope with both cases.
>
> 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 ?
>
>
> Sadly, yes, this is the only working approach beyond replicating all the
> style definitions within the iframe. It’s not perfect though; for example,
> hover effects won’t get transferred. Anyhow, we maybe should refactor it
> into the dom utility module.
>
>
> Again, "bravo" and nice job.
>
>
> Thanks, and likewise with the autocompletion functionality, it’s great to
> have, and I hope I can help get it working well with the new toolbar stuff.
>
> Best wishes
>
> Jeremy
>
> 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.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "TiddlyWiki" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywiki/6yUkcDzp7ko/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CEC08DA3-47F7-46FC-9254-AF0638BBF36D%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/CAFF9YEF57EMi3PwHrBmt_LMNjMCNvH8fJZMh2JN3MsA%3Dav%2B9%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-03-27 Thread Knut Franke
On Monday, March 21, 2016 at 10:28:49 PM UTC+1, Jeremy Ruston wrote:
>
> The others are harder. The trouble is that there are cases where one 
> wouldn’t want the extra line inserted, particularly if the preceding line 
> were another heading or list item. I’m not sure the best way to address it; 
> anyhow, the operation is implemented here:
>
>
> https://github.com/Jermolene/TiddlyWiki5/blob/text-editor/core/modules/editor-operations/text/prefix-lines.js
>

I see. At the moment, I don't have a good idea for how to solve this either.

I just downloaded a VM of Windows 10 with Edge for testing, and 
> interestingly, it seems that the toolbar buttons do work (including the 
> shortcuts), but the textarea updating is buggy - try using the toolbar with 
> the preview pane open to see what I mean. I’ll investigate further; perhaps 
> there’s some magic that will trigger the textarea to redisplay itself 
> correctly.
>

Ah, okay. Looks like another tricky issue. ;-)


Cheers,
Knut

-- 
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/bb8152e8-8ace-4d66-9bd3-0afb3276bf88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-03-26 Thread Jeremy Ruston
Hi Alain

> 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.

Thanks!

> 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).

I’d recommend option (2), mainly because I intend to refactor things so that 
the edit-text widget optionally wraps the textarea in an iframe, so your code 
will need to cope with both cases.

> 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 ?

Sadly, yes, this is the only working approach beyond replicating all the style 
definitions within the iframe. It’s not perfect though; for example, hover 
effects won’t get transferred. Anyhow, we maybe should refactor it into the dom 
utility module.
> 
> Again, "bravo" and nice job.

Thanks, and likewise with the autocompletion functionality, it’s great to have, 
and I hope I can help get it working well with the new toolbar stuff.

Best wishes

Jeremy

> 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 
> .

-- 
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/CEC08DA3-47F7-46FC-9254-AF0638BBF36D%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-03-26 Thread Jeremy Ruston
Hi Tryign It

> The Formating Bar is a great addition - especially the Excise button!

Thanks, glad you’re enjoying it.

> I think it would also be a good idea to include a tag bar below the 'tag with 
> current tiddler' to the excise button. 

That’s an interesting idea, and would perhaps make a good experiment for 
someone learning how these buttons work.

> Also - is there a way to modify the current Headings (change the colors, 
> size, etc)? Add more heading presets (H7, H8, H9, H10, etc.)?

To change the colours/size of the headings you’d need to change the theme or 
customise the CSS. HTML tags only go up to H6, although nowadays you could use 
custom elements and custom CSS to create additional headings if you needed to.

> 
> A feature that is tremendously useful in any text editing software is the 
> ability to 'fold' texts and also to move the folded text up/down.

The text editor in TW5 is still a basic HTML textarea, which doesn’t support 
things like folding. However, it is supported by CodeMirror, an open source 
library that provides an enhanced editor. CodeMirror is integrated with TW5 as 
a plugin, but I have yet to update the integration to work with the new toolbar 
buttons. Anyhow, you could certainly experiment with code folding once all of 
that was done.

> LibreOffiice for example has a feature of Ctrl+(arrow keys) - and you can 
> move a bullet up or down, indent it, etc - very easily. 

That could be done via a plugin, but I’d be cautious about overriding the 
underlying platform cursor handling.

> While I dont think that is within the scope of this release, would you ever 
> consider it in near future?

I’d certainly like to add features for easier manipulation of lists.

> Another great addition to the editor would be auto detection of all HEADINGS, 
> and creating a mini hierarchal outline of them on the side. This help the 
> user navigate the tiddler easily when editing.
> I also do not think that is within the scope of this particular release - but 
> maybe a consideration for future release? For reference, LibreOffice also has 
> such a feature. Tremendously useful

Again, that’s probably CodeMirror territory.

> Tables are a extreme hassle in any markdown/wiki language - 
> so currently I think transcluding an html tiddler with the table into the 
> main tiddler - edited via an external editor is the best option. But I can 
> not find such a solution to the text folding/moving…

One could imagine an “edit table” toolbar button that detected being within a 
table, and then displayed the table content in a grid of separate text boxes, 
like a spreadsheet, that one could tab between.

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/cc2988f8-a5f9-4d76-8c8d-ddff40930b6e%40googlegroups.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/1C119C6E-230C-49F7-BD84-8C5DA0AFCE85%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-03-14 Thread 'Stephen Kimmel' via TiddlyWiki
I'm obviously missing something but I can't make any of the new icons 
appear on the editor toolbar. They, and indeed everything besides H4, H5 
and H6, appear to be selected on the Control Panel Text Editor Toolbar 
section, but nothing I've tried makes them appear. 

What am I missing?

On Monday, March 14, 2016 at 4:15:55 PM UTC-5, Jeremy Ruston wrote:
>
> Thanks to everyone for the feedback - and particular congratulations to 
> Andrew Harrison for the “reduce” button. I’ve answered comments from Mat, 
> Knut and Stephen below.
>
> I’ve uploaded a bunch of new changes to GitHub and to the preview:
>
> * Improved bitmap editing functionality, including:
> ** selectable colours with a new reusable colour picker
> ** selectable painting width
> ** selectable opacity
> ** clear image to colour
> ** resize the image
> * New button for switching the text editor between automatic resizing and 
> a fixed height
>
> https://github.com/Jermolene/TiddlyWiki5/pull/2315
>
> http://rich-text-editor.tiddlyspot.com/
>
> > edit mode text toolbar could really be a general platform for 
> manipulating edit mode content, something that we have not really had thus 
> far.
>
> That is correct. The mechanism isn’t specific to wikitext. I plan to add 
> suitable buttons to the Markdown plugin, for example, and as you suggest, 
> the KaTeX and Railroad plugin could ship with it’s own toolbar buttons too.
>
> > Another valuable tool type would be a kind of fold/unfold, possibly 
> using the revealwidget and similar to Erics old NestedSlidersplugin (an 
> absolute favourite of mine in TWC); I.e select a text portion and click a 
> text editor tool to have the selection surrounded with the necessary reveal 
> mechanism. The resulting view mode button and the content text could be of 
> different kinds:
>
> You could build that button based on the existing “bold” button.
>
> > IMO to hide/reveal parts in content is very powerful concept for text 
> (hypertext?) - i.e for conveying a message with text in the most efficient 
> way. It lets you design a text that turns to readers of different levels in 
> a much(!) more elegant way than common hyperlinking does; instead of 
> jumping away from the text for more in-depth, it lets you access depth in 
> place. (One could even imagine a text where a reader fills in at what level 
> he wants the text - "summary", "overview", "in-depth but with highlighted 
> basic concepts"... - and this sets the depth for the reveals. Or the system 
> stores depth level from previous use and uses this as default.)
>
> The concept of “stretchtext” in classical hypertext is pretty close to 
> what you’re getting at:
>
> https://en.wikipedia.org/wiki/StretchText
>
> > Hide/reveal is IMO also generally underused in hypertext, probably 
> because there is no standard html construct for it. In TW we do have the 
> revealwidget but this is IMO much to complex to apply - compare it to the 
> simplicity in adding a link, or a transclusion.
>
> We have discussed before adding wikitext syntax for a hide/reveal pair, 
> it’s an interesting idea.
>
> > I might have missed it before or there is a new tool to the right of the 
> Redo button; it seems to be something to insert/control the vertical 
> distance between two sections (great idea). I don't get it to work though 
> (FF nor Chrome, win10) and the popup looks a bit rough with very airy 
> squares stating a pixel number.
>
> It was actually the embryonic control for setting the text editor height. 
> It’s fixed now.
>
> > On the matter of including the Rich text editor in core; I think it 
> should be in standard distro (as expected by newcomers!) but maybe now is a 
> good time to introduce a more advanced edition without pretty stuff.
>
> It would be quite surprising if the “advanced” edition had less stuff in 
> it than the “standard” one! But I get what you mean.
> <:-)
>
> > I think pushing the inline markup buttons with no text selected should 
> insert start/end markers (which they do) and then position the cursor in a 
> suitable position for immediately entering bold/strikethrough/... text 
> (instead of selecting the inserted markup). Same for ordered/unordered 
> lists and headings when the cursor is on an empty line.
>
> I agree, and plan to do just that.
>
> > When the cursor is at the end of a line (with no selection), block 
> markup buttons behave differently than when the cursor is anywhere else on 
> the same line. This may be confusing.
>
> > If some text in the middle of a paragraph is selected, the block markup 
> (code/quote/list/numbered list/headings) buttons fail to insert the empty 
> leading line needed for correct rendering.
>
> Thanks, I’ll look at both those..
>
> > For excising text, I believe linking would be a better default than 
> transclusion. Splitting up a tiddler that has grown too large is probably a 
> more common use case than including a snippet somewhere else; though this 
> may be my personal preference.
>
> Makes 

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

2016-03-09 Thread Mat
Jeremy Ruston wrote:
>
> I forgot to add that there is also now a picture chooser.
>

Wonderful! I don't want to be greedy but I think most such picture choosers 
let the user import pics too.

Detail; could it be that the excision button has the icon tilted 90 degrees?

BTW the *Preview button* is IMO now be better suited in the toolbar, 
appearing as one of those buttons, perhaps at extreme right.

<:-)

-- 
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/977c6db9-0f43-47a6-8dec-83a44977867e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.