Page 1 of 1

microtiny v2.0.3 alters code (cmsms v2.1.2)

Posted: Fri Feb 05, 2016 9:38 pm
by so what?
On a new install of cmsms v2.1.1 updated to v2.1.2 I set up a test page using bootstrap. On one page I copied the code of the bootstrap accordion example into the source code window of microtiny, clicked OK.
In this example there is this tag:

Code: Select all

<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
  Collapsible Group Item #1
</a>
After opening the source code window again, this tag is changed to:

Code: Select all

<a href="#collapseOne" data-toggle="collapse" data-parent="#accordion"> Collapsible Group Item #1 </a>
As anyone can see microtiny removed the attributes role="button", aria-expanded="true" as well as aria-controls="collapseOne" and reordered the other attributes.
Why behaves microtiny like this? Why doesn't leave microtiny the code as it is?

Re: microtiny v2.0.3 alters code (cmsms v2.1.2)

Posted: Fri Feb 05, 2016 11:48 pm
by paulbaker
so what? wrote:Why behaves microtiny like this?
I think it regards the HTML it does not recognise as an error and tries to correct it. Annoying, I have come across it myself. >:(

One solution is to change your template so that the HTML code appears outside of a content block.

Re: microtiny v2.0.3 alters code (cmsms v2.1.2)

Posted: Sat Feb 06, 2016 12:05 am
by Jeff
TinyMCE (what MicroTiny uses) is what does this be cause it doesn't think that it is valid HTML. Unfortunately there is no way to turn it off without turning of the WYSIWYG completely for that page.

Re: microtiny v2.0.3 alters code (cmsms v2.1.2)

Posted: Sat Feb 06, 2016 4:52 pm
by Dr.CSS
You may want to try tinyMCE and see if it has a HTML5 setting to allow that type of code...