zdeneklogin Posted June 16, 2016 Share Posted June 16, 2016 I use this code for "read more" option (see bellow), it works perfectly in different eshop system But it does not work in prestashop text editor. Text is not unrolled. I have already extended tinymce to rich editor. How to change tinymce configuration code ? HTML <input type="checkbox" class="unpack" id="box" /> <div class="unpack"><label for="box"></label> <div class="hiden-text">hello world hello world hello world</div> CSS input.unpack {display: none;} input[type=checkbox]:checked + .unpack .hiden-text {display: block} .unpack > .hiden-text {display: none} .unpack > label { display: block; cursor: pointer; background:#f5f5f5; color: #f5f5f5; padding: .5em } input[type=checkbox]:checked + .unpack label {background: #f5f5f5;} .unpack > label:before { content: "read more"; background: #f5f5f5; color: red; padding: 0 .3em; margin-right: .5em; border-radius: 3px } input[type=checkbox]:checked + .unpack label:before {content: "close text"; color: red; font-weight: strong; font-size: 14px} Link to comment Share on other sites More sharing options...
vekia Posted June 16, 2016 Share Posted June 16, 2016 if you save this code in the editor - it is different after save? Link to comment Share on other sites More sharing options...
zdeneklogin Posted June 16, 2016 Author Share Posted June 16, 2016 The code is still the same after save. Link to comment Share on other sites More sharing options...
vekia Posted June 16, 2016 Share Posted June 16, 2016 can you past here full code that you put into the editor, please? Link to comment Share on other sites More sharing options...
zdeneklogin Posted June 16, 2016 Author Share Posted June 16, 2016 I put this code (through "source code" button) <input type="checkbox" class="unpack" id="box" /> <div class="unpack"><label for="box"></label> <div class="hiden-text">hello world hello world hello world</div> But I see only "read more" link and nothing happens after click Link to comment Share on other sites More sharing options...
vekia Posted June 16, 2016 Share Posted June 16, 2016 where is the rest of the code? this code does nothing it is necessary to use some js code too to make it work Link to comment Share on other sites More sharing options...
zdeneklogin Posted June 16, 2016 Author Share Posted June 16, 2016 this is css solution, you do not need any js, as I wrote in my first post = first part of code ("hmtl") I put to the editor a second part ("CSS") to CSS This method works perfectly in other editors what I use... so there have to be some bad setting in tinymce configuration code Link to comment Share on other sites More sharing options...
zdeneklogin Posted June 18, 2016 Author Share Posted June 18, 2016 in tinymce editor the code does not work in desktop but it works in android... any idea how to modify tinymce code ? OR do you have different solution for "read more" option (using of js, css,...) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now