Page 1 of 2
link to a file in a paragraph
Posted: 01 Jul 2011, 10:08
by jegbertzen
How can I add a link to a file in a paragraph? The link to a file is a div, which is a block element, so it seems not possible...
Re: link to a file in a paragraph
Posted: 07 Jul 2011, 23:30
by Jan
Hi, sorry I don't understand?
Re: link to a file in a paragraph
Posted: 13 Jul 2011, 22:58
by jegbertzen
when you add a link to a file in the editor, a div element is created around the link. In this way you cannot add a link to a file on a word in a paragraph, as a div is not an inline element. How can I remove the div?
Re: link to a file in a paragraph
Posted: 15 Jul 2011, 18:50
by Jan
Hi, I think, then you need to customize the code (to remove the div) or set in CSS that the div will be inline.
Jan
Re: link to a file in a paragraph
Posted: 18 Jul 2011, 15:20
by jegbertzen
Hi Jan,
This can be an option but DIV elements are no inline elements. SPAN elements are. I think this would be a good improvement for your plugin, so users can add links in paragraphs.
Something else strange happens in my editor (using JCE):
I add this in the editor:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in tortor orci, a convallis sapien. Mauris diam massa, egestas in congue ac, hendrerit id dolor. Phasellus elementum odio quis erat faucibus mollis. Donec condimentum augue sed odio ultricies tempus. Suspendisse tempor ultrices nisi, sit amet pulvinar ipsum molestie eget. Donec auctor fringilla dui sed laoreet. Donec egestas elementum augue sit amet mattis. Phasellus et suscipit sem. Aliquam tristique quam a purus cursus vitae vulputate odio feugiat. Duis nec urna a ipsum gravida aliquam. Donec at justo id felis fermentum mattis. Sed vitae odio et elit gravida cursus ac ac velit.{phocadownload view=file|id=1|text=Link tekst|target=s} Maecenas sodales enim nec mauris placerat ac vehicula lacus tempor. Proin non malesuada est. In sapien mi, varius et luctus at, tristique eget sem. Aenean dapibus nisl vel dolor blandit interdum a vitae lectus. Etiam placerat, orci ut volutpat aliquet, lorem mi tincidunt ligula, in sollicitudin erat odio vel ligula. Phasellus felis tellus, lacinia ac tincidunt id, volutpat eget ipsum. Morbi suscipit ultricies ornare.
This is rendered in the FE
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in tortor orci, a convallis sapien. Mauris diam massa, egestas in congue ac, hendrerit id dolor. Phasellus elementum odio quis erat faucibus mollis. Donec condimentum augue sed odio ultricies tempus. Suspendisse tempor ultrices nisi, sit amet pulvinar ipsum molestie eget. Donec auctor fringilla dui sed laoreet. Donec egestas elementum augue sit amet mattis. Phasellus et suscipit sem. Aliquam tristique quam a purus cursus vitae vulputate odio feugiat. Duis nec urna a ipsum gravida aliquam. Donec at justo id felis fermentum mattis. Sed vitae odio et elit gravida cursus ac ac velit.</p>
<div class="phocadownloadfile32">
<a target="_self" href="/index.php?option=com_phocadownload&view=category&download=1:grondstromenbeleid-midden-holland&id=3:bodem">Link tekst</a>
</div>
Maecenas sodales enim nec mauris placerat ac vehicula lacus tempor. Proin non malesuada est. In sapien mi, varius et luctus at, tristique eget sem. Aenean dapibus nisl vel dolor blandit interdum a vitae lectus. Etiam placerat, orci ut volutpat aliquet, lorem mi tincidunt ligula, in sollicitudin erat odio vel ligula. Phasellus felis tellus, lacinia ac tincidunt id, volutpat eget ipsum. Morbi suscipit ultricies ornare.
<p></p>
As you see the second paragraph is not placed in a <P> when I place the code inline in the backend.
Re: link to a file in a paragraph
Posted: 21 Jul 2011, 14:27
by Jan
Hi, no experiences with the JCE
With inline DIV, I meant:
Code: Select all
<style>
div.inline {
display: inline;
}
</style>
<div class="inline">This div is an inline element</div>
Re: link to a file in a paragraph
Posted: 08 Aug 2011, 10:58
by jegbertzen
this works, but the first link to a file in the text seems to close the paragraph. see:
http://ismh.ismh.nl/index.php?option=co ... Itemid=373
This page should show 2 inline links.
This is the fact with different editors.
see
http://ismh.ismh.nl/index.php?option=co ... Itemid=373 link 'functieprofiel'
Re: link to a file in a paragraph
Posted: 12 Aug 2011, 11:29
by Jan
Hi, in such case you need to recheck all your CSS, if it is not set on other place with different settings.
Jan
Re: link to a file in a paragraph
Posted: 16 Aug 2011, 10:36
by jegbertzen
Hi Jan,
This has nothing to do with the CSS. In the backend this is my code:
<p>De kwalificatie ambtenaren zijn aangesteld op basis van een {phocadownload view=file|id=6|text=functieprofiel|target=s} en werken volgens het {phocadownload view=file|id=7|target=s}, dat is opgesteld naar aanleiding van de uitkomsten van het onderzoek.</p>
<p><strong>Contactgegevens kwalificatieambtenaar <br /></strong>telefoon (0182) 545 544</p>
Which is correct, right?
on the frontend:
<p>De kwalificatie ambtenaren zijn aangesteld op basis van een </p>
<div class="phocadownloadfile32">
<a target="_self" href="/index.php?option=com_phocadownload&view=category&download=6:functieprofiel-kwalificatieplicht&id=4:kwalificatieplicht&Itemid=433">functieprofiel</a>
</div>
en werken volgens het
<div class="phocadownloadfile32">
<a target="_self" href="/index.php?option=com_phocadownload&view=category&download=7:werkplan-kwalificatieplicht&id=4:kwalificatieplicht&Itemid=433">werkplan kwalificatieplicht</a>
</div>
, dat is opgesteld naar aanleiding van de uitkomsten van het onderzoek.
<p></p>
So as you can see, the first phocadownloadfile seems to create incorrect HTML.
Re: link to a file in a paragraph
Posted: 18 Aug 2011, 23:05
by Jan
Hi, no idea what you mean with not correct HTML?