HTML Editor makes code changes - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: HTML Editor makes code changes (/showthread.php?tid=5373) |
HTML Editor makes code changes - Lucianp - 2013-11-14 I do all my coding in Sublime Text 2 and then paste it into the HTML Editor using the source tab. The problem that I am having is the code gets changed, for instance; <a tabindex="1"><?php get_site_url(); ?><img src="<?php get_theme_url(); ?>/img/orchid.jpg"></a> becomes <a tabindex="1"><!--?php get_site_url(); ?--><img src="<?php get_theme_url(); ?>t;/img/orchid.jpg" /></a> basically it's <?PHP becomes <!--?php and ?> becomes ?--> Even if I manually code it into the editor, it will change as soon as I hit save. I am using v3.2.3. The wiki suggests creating a config file for this but,never having created a config file, I wouldn't know where to start. Are there any settings that address the sort of problem I am seeing and how would I implement them. thanks for your help. RE: HTML Editor makes code changes - shawn_a - 2013-11-14 You cannot put php in page contents. RE: HTML Editor makes code changes - Lucianp - 2013-11-14 Well, that certainly explains that one Shawn So I need to write my path in full? thanks RE: HTML Editor makes code changes - shawn_a - 2013-11-14 Depends on what you are trying to do. Could go in a new template in your theme, could go in a component. You can use dynapages plugin to add component shortcodes. RE: HTML Editor makes code changes - Lucianp - 2013-11-14 I found this nice gallery that I want to add alpatriott.ru/works/album/album-mod.html Basically, the HTML code is <div class="gallery"> <a tabindex="1"><img src="http://mysite/theme/mytheme/img/image1.jpg"></a> <a tabindex="1"><img src="http://mysite/theme/mytheme/img/image2.jpg"></a> <a tabindex="1"><img src="http://mysite/theme/mytheme/img/image3.jpg"></a> <a tabindex="1"><img src="http://mysite/theme/mytheme/img/image4.jpg"></a> </div> I was trying to add it to a blank template page. The images will all be in the same folder (obviously) so I don't want to keep adding the full path. I want to be able to quickly go in and change the image if necessary. I don't necessarily want to use someone elses plugin, I want to use it as a learning tool. My PHP is lacking somewhat thanks RE: HTML Editor makes code changes - shawn_a - 2013-11-14 Just use relative urls. ../../data/uploads/ Or something like that RE: HTML Editor makes code changes - Carlos - 2013-11-14 @lucianp I think you mean something like this: Code: <?php (Not tested.) RE: HTML Editor makes code changes - Lucianp - 2013-11-14 Thank you Shawn and Carlos, having thought a bit harder and a bit longer about what I am trying to do, I realized I would need a backend for image manipulation, so I added a plugin to my site and will use that to learn from. I'm beginning to see PHP can be fun RE: HTML Editor makes code changes - vginer - 2013-12-11 Hello, I have a similar problem. I want to use FontAwesome icons as bullets in a unordered list environment, but when I paste this code into the HTML editor: Code: <ul class="fa-ul"> the smart editor transforms it into this: Code: <ul class="fa-ul"> Is there any way to prevent the smart editor from "cleaning" the code?? Is there any way to disable the smart editor, and to work only with raw HTML? RE: HTML Editor makes code changes - Carlos - 2013-12-11 (2013-12-11, 16:41:28)vginer Wrote: Is there any way to disable the smart editor, and to work only with raw HTML? Yes: go to Settings and untick "Enable the HTML editor" RE: HTML Editor makes code changes - vginer - 2013-12-11 (2013-12-11, 16:50:26)Carlos Wrote:(2013-12-11, 16:41:28)vginer Wrote: Is there any way to disable the smart editor, and to work only with raw HTML? @Carlos, thank you!! And another one: Is there a way to change the default font (Arial-like) of the raw HTML editor (to a monospaced one)? RE: HTML Editor makes code changes - shawn_a - 2013-12-12 Ckeditor removes empty tags There is a way to fix this, but youll have to search the forums. RE: HTML Editor makes code changes - shawn_a - 2013-12-12 See http://ckeditor.com/forums/CKEditor-3.x/%C2%A0-empty-tags-eg. I do not think this is fixable in our cke version. You might want to try the cke patch branch of GS which runs cke4+, it might be more html5 friendly. RE: HTML Editor makes code changes - shawn_a - 2013-12-12 Actually never mind Fixed CKEDITOR.dtd.$removeEmpty.i = 0; Add that to your config.js, you can also add .span etc. RE: HTML Editor makes code changes - shawn_a - 2013-12-12 To modify the plaintext textarea, use the custom admin css plugin Code: textarea#post-content { RE: HTML Editor makes code changes - vginer - 2013-12-12 (2013-12-12, 01:25:23)shawn_a Wrote: Actually never mind Thank you! So, do you mean this is already solved?? RE: HTML Editor makes code changes - shawn_a - 2013-12-12 Thats the solution, works for me. Might need to test it in your scenario, I only tested it on the beta version, not stable. RE: HTML Editor makes code changes - vginer - 2013-12-12 (2013-12-12, 01:28:17)shawn_a Wrote: To modify the plaintext textarea, use the custom admin css plugin Thank you. I installed Custom Admin CSS, and used your code in order to customize the text area appearance. At the beginning it didn't work, at least on my browser (Chrome), but I removed all carry returns and it worked! RE: HTML Editor makes code changes - shawn_a - 2013-12-13 Did you try the ckeditor fix yet? RE: HTML Editor makes code changes - vginer - 2013-12-13 (2013-12-13, 00:23:13)shawn_a Wrote: Did you try the ckeditor fix yet? No, I finally decided to disable it after reading several posts in the forum, because that way I am sure that my code is not altered. Thank you anyway. |