Home › Forums › Legacy Support › Support queries › Other issues › Unit content editor changes text automatically
Tagged: content, Content Editor, unit
- This topic has 9 replies, 3 voices, and was last updated 8 years, 3 months ago by Anshuman Sahu.
Viewing 10 posts - 1 through 10 (of 10 total)
-
AuthorPosts
-
September 10, 2016 at 1:03 am #69928pacworksSpectatorWhen adding text to a unit using the content editor in TEXT mode, not VISUAL, it automatically rearranges my content. I am using divs to style content within the text. I can arrange the text how I want, in an organized way, but upon saving, it removes all spaces and somehow rearranges or deletes some of my divs. Is there a setting or some code I can modify so the content editor leaves my text/code exactly as I input it?September 10, 2016 at 6:54 am #69956H.K. LatiyanParticipantThe space added in the text mode won't work as the html do not recognise the space, html uses " " for spacing. So either use it for spacing or just add the divs you want and do all the spacing work in visual mode, it will automatically add spaces.September 12, 2016 at 5:49 pm #70236pacworksSpectatorThank you for your reply. I feel like I may not have explained my situation well. I realize spaces in html need to be coded in using " ". I'm specifically just talking about the way text appears in the editor after saving. Here is an example of what is happening. If I input organized code like like this into the text editor: <div class="container"> <div class="sample"> <div class="sample-2">Sample 2</div> </div> <div class="some-text"> Several paragraphs of text. </div> </div> After saving, my code is changed to something like this: <div class="container"><div class="sample"><div class="sample-2">Sample 2</div> </div><div class="some-text">Several paragraphs of text.</div></div> Its almost as if the editor is minimizing my code, but in the process it seems to try and calculate whether or not all of my divs are needed. I kept having this problem where the editor kept deleting an opening and closing container div (leaving all the content in the middle). I couldn't figure out why my content wasn't outputting correctly until I realized that code I had inputted disappeared after saving. I finally got it to save and keep my changes, but it was annoying. I don't so much mind that the editor scrunches all of my code together, although it makes it more difficult to make edits if needed, but removing code is not cool. I wasn't sure if this was a setting or if it was something I could change easily, but I would like the text editor to leave my text exactly how I input it.September 12, 2016 at 6:19 pm #70241pacworksSpectatorApparently the same thing happens with the text editor in this forum. I entered the text like this in visual mode: After clicking "Reply" it removed spaces and posted like this: <div class="container"> <div class="sample"> <div class="sample-2">Sample 2</div> </div> <div class="some-text"> Several paragraphs of text. </div> </div> I added " " to see if I could code in the spaces in text mode and switched to visual mode. The spaces were there, but when I switched back to text mode, the " " code I had inputted was removed.September 13, 2016 at 12:29 pm #70351Anshuman SahuKeymasterOkay thanks for the explanation . YEs sometimes the tinymce editor trims the special chars . It trims white spaces and unclosed divisions in the html dom and hence the html remains like this .September 13, 2016 at 10:07 pm #70405pacworksSpectatorOkay. I can deal with it trimming white spaces. Is there anyway to make the editor not change my actual code? For instance, I was working with it today trying to cope with it. I have a folder titled "img" in my root directory. So, when I try to link to an image in that folder I am typing the link like this: /img/biology/intro_1.jpg Upon saving, the editor changes it to this: ../img/biology/intro_1.jpg "/" and "../" are not the same thing. "/" directs to the root folder. "../" directs to move up one folder. So, I can't get my images linked properly because the editor changes this, resulting in broken images. I also noticed that if I make changes in text mode and then click save, it reverts back to the last save point and then saves, which totally eliminates my changes. For instance, if I am in text mode and I completely delete all of the text, and then click save. It puts all of the text back in the editor and then saves it. However, if I am in text mode and delete all of the text and switch to visual mode, then save, it keeps my changes (mostly, it still changes some of my codes, like the links mentioned above). I don't know why it is doing this, but it is making it very difficult to work with.September 14, 2016 at 12:59 pm #70493Anshuman SahuKeymasterWell you need to provide the absolute urls there in the wp-editor to provide the links to the images ../ folder roots wll not work and will be trimmed off . You can use the third party plugins like this if you want to use the Raw html in wordpress pages .September 14, 2016 at 5:08 pm #70534pacworksSpectatorThank you! The recommended plugin makes the editor function exactly how I want. I didn't realize until just now that this was more of an issue I had with WordPress rather than WPLMS, but thank you for offering a solution.September 14, 2016 at 6:03 pm #70541pacworksSpectatorMaybe I spoke too soon. The plugin appears to be working perfect for posts and pages, but doesn't seem to be affecting unit posts within the LMS. At least, the same options are not available in the right column as with posts and pages. Do you know of a way to extend this plugin to the unit posts?September 15, 2016 at 2:39 pm #70669Anshuman SahuKeymasterOk i have modified the plugin to work with the units also .You can download the modified version here : http://www.filedropper.com/raw-html_1
-
AuthorPosts
Viewing 10 posts - 1 through 10 (of 10 total)
- The topic ‘Unit content editor changes text automatically’ is closed to new replies.