Diappearing code

Sam Sumpter asked on October 26, 2015 17:47

I am placing a simple slider on my website with arrow nav for previous and next but when I click save, using the web portal, two of my lines of code get removed. Can anyone tell me why? The code I submit looks like this:

<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"> Previous <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"> Next

After I click save, my code gets changed to this:

 <a class="left carousel-control" data-slide="prev" href="#myCarousel" role="button">
    <span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" data-slide="next" href="#myCarousel" role="button">
    <span class="sr-only">Next</span>
</a>

Thoughts?
Sam S.

Recent Answers


Brenden Kehren answered on October 26, 2015 17:55

The CKEditor is "fixing" your invalid markup. It appears your code does not have any closing tags. If you want the invalid markup, you might want to use a static text webpart or place your markup in the before or after html of a repeater webpart.

1 votesVote for this answer Mark as a Correct answer

Sam Sumpter answered on October 26, 2015 18:02 (last edited on October 26, 2015 18:04)

So why does the editor eliminate one line of span code but not the other one? I will try using the the 'before' panel for my script calls, i didn't think of that. Thanks for the suggestion. Let's see if this works. Do you think I should put the anchor blocks of code in the after panel?

Sam S.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 26, 2015 19:49

I'm guessing the code you originally posted isn't correct but it will automatically fix it for you. If I want/need specific HTML I always use static text webpart.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.