Pillar in-image rendering as RichText

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Pillar in-image rendering as RichText

Kasper Osterbye
Cheers,


Rendering the Pillar markup inside the Pharo image

This is work in (early) progress, but I think it is far enough for a "technology preview".

Goal of the project

The goal of the project is to be able to do better in-image documentation. To do this, I am working on several fronts:

  1. Rendering more pillar, expecially I would like to get a solution for tables.
  2. Rendering github markdown in addition to pillar markdown. This will allow me to pull markdown from git and display it in-image.
  3. Giving the "help-system" some love.
  4. In-image tools for writing markdown - a markdown editor
  5. A design for keeping the mark-down texts seamlessly outside of the image

Reg. 1., I can only figure out how to transform a morphic table into an image, and then add that image to the text (not included atm as I find it so ugly a solution). Any other ideas are greatly appreciated.

Reg. 2. I am nearly done on this one, at least for the easy aspects (headers, lists, emphasis, code-blocks).

Reg 3 and 4. Only loose ideas atm.

Trying it out

Load it using Metacello:

Metacello new
   baseline: 'PillarRichTextRender';
   repository: 'github://kasperosterbye/PillarRichTextRender';
   load.

At the moment it will load the whole of Pillar, but I hope to fix that soon.

Once loaded, the class PRRichTextComposer has some examples on the class side.

Reply | Threaded
Open this post in threaded view
|

Re: Pillar in-image rendering as RichText

Julien Delplanque-2
Nice work Kasper!

I can’t wait to have a tab with rendered pillar when browsing class comment. :-)

Julien

---
Julien Delplanque
Doctorant à l’Université de Lille
Bâtiment B 40, Avenue Halley 59650 Villeneuve d'Ascq
Numéro de téléphone: +333 59 35 86 40

Le 21 oct. 2019 à 16:10, Kasper Østerbye <[hidden email]> a écrit :

Cheers,


Rendering the Pillar markup inside the Pharo image

This is work in (early) progress, but I think it is far enough for a "technology preview".

Goal of the project

The goal of the project is to be able to do better in-image documentation. To do this, I am working on several fronts:

  1. Rendering more pillar, expecially I would like to get a solution for tables.
  2. Rendering github markdown in addition to pillar markdown. This will allow me to pull markdown from git and display it in-image.
  3. Giving the "help-system" some love.
  4. In-image tools for writing markdown - a markdown editor
  5. A design for keeping the mark-down texts seamlessly outside of the image

Reg. 1., I can only figure out how to transform a morphic table into an image, and then add that image to the text (not included atm as I find it so ugly a solution). Any other ideas are greatly appreciated.

Reg. 2. I am nearly done on this one, at least for the easy aspects (headers, lists, emphasis, code-blocks).

Reg 3 and 4. Only loose ideas atm.

Trying it out

Load it using Metacello:

Metacello new
   baseline: 'PillarRichTextRender';
   repository: '<a href="github://kasperosterbye/PillarRichTextRender" class="">github://kasperosterbye/PillarRichTextRender';
   load.

At the moment it will load the whole of Pillar, but I hope to fix that soon.

Once loaded, the class PRRichTextComposer has some examples on the class side.

Reply | Threaded
Open this post in threaded view
|

Re: Pillar in-image rendering as RichText

NorbertHartl
In reply to this post by Kasper Osterbye
Looking at the code it seems that there is just a pillar to text conversikn. Do you have plans to go from text to pillar as well?

Norbert

Am 21.10.2019 um 17:19 schrieb Kasper Østerbye <[hidden email]>:


Cheers,


Rendering the Pillar markup inside the Pharo image

This is work in (early) progress, but I think it is far enough for a "technology preview".

Goal of the project

The goal of the project is to be able to do better in-image documentation. To do this, I am working on several fronts:

  1. Rendering more pillar, expecially I would like to get a solution for tables.
  2. Rendering github markdown in addition to pillar markdown. This will allow me to pull markdown from git and display it in-image.
  3. Giving the "help-system" some love.
  4. In-image tools for writing markdown - a markdown editor
  5. A design for keeping the mark-down texts seamlessly outside of the image

Reg. 1., I can only figure out how to transform a morphic table into an image, and then add that image to the text (not included atm as I find it so ugly a solution). Any other ideas are greatly appreciated.

Reg. 2. I am nearly done on this one, at least for the easy aspects (headers, lists, emphasis, code-blocks).

Reg 3 and 4. Only loose ideas atm.

Trying it out

Load it using Metacello:

Metacello new
   baseline: 'PillarRichTextRender';
   repository: 'github://kasperosterbye/PillarRichTextRender';
   load.

At the moment it will load the whole of Pillar, but I hope to fix that soon.

Once loaded, the class PRRichTextComposer has some examples on the class side.

Reply | Threaded
Open this post in threaded view
|

Re: Pillar in-image rendering as RichText

Kasper Osterbye
On 21 October 2019 at 18.53.24, Norbert Hartl ([hidden email]) wrote:
Looking at the code it seems that there is just a pillar to text conversikn. 

Yes, I only go from pillar to Text (not just String).

Do you have plans to go from text to pillar as well?

Your question confuses me :-)

  • What would be the source of an already formatted Text?
  • Is there a “rich text editor”? I did not know there was one?
Best,

Kasper
Reply | Threaded
Open this post in threaded view
|

Re: Pillar in-image rendering as RichText

NorbertHartl


Am 21.10.2019 um 19:20 schrieb Kasper Østerbye <[hidden email]>:


On 21 October 2019 at 18.53.24, Norbert Hartl ([hidden email]) wrote:
Looking at the code it seems that there is just a pillar to text conversikn. 

Yes, I only go from pillar to Text (not just String).

Do you have plans to go from text to pillar as well?

Your question confuses me :-)

  • What would be the source of an already formatted Text?
  • Is there a “rich text editor”? I did not know there was one?
Well, I‘m in a constant fight with Esteban about it 😄 I started to use Rubric as text editing component. With this I started to add text attributes for wysiwyg editing. In a basic attempt I wrote a converter from text attributes to pillar markup. The text with pillar markup is stored in my model and the pillar to text reconstructs to formatted text.
With spec we need to redo such a component. There is a text component. The plan is to add a rich text component that can have styled text. Both things together could be a good editor in wysiwyg fashion having pillar as document model. 
In your first post I thought I read you have the same plan. Maybe just wishful thinking.

Norbert

Best,

Kasper
Reply | Threaded
Open this post in threaded view
|

Re: Pillar in-image rendering as RichText

tbrunz
Hi Norbert, Kasper,

I, for one, am /*very*/ interested in being able to edit Pillar documents in
a wysiwyg fashion.  And of course I then want to write out such a document
as a text file with Pillar markup, so that I can commit that document to a
Booklet repo, to be compiled into a PDF.

I was looking for a way to view a Pillar markup text file, as an aid to
composing/proofreading.  There is a plugin for Atom, but it appears to be so
old (and unmaintained) that it no longer renders correctly in the latest
versions of Atom.  So I have been making due with using Markdown preview,
but it's far from ideal.

You have something like this started?  Need help?  And if anyone else has a
suggestion..?

-Ted




--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: Pillar in-image rendering as RichText

Kasper Osterbye
In reply to this post by NorbertHartl
On 21 October 2019 at 21.44.49, Norbert Hartl ([hidden email]) wrote:
I started to use Rubric as text editing component. With this I started to add text attributes for wysiwyg editing. In a basic attempt I wrote a converter from text attributes to pillar markup. The text with pillar markup is stored in my model and the pillar to text reconstructs to formatted text.
With spec we need to redo such a component. There is a text component. The plan is to add a rich text component that can have styled text. Both things together could be a good editor in wysiwyg fashion having pillar as document model. 
In your first post I thought I read you have the same plan. Maybe just wishful thinking.

Got it.

When googling, it seems like the Cuis-StyledTextEditor (https://github.com/Cuis-Smalltalk/StyledTextEditor) is the latest attempt, but it is not Pharo.

As I understand it, it is the plan to get gtk and pharo to work together somehow. Does gtk have a widget that allow for rich text wysiwyg? Its underlying text model seems to be similar to smalltalk (attributes).

At the moment I am less interested in (developing) a wysiwyg editor. Also I am not going to try and make a full pillar renderer (I am not a pillar fan).

As Julien wrote, class comments (and perhaps even regular comments) rendered in rich-text based on markup is my first goal. 

I am still picking up Pharo and all it tooling, so it is slow progress atm.

Btw, in the comments for Rubric a project named TxText is mentioned. I presume it is either integrated into the system and has lost its name, or it stalled?

Best,

Kasper