I can't seem to get what you mentioned to work, I've uploaded my attempts 
here. 

http://welford.github.io/iframe.html

I would ideally like the call to <<ytif>> to display with the same format 
as the [[No P]] Tiddler or the first video from the "ytv" Macro. Would you 
mind taking a look and seeing what i am doing wrong?

Regards,
James

On Tuesday, 31 March 2015 20:41:18 UTC+9, Jeremy Ruston wrote:
>
> Hi James
>
>>
>>
>> That would work but it's a bit more verbose that I would like. I guess 
>> this could be further wrapped in a plain tiddler macro? My setup is to have 
>> <<ytif>> to set up the iframe and you can pass the video code or have it 
>> come from a field value. CSS trickery seems like an easy solution if a 2nd 
>> layer of macro doesn't work, but are the <p> tags likely to change in the 
>> future?
>>
>
> Ah, how are you calling the macro? If the macro call starts at the 
> beginning of a block, and is followed by two line breaks, then the macro 
> content will be parsed in block mode, otherwise in inline mode. So you can 
> force inline mode by ensuring that the macro call doesn't look like a 
> block, for instance by following it with a comment:
>
> <<ytif>><!-- Force inline mode -->
>
> Best wishes
>
> Jeremy
>  
>
>>
>> James
>>
>> On Tuesday, 31 March 2015 12:26:54 UTC+1, Jeremy Ruston wrote:
>>>
>>> Hi James
>>>
>>> The <p> tags are being generated because the content returned by the JS 
>>> macro is being parsed in "block" mode, and so the parser is looking for 
>>> double line breaks to separate paragraphs.
>>>
>>> There are several things you may be able to do to fix this but the 
>>> easiest would be to explicitly call the JS macro with the <$macrocall> 
>>> widget and specify mode="inline". Would that work here?
>>>
>>> Best wishes
>>>
>>> Jeremy
>>>
>>> On Mon, Mar 30, 2015 at 11:49 PM, James Anderson <[email protected]> 
>>> wrote:
>>>
>>>> I came across this today while working on some simple YT macros so I 
>>>> can link to specific times within videos on a statically exported blog.
>>>>
>>>> http://phasersonkill.com/2015/3/31/macro%20sample.html
>>>>
>>>> The first video is generated via a JS macro and the 2nd via a plain 
>>>> macro defined with a global scope. the difference in size (at least on 
>>>> Chrome and IE) is because the JS macros output is wrapped in <p> tags. I 
>>>> can probably do some CSS hacking to fix this but is there a way of 
>>>> stopping 
>>>> the <p> tags from being generated in this case?
>>>>
>>>> Thanks,
>>>> James
>>>>
>>>> -- 
>>>> 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 [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/tiddlywiki.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Jeremy Ruston
>>> mailto:[email protected]
>>>  
>>
>
>
> -- 
> Jeremy Ruston
> mailto:[email protected] <javascript:>
>  

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1780fc0f-a96a-40d9-91a3-372901ef1d7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to