[squeak-dev] The Inbox: Collections-eem.732.mcz -- HtmlReadWriter

Tobias Pape Das.Linux at gmx.de
Thu Feb 9 18:54:58 UTC 2017


Hi all,

On 09.02.2017, at 09:47, H. Hirzel <hannes.hirzel at gmail.com> wrote:

> On 2/8/17, Tobias Pape <Das.Linux at gmx.de> wrote:
>> 
>> On 08.02.2017, at 19:59, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>> 
>>> Hi All,
>>> 
>>>    I'd really like this to be in trunk.  I've just written a blog post in
>>> a Workspace using this code
>>> (http://www.mirandabanda.org/cogblog/2017/02/07/smalltalk-scanning-and-shcontrol-structures/)
>>> and it turns creating a blog post into a simple copyHtml paste operation
>>> from a workspace to (in my case) WordPress.  So any reviewers?
>> 
>> Care to explain it a litte bit? :)
>> It looks a bit complicated to my eyes.
>> Also, do you really want <pre>?
>> (http://stackoverflow.com/questions/4611591/code-vs-pre-vs-samp-for-inline-and-block-code-snippets#4611735)
>> 
>> The HtmlReadWriter seems to (up until now) pretty directly map text
>> attributes to html attributes.
>> 
>> You seem to want to differentiate code from non-code, so what about having a
>> do-it attribute, that does exactly that?
>> Because now, there's also no back-reading of such html into a Text object,
>> wich I find unfortunate.
>> I think, the readwriter should be able to read what it has written.
>> 
>> I know, it's a mere convenience thing, but still, its very procedural, and
>> seeing #~~ in high-level code is strange to my eyes…
>> 
>> What would be really cool is to
>> 	- mark the code as do-it
>> 	- have the do-it present itself as <code> or <pre> on Html.
> +1

So with Bert's help, I did just that (see trunk).

Workflow for Eliot could be now:
 - Write text in workspace
 - Copy (formatted) code to workspace
 - [Attention: new] select the code and CMD-6 it as DoIt 
   (code is now clickable and underlined)
 - repeat until satisfied
 - yellow-click and 'copy as html'

Also, there are two test for this behavior now.

HTH

Best regards
	-Tobias




More information about the Squeak-dev mailing list