[Pro] getting rid of those pesky P tag

Hi everyone
As usual I am banging my head at brick wall and its starting to hurt :o(
I am trying to get rid of the automatically generated p tag when my webyep richtext item code is placed as an inline.
I dont need this because the wysiwyg editors add the tag So I am ending up with a double paragraph… Now I could use the remove p action on the container div but if the richtext is part of a couple of other inline boxes then this wont work… well its not ideal anyway.
SO I thought after putting it off I better look into removing it… What a palaver… is there any easy method to stop freeway adding this automatically and if not hows it done cheers for the pointers

max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

So I suppose no need to send off the sample file requested in your email today. Perhaps Tim can chime in and help out as to the why this occurs. You may even want to contact Walt as his ‘crowbar’ actions removes < p > tags as well.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There is no way to signal to Freeway that the element isn’t needed.
What I did in the Crowbar was to do a test to see where the object
fell in its parent line of text. If it appeared to be the only thing
in the line, then I used Tim Plumb’s usual trick of adding a dummy
wrapper, adding the code with fwAddRaw, then removing the item. Here’s
the relevant code, just use the last case (replace):

function addToObj(thisObj,position){
	if (thisObj){
		var moreCode = fwParameters.custom.toString();
		if(position == 'start'){
			var dummy = thisObj.fwAddEnclosing("",true);
			dummy.fwAddRaw(moreCode);
			dummy.fwAddRaw(thisObj.fwToHTML().replace('&' + fwItem.toString() +  
';',''));
		}
		if (position == 'end'){
			var dummy = thisObj.fwAddEnclosing("",true);
			dummy.fwAddRaw(thisObj.fwToHTML().replace('&' + fwItem.toString() +  
';',''));
			dummy.fwAddRaw(moreCode);
		}
		if (position == 'middle'){
			var dummy = thisObj.fwAddEnclosing("",true);
			dummy.fwAddRaw(thisObj.fwToHTML().replace('&' + fwItem.toString() +  
';',moreCode));
		}
		if (position == 'replace'){
			var dummy = thisObj.fwAddEnclosing("",true);
			dummy.fwAddRaw(moreCode);
		}
		thisObj.fwDelete();
	}
}

Walter

On Apr 8, 2010, at 12:17 PM, max wrote:

Hi everyone
As usual I am banging my head at brick wall and its starting to
hurt :o(
I am trying to get rid of the automatically generated p tag when my
webyep richtext item code is placed as an inline.
I dont need this because the wysiwyg editors add the tag So I am
ending up with a double paragraph… Now I could use the remove p
action on the container div but if the richtext is part of a couple
of other inline boxes then this wont work… well its not ideal
anyway.
SO I thought after putting it off I better look into removing it…
What a palaver… is there any easy method to stop freeway adding
this automatically and if not hows it done cheers for the pointers

max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi dan in the end I made a quick bit of artwork with every variation I could think of and thats when I started to run into trouble… and as usual I am right up against it on work so I was hoping it was going too be a quick fix, but its not working out that way.

all the best max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yep, I do like my dummy wrappers! :slight_smile:
You could also try and locate the action item’s parent P tag with
thisItem.fwFindEnclosing(“p”);
You can then use a dummy wrapper or fwMove to move the action item
away from the paragraph tag before you nuke it (it’s the only way to
be sure).
Let me know when work stops getting in the way of you updating the
action and I’ll help out if needed. :slight_smile:
All the best,
Tim.

On 8 Apr 2010, at 17:55, Walter Lee Davis wrote:

There is no way to signal to Freeway that the element isn’t needed.
What I did in the Crowbar was to do a test to see where the object
fell in its parent line of text. If it appeared to be the only thing
in the line, then I used Tim Plumb’s usual trick of adding a dummy
wrapper, adding the code with fwAddRaw, then removing the item.

FreewayActions.com - Freeware and commercial actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Does this mean you still need a sample file Max? My WebYep series on my site, episode 4 I believe, required people to attach the extra Remove Paragraph Tags action to remove the doubling up which caused extra space to be inserted.

I’ve also got quite a few emails from people saying they don’t have the updated Actions yet to follow along with me.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Dan
Thanks for the offer but I have made an example so the one I have should cover all the different richtext problems.

As far as the action it was finished and I was just going through the manual for spellers and oddly enough the french translation needed finishing off too although I think its probably close enough
So I was going to post it in the next day or two.

Sorry for everyone who has had to weight … but it is coming
max


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That’s good news. I look forward to having the update. Thanks for your actions and updates, I’ve built 4 total sites with them so far since I bought them and it’s been great.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Tim
Thanks for the offer of helping me through my richtext problem.
I have sent you a simplified version of the sort of thing I was trying to do with a basic version and a description of where I was flummoxed. So any pointers would be a real time saver.

To everyone who is desperately waiting for this big update to launch and be sent out… I am going to wait untill this little nasty is fixed as its a bit of an annoyance when using rich-text and inlines… but if it turns out to be a big problem. Then I will have to take a view on sending the version 3 out as it stands.

I will keep everyone posted.
All the best and again tim thanks


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options