Macros and TinyMCE Options
timgaunt
Posted: Thursday, December 06, 2007 9:42:56 AM

Rank: Aficionado

Joined: 10/31/2007
Posts: 114
Location: Birmingham (UK)
Morning, fairly simple problem today, I'd like to allow the user to insert i.e. "Username" and "Company Name" in the text of the page so I've created two macros but when inserting them I get the text along the lines of "No macro content available for WYSIWYG editing"

Is there anyway I can set that to default to "Username" and "Company Name" so it doesn't look odd and secondly insert it without the paragraph and div tags? i.e. with Spans instead?

TIA

Tim

Managing Director at The Site Doctor Ltd - My personal blog is here - Umbraco Newbie ;)
tim
Posted: Thursday, December 06, 2007 9:50:28 AM

Rank: Addict

Joined: 2/19/2007
Posts: 819
Location: Belgium
Macro properties have an option Render content in editor

Set this to true and your macro will be rendered in the editor. But there will be a border around it.

Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
timgaunt
Posted: Thursday, December 06, 2007 10:23:24 AM

Rank: Aficionado

Joined: 10/31/2007
Posts: 114
Location: Birmingham (UK)
Thanks but that is already selected and just displays "No macro content available for WYSIWYG editing".

I've styled the div with CSS so it's inline but the issue I have at the moment is TinyMCE insists on closing the paragraph tag before the div which messes things up, any idea how to sort that too?

Tim

Managing Director at The Site Doctor Ltd - My personal blog is here - Umbraco Newbie ;)
timgaunt
Posted: Thursday, December 06, 2007 10:28:16 AM

Rank: Aficionado

Joined: 10/31/2007
Posts: 114
Location: Birmingham (UK)
To be clearer about the div issue:

I have the following code:
<p>Some text <div>something</div> something else</p>

When saving the HTML the editor converts it to:
<p>Some text </p><div>something</div>something else

Anyone know why it does this, or how to sort it?


Managing Director at The Site Doctor Ltd - My personal blog is here - Umbraco Newbie ;)
Simm
Posted: Thursday, December 06, 2007 10:42:28 AM

Rank: Fanatic

Joined: 7/22/2006
Posts: 261
Location: Randers, Denmark
Hi Tim,

I think it is because you are using malformed HTML. I am quite certain that a paragraph tag cannot have a div inside it, because a div is a block element while p is an inline element. You should go for a span instead, I guess.

Best Regards
Simon

Level 0 uncertified ;)
timgaunt
Posted: Thursday, December 06, 2007 11:01:44 AM

Rank: Aficionado

Joined: 10/31/2007
Posts: 114
Location: Birmingham (UK)
I agree, but the div is the place holder for the macro and I can't remove/change them as the macro then won't render.

Tim

Managing Director at The Site Doctor Ltd - My personal blog is here - Umbraco Newbie ;)
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.