replacing <span> and <p> in visualformat
christinelewis
Member
I've been looking at some posts and documentation and can't seem to locate exactly what I need. I have two issues, hopefully someone can direct me to a doc or post that I may have missed. Or provide some insight.
Currently VisualFormat inserts a <p> tag automatically, I've seen how I can remove the <p> tag in the configuration file:
<remove>
<tagonly>p</tagonly>
</remove>
In addition when a style applied using the drop down it does so with a span tag, <span class="blah">
What I want is to use <div class="blah">
I've played around a bit removing the <p> tags and then applying styles with <span> tags and then in perl converting the <span> to <div>. While this works it forces the user to apply a style to every paragraph.
What I would prefer is to have the each paragraph default with a <div> tag and the select list that applies the style use a div tag instead of span.
So I would end up with:
<div>This is my first paragraph, it has no added style but the body.</div>
<div class="title">Title here</div>
<div>etc...</div>
I any part of this doable with VisualFormat?
Currently VisualFormat inserts a <p> tag automatically, I've seen how I can remove the <p> tag in the configuration file:
<remove>
<tagonly>p</tagonly>
</remove>
In addition when a style applied using the drop down it does so with a span tag, <span class="blah">
What I want is to use <div class="blah">
I've played around a bit removing the <p> tags and then applying styles with <span> tags and then in perl converting the <span> to <div>. While this works it forces the user to apply a style to every paragraph.
What I would prefer is to have the each paragraph default with a <div> tag and the select list that applies the style use a div tag instead of span.
So I would end up with:
<div>This is my first paragraph, it has no added style but the body.</div>
<div class="title">Title here</div>
<div>etc...</div>
I any part of this doable with VisualFormat?
0
Comments
-
This is entirely doable within VFE.
I'd recommend reading the Visual Format developer's guide, specifically page 31 (of TST6.0, if your appropriate version is different, it may be on a different page).
Dave
Current Environment(s):
(1) TS 6.1 SP1 on W2K3
(2) TS 6.1 SP2 on W2K
(3) TS 6.1 on W2K0 -
I notice you refernce TS 6.0 or greater. Maybe should have mentioned I'm on 5.5.2.
I will have another look in case I missed it as well.0 -
Hello,
TS 6.7.1
Solaris 9
I am looking to do something similar to what ChristineLewis wanted to do except that it is okay to keep thetag. The issue is I would like to remove all instances of and have it use
instead. I read through the VF guide and realize that I can scrub the tag completely but that is not the result I am looking for.
Dave mentioned there is an easier way to achieve what ChristineLewis was doing but the documentation has changed slightly since TS 6.0. Any recommendations? A nudge in the right direction would be appreciated.
Thanks,
/FF0 -
Did you look at page 229 of the TeamSite FormsPublisher VisualFormat Developer's Guide (release 6.0, wasn't rev'd for 6.7.1)?[indent]Inserting span or div TagsHello,
TS 6.7.1
Solaris 9
I am looking to do something similar to what ChristineLewis wanted to do except that it is okay to keep the <p> tag. The issue is I would like to remove all instances of <span> and have it use <div> instead. I read through the VF guide and realize that I can scrub the <Span> tag completely but that is not the result I am looking for.
Dave mentioned there is an easier way to achieve what ChristineLewis was doing but the documentation has changed slightly since TS 6.0. Any recommendations? A nudge in the right direction would be appreciated.
Thanks,
/FF
Thewrapstylewithdiv
attribute determines what to do when a user applies a generic style class to text surrounded by blocking tags. Set the attribute to true to wrap such text with<div>
tags. To wrap this text with<span>
tags, set the attribute to false.[/indent]Is that what you were looking for?0 -
Okay so it's sad that I'm posting at 11:30pm on a Friday night but yes I did find the that option and used it. I did find my problem though. The text I was testing with was data that was migrated from the original website and it appears that the paragraphs all have an additional space at the end of them....
So.... when I selected the text, I was selecting down to what I thought was the end of the paragraph. Anytime you select a subsection of text within a P tag, it automatically throws in a span instead of a div (or class if applied to the p tag).
So faulty data was the cause for my hassle. Silly Friday afternoon issue.
Thanks for replying though guys.. much appreciated as always.
/FF0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 151 General Questions
- 147 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories
TeamSite Developer Resources
If you are interested in gaining full access to the content, you can register for a My Support account here.
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.