You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#101069 Deleted collapseOne

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by nenci on Wednesday, 11 September 2019 12:54 BST

nenci
Recently I have encountered this problem with JCE PRO 2.7.17: I made an accordion based on Bootstrap 4, and the following is the code I wrote with JCE in "code mode" (and it works perfectly):

<div id="accordion" class="accordion">
<div class="card mb-0">
<div class="card-header" data-toggle="collapse" href="https://www.joomlacontenteditor.net/#collapseOne"><a class="card-title"> TITLE </a></div>
<div id="collapseOne" class="card-body collapse show" data-parent="#accordion">
<div> CONTENT HERE </div>
</div>
etc

If I switch the editor in visual mode and then I return to code mode, I find that href="https://www.joomlacontenteditor.net/# collapseOne" has been deleted, thus preventing the correct functioning of the accordion itself.
This is the code after switching to visual mode:

<div id="accordion" class="accordion">
<div class="card mb-0">
<div class="card-header" data-toggle="collapse"><a class="card-title"> TITLE </a></div>
<div id="collapseOne" class="card-body collapse show" data-parent="#accordion">
<div> CONTENT HERE </div>
</div>
etc

What can I do to solve this problem?
Thanks in advance for any possible help.

Ryan
href="https://www.joomlacontenteditor.net/# collapseOne" is not a valid attribute for the <div> element. Perhaps the code should be, with the href and data-collapse attributes added to the <a> tag, which seems to be how it is on the Bootstrap site - https://getbootstrap.com/docs/4.3/components/collapse/

<div id="accordion" class="accordion">
<div class="card mb-0">
<div class="card-header"><a class="card-title" href="https://www.joomlacontenteditor.net/#collapseOne" data-toggle="collapse"> TITLE </a></div>
<div id="collapseOne" class="card-body collapse show" data-parent="#accordion">
<div> CONTENT HERE </div>
</div>

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

nenci
Thanks for the reply.
Unfortunately the proposed html modification doesn't work,
but it doesn't matter; now that I know where the problem lies I will find an alternative solution.
Thanks again