[Iliad] raw HTML in Iliad

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

[Iliad] raw HTML in Iliad

Siemen Baader
Hi all,

is there a way to render raw HTML from Iliad widgets, or perhaps mustache templates? I'm interested in not using the builders always because I use an external web editor that generates plain HTML and that has some advantages in my workflow.

Is it possible do it with Seaside & Reef instead?

-- Siemen
Reply | Threaded
Open this post in threaded view
|

Re: [Iliad] raw HTML in Iliad

Siemen Baader
Formulating the question helped me to find the solution after I posted: 

index
    ^ [ :e | e add: (ILRawHtmlElement new contents: 'hello <strong>wo<br>rld</strong>') ]

:)

cheers,
Siemen


On Tue, Feb 13, 2018 at 9:14 AM, Siemen Baader <[hidden email]> wrote:
Hi all,

is there a way to render raw HTML from Iliad widgets, or perhaps mustache templates? I'm interested in not using the builders always because I use an external web editor that generates plain HTML and that has some advantages in my workflow.

Is it possible do it with Seaside & Reef instead?

-- Siemen

Reply | Threaded
Open this post in threaded view
|

Re: [Iliad] raw HTML in Iliad

CyrilFerlicot
On Tue, Feb 13, 2018 at 9:20 AM, Siemen Baader <[hidden email]> wrote:
> Formulating the question helped me to find the solution after I posted:
>
> index
>     ^ [ :e | e add: (ILRawHtmlElement new contents: 'hello
> <strong>wo<br>rld</strong>') ]
>
> :)
>

Hi!

Just for the record,

There is a Pharo mustache implementation.
(https://ci.inria.fr/pharo-contribution/view/Books/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Mustache/Mustache.pdf)
Also, it is possible with Seaside to render raw html via the method #html:

> cheers,
> Siemen
>
>
> On Tue, Feb 13, 2018 at 9:14 AM, Siemen Baader <[hidden email]>
> wrote:
>>
>> Hi all,
>>
>> is there a way to render raw HTML from Iliad widgets, or perhaps mustache
>> templates? I'm interested in not using the builders always because I use an
>> external web editor that generates plain HTML and that has some advantages
>> in my workflow.
>>
>> Is it possible do it with Seaside & Reef instead?
>>
>> -- Siemen
>
>



--
Cyril Ferlicot
https://ferlicot.fr

Reply | Threaded
Open this post in threaded view
|

Re: [Iliad] raw HTML in Iliad

Siemen Baader
Thanks!

On Tue, Feb 13, 2018 at 9:51 AM, Cyril Ferlicot <[hidden email]> wrote:
On Tue, Feb 13, 2018 at 9:20 AM, Siemen Baader <[hidden email]> wrote:
> Formulating the question helped me to find the solution after I posted:
>
> index
>     ^ [ :e | e add: (ILRawHtmlElement new contents: 'hello
> <strong>wo<br>rld</strong>') ]
>
> :)
>

Hi!

Just for the record,

There is a Pharo mustache implementation.
(https://ci.inria.fr/pharo-contribution/view/Books/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Mustache/Mustache.pdf)
Also, it is possible with Seaside to render raw html via the method #html:

> cheers,
> Siemen
>
>
> On Tue, Feb 13, 2018 at 9:14 AM, Siemen Baader <[hidden email]>
> wrote:
>>
>> Hi all,
>>
>> is there a way to render raw HTML from Iliad widgets, or perhaps mustache
>> templates? I'm interested in not using the builders always because I use an
>> external web editor that generates plain HTML and that has some advantages
>> in my workflow.
>>
>> Is it possible do it with Seaside & Reef instead?
>>
>> -- Siemen
>
>



--
Cyril Ferlicot
https://ferlicot.fr


Reply | Threaded
Open this post in threaded view
|

Re: [Iliad] raw HTML in Iliad

Steven Costiou-2
In reply to this post by Siemen Baader

Hi,

i think just doing

e html: '<some html>'

also works.

Elements should not be instantiated like you do, there is an interface for each element that can be called on "e".

e div, e html:, e h1:, etc. The interface instantiates the right class behind.

You can find this somewhere in the core classes, but i don"t remember where and i can't check right now.

Steven.

Le 2018-02-13 09:20, Siemen Baader a écrit :

Formulating the question helped me to find the solution after I posted: 

index
    ^ [ :e | e add: (ILRawHtmlElement new contents: 'hello <strong>wo<br>rld</strong>') ]
 
:)
 
cheers,
Siemen
 

On Tue, Feb 13, 2018 at 9:14 AM, Siemen Baader <[hidden email]> wrote:
Hi all,

is there a way to render raw HTML from Iliad widgets, or perhaps mustache templates? I'm interested in not using the builders always because I use an external web editor that generates plain HTML and that has some advantages in my workflow.
 
Is it possible do it with Seaside & Reef instead?
 
-- Siemen

 

--
kloum.io
Reply | Threaded
Open this post in threaded view
|

Re: [Iliad] raw HTML in Iliad

Sven Van Caekenberghe-2
In reply to this post by CyrilFerlicot


> On 13 Feb 2018, at 09:51, Cyril Ferlicot <[hidden email]> wrote:
>
> On Tue, Feb 13, 2018 at 9:20 AM, Siemen Baader <[hidden email]> wrote:
>> Formulating the question helped me to find the solution after I posted:
>>
>> index
>>    ^ [ :e | e add: (ILRawHtmlElement new contents: 'hello
>> <strong>wo<br>rld</strong>') ]
>>
>> :)
>>
>
> Hi!
>
> Just for the record,
>
> There is a Pharo mustache implementation.
> (https://ci.inria.fr/pharo-contribution/view/Books/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Mustache/Mustache.pdf)
> Also, it is possible with Seaside to render raw html via the method #html:

There is also ZnHtmlOutputStream (a simple helper class) for generating syntactically correct HTML.

>> cheers,
>> Siemen
>>
>>
>> On Tue, Feb 13, 2018 at 9:14 AM, Siemen Baader <[hidden email]>
>> wrote:
>>>
>>> Hi all,
>>>
>>> is there a way to render raw HTML from Iliad widgets, or perhaps mustache
>>> templates? I'm interested in not using the builders always because I use an
>>> external web editor that generates plain HTML and that has some advantages
>>> in my workflow.
>>>
>>> Is it possible do it with Seaside & Reef instead?
>>>
>>> -- Siemen
>>
>>
>
>
>
> --
> Cyril Ferlicot
> https://ferlicot.fr
>


Reply | Threaded
Open this post in threaded view
|

Re: [Iliad] raw HTML in Iliad

Sean P. DeNigris
Administrator
Sven Van Caekenberghe-2 wrote
> There is also ZnHtmlOutputStream (a simple helper class) for generating
> syntactically correct HTML.

Yes, it's nice. I've used it in images when I needed to work with HTML
without Seaside loaded.



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

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: [Iliad] raw HTML in Iliad

Sven Van Caekenberghe-2


> On 13 Feb 2018, at 13:12, Sean P. DeNigris <[hidden email]> wrote:
>
> Sven Van Caekenberghe-2 wrote
>> There is also ZnHtmlOutputStream (a simple helper class) for generating
>> syntactically correct HTML.
>
> Yes, it's nice. I've used it in images when I needed to work with HTML
> without Seaside loaded.

It is way simpler though, Seaside's model is much better (but consists of lots of classes). YMMV