inserting raw html

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

inserting raw html

abergel
Hi!

I would like to insert the code for the twitter widget within the renderOn: method.

I tried many things, including:
  html source src: '<p>hello world</p>'.
  html source with: '<p>hello world</p>'.

Any hint?

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





Reply | Threaded
Open this post in threaded view
|

Re: inserting raw html

Bernat Romagosa
Hi Alexandre,

You can use JQuery to achieve that:

yourElement asJQuery append: '<p>hello world</p>'.

Cheers!

2012/4/16 Alexandre Bergel <[hidden email]>
Hi!

I would like to insert the code for the twitter widget within the renderOn: method.

I tried many things, including:
 html source src: '<p>hello world</p>'.
 html source with: '<p>hello world</p>'.

Any hint?

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.








--
Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: inserting raw html

Nicolas Petton
In reply to this post by abergel
Yeah, the content is escaped. You can still add raw html this way:

html p asJQuery html: '<p>hello world</p>'

On Apr 16, 2012, at 4:05 PM, Alexandre Bergel wrote:

Hi!

I would like to insert the code for the twitter widget within the renderOn: method.

I tried many things, including:
 html source src: '<p>hello world</p>'.
 html source with: '<p>hello world</p>'.

Any hint?

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






Reply | Threaded
Open this post in threaded view
|

Re: inserting raw html

abergel
Ok! Thanks.

I think this info deserves to be put somewhere...

Cheers,
Alexandre


On 16 Apr 2012, at 09:27, Nicolas Petton wrote:

> Yeah, the content is escaped. You can still add raw html this way:
>
> html p asJQuery html: '<p>hello world</p>'
> --
> Nicolas Petton
> http://www.nicolas-petton.fr
>
> On Apr 16, 2012, at 4:05 PM, Alexandre Bergel wrote:
>
>> Hi!
>>
>> I would like to insert the code for the twitter widget within the renderOn: method.
>>
>> I tried many things, including:
>>  html source src: '<p>hello world</p>'.
>>  html source with: '<p>hello world</p>'.
>>
>> Any hint?
>>
>> Cheers,
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





Reply | Threaded
Open this post in threaded view
|

Re: inserting raw html

Nicolas Petton
You can use the wiki :)
https://github.com/NicolasPetton/amber/wiki

Nico
--
Nicolas Petton
http://www.nicolas-petton.fr

On Apr 16, 2012, at 4:37 PM, Alexandre Bergel wrote:

> Ok! Thanks.
>
> I think this info deserves to be put somewhere...
>
> Cheers,
> Alexandre
>
>
> On 16 Apr 2012, at 09:27, Nicolas Petton wrote:
>
>> Yeah, the content is escaped. You can still add raw html this way:
>>
>> html p asJQuery html: '<p>hello world</p>'
>> --
>> Nicolas Petton
>> http://www.nicolas-petton.fr
>>
>> On Apr 16, 2012, at 4:05 PM, Alexandre Bergel wrote:
>>
>>> Hi!
>>>
>>> I would like to insert the code for the twitter widget within the renderOn: method.
>>>
>>> I tried many things, including:
>>> html source src: '<p>hello world</p>'.
>>> html source with: '<p>hello world</p>'.
>>>
>>> Any hint?
>>>
>>> Cheers,
>>> Alexandre
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel  http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>>
>>>
>>
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: inserting raw html

abergel
In reply to this post by Nicolas Petton
The follow up of my question. I am trying to get the twitter widget in the produce page.

I therefore tried:

-=-=-=-=-=-=-=-=-=
renderTwitterWidget: html
        html p asJQuery append: '<a href="http://google.com">google</a>'.
        html p asJQuery append: '<script charset="utf-8" src="http://widgets.twimg.com/j/2/widget.js"></script> <script> new TWTR.Widget({   version: 2,   type: ''profile'',   rpp: 4,   interval: 30000,   width: 250,   height: 300,   theme: {     shell: {       background: ''#ccc793'',       color: ''#ffffff''     },     tweets: {       background: ''#ffffff'',       color: ''#828282'',       links: ''#336120''     }   },   features: {     scrollbar: true,     loop: false,     live: true,     behavior: ''all''   } }).render().setUser(''@alexbergel'').start(); </script>'

-=-=-=-=-=-=-=-=-=

Unfortunately it does not show up.
I have the impression that http://widgets.twimg.com/j/2/widget.js and amber.js cannot be loaded in the same page. I am a beginner in Javascript, so maybe I am missing something obvious here...

Any idea?

Cheers,
Alexandre

On 16 Apr 2012, at 09:27, Nicolas Petton wrote:

> Yeah, the content is escaped. You can still add raw html this way:
>
> html p asJQuery html: '<p>hello world</p>'
> --
> Nicolas Petton
> http://www.nicolas-petton.fr
>
> On Apr 16, 2012, at 4:05 PM, Alexandre Bergel wrote:
>
>> Hi!
>>
>> I would like to insert the code for the twitter widget within the renderOn: method.
>>
>> I tried many things, including:
>>  html source src: '<p>hello world</p>'.
>>  html source with: '<p>hello world</p>'.
>>
>> Any hint?
>>
>> Cheers,
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





Reply | Threaded
Open this post in threaded view
|

Re: inserting raw html

abergel
In reply to this post by Nicolas Petton
Done

Alexandre


On 16 Apr 2012, at 09:44, Nicolas Petton wrote:

> You can use the wiki :)
> https://github.com/NicolasPetton/amber/wiki
>
> Nico
> --
> Nicolas Petton
> http://www.nicolas-petton.fr
>
> On Apr 16, 2012, at 4:37 PM, Alexandre Bergel wrote:
>
>> Ok! Thanks.
>>
>> I think this info deserves to be put somewhere...
>>
>> Cheers,
>> Alexandre
>>
>>
>> On 16 Apr 2012, at 09:27, Nicolas Petton wrote:
>>
>>> Yeah, the content is escaped. You can still add raw html this way:
>>>
>>> html p asJQuery html: '<p>hello world</p>'
>>> --
>>> Nicolas Petton
>>> http://www.nicolas-petton.fr
>>>
>>> On Apr 16, 2012, at 4:05 PM, Alexandre Bergel wrote:
>>>
>>>> Hi!
>>>>
>>>> I would like to insert the code for the twitter widget within the renderOn: method.
>>>>
>>>> I tried many things, including:
>>>> html source src: '<p>hello world</p>'.
>>>> html source with: '<p>hello world</p>'.
>>>>
>>>> Any hint?
>>>>
>>>> Cheers,
>>>> Alexandre
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel  http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.