Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
disable acf in CKEditor
#1
Driving me nuts, again. I do not want the editor to mess with my code in any way, ever. After half an hour of research and trying, I'm still nowhere. Please tell me how to switch that off.
Thank you!
Reply
#2
(2016-01-26, 23:47:42)wdburgdorf Wrote: Driving me nuts, again. I do not want the editor to mess with my code in any way, ever. After half an hour of research and trying, I'm still nowhere. Please tell me how to switch that off.
Thank you!

I posted a thread similar to yours about 3 weeks ago and never received a satisfactory answer. I am hoping you find better success, I will be watching this thread. But, I agree - this is a horrible feature... DON'T TOUCH MY  $@#*&  CODE!
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Reply
#3
Turn off html editor in settings
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#4
The cke patch version and plugin disable acf
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
(2016-01-27, 10:01:08)shawn_a Wrote: The cke patch version and plugin disable acf

Hi Shawn, 

Thanks for coming in. Where can we find those things? Do you mean this:
http://get-simple.info/extend/plugin/gsckepatch/899/

Switching off editor: Makes it all useless for clients.
Reply
#6
I installed GSCkePatch now. No more editor at all - blank space where it should show up.
Never mind - upload had not finished. Lots of files.

Still: I tried to add my code again and see if it won't be zapped anymore. It unfortunately still is zapped, just in a different way:
Original: <p>thisisalong&shy;word</p>
Zapped (i.e. after saving): <p>thisisalong*word</p>
* is actually a red dot, but when pasting here, it disappears. In the real source code (not what is presented in cke), it looks like this:
thisisalong<span class="cm-invalidchar" title="\uad">•</span>word
Reply
#7
And:
<?php ... ?> is still turned into &lt;?php ... ?&gt;
Reply
#8
(2016-01-27, 10:01:08)shawn_a Wrote: The cke patch version and plugin disable acf

I am using the cke patch version and I can confirm that acf is ON. The editor constantly screws with my program listings.

For most people, this is probably not that big of deal. But my website is program code for micro-controllers and overriding formatting that a programmer adds for clarity is a big deal!
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Reply
#9
Post your content so i can see it.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#10
And ill state it again a wysiwyg is gonna reformat your code thats what it does.
A markdown editor might be better suited
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#11
(2016-01-28, 07:49:04)wdburgdorf Wrote: And:
<?php ... ?> is still turned into &lt;?php ... ?&gt;

I can help a bit for that problem.

If you cut and paste using the "source" view, it will usually leave the <> alone.
However, if you want your own indentation, multiple statements per line, or to break lines in a custom manner, it is going to do its own thing.

The above is true for program listings... not sure what happens in "source" view with plain text.
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Reply
#12
(2016-01-28, 11:08:49)shawn_a Wrote: And ill state it again a wysiwyg is gonna reformat your code thats what it does.
A markdown editor might be better suited

I disagree with this conclusion - wee-zee-wig is supposed to leave the text exactly as you typed it. The wysiwyg means the font size, color, line spacing, etc is faithfully displayed (as opposed to unformatted text commands).

Before wysiwyg, everything was a fixed courier font, black&white or black&green font color, (typewriter style) and did not faithfully show pictures,background, justification, etc. wysiwyg does not infer playing with character substitution, hard returns or indentation.

The earliest versions of TinyMCE/Ckedit did not reformat (Ckedit is a spinoff of TinyMCE). TinyMCE was, and still is, lean & mean (where performance on low power limited RAM computers was important); Ckedit forked off and was at the time "bloated", or as we now say - feature rich.

I would estimate that code reformatting in a js text area engine started about 4-5 years ago. This is a new "feature"; exclusive to js editors as far as I know. The earliest incarnation of code reformatting that I can remember was MS visual basic about 7-10 years ago. wysiwyg has been around without reformatting for at least 30yrs.

Character substitution is the new kid on the block... becoming common in the last year or two; and mostly for security reasons.
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Reply
#13
>> A markdown editor might be better suited

Yes, totally, for myself. But no client can handle it. Of course, I can switch, make my edits, and then switch again for clients. But as soon as they change something, it will be messed up again.

And I agree with jwzumwalt, a WYSIWYG editor should show what you get, not change it.
With Joomla I have the same issue, but the editor I use there (JCE) has at least some options for what is cleaned and what is left alone. And for php and js within articles there is an extension that helps against "evil" editors: Sourcerer (https://goo.gl/mlbIMs)
I don't mean to suggest that GetSimple should be more like Joomla, not at all. Just mention it as a possible solution, if CKE cannot be tamed.

My problem at hand is that I need to set conditional hyphens and don't know how.
Reply
#14
(2016-01-28, 20:34:27)wdburgdorf Wrote: >> A markdown editor might be better suited

Yes, totally, for myself. But no client can handle it. 

Just for info:

You can include a toolbar for editing markdown: https://gist.github.com/tablatronix/ef96...adaae3f3e4

Lepture markdown editor: http://lab.lepture.com/editor/

Or via plugin: http://get-simple.info/forums/showthread.php?tid=7135 (see also bottom post)
Reply
#15
There are already plugins for that, that are beyond proof of concepts, carlos makes one.

How is a wysiwyg editor supposed to not change your code.

It doesn't remember the source separately, it cant preserve your jacked up manual edits, open tags, and other nonsense that is not representable in the UI.

It HAS to reformat it so it can perform wysiwyg editing on it, then convert it back to source. It can't track what you want as inline styles and what you want as html4 <color> tags, it can't allow old school font tags mixed with inline styles, same way it can't allow you to just stick things that are not semantically correct or open or bad tags, it is not made for programmers, its made for users, if you want control turn it off and use an alternative, you can't have both.

You can expand CKE to allow certain things, or treat thing as inline or block tags. This requires advanced configuration and reading the cke forums and release notes and documentation.

But if you stick stuff in source and save it, it will still reformat it next time you save the wysiwyg mode.
If you want code blocks with control over entities you can probably configure that somehow. But this is beyond the scope of simple. The point of cke is you use a widget or a plugin to insert stuff like that,

For the markdown editors you have to save both the source code and the content separately, which quickly becomes a pain in the ass. I think carlos's plugin works pretty well though, or at least has the right idea if you want UI and source editing preserved.

Hopefully in the future a simpler html5 editor and a markdown editor will be easier to implement.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#16
I am not exactly a fan of CKeditor, but it is what was used in the past, and will probably continue to be used.

I tried to disable it using
config.allowedContent :true
in patched branches/plugins, not sure what it still prevents.

http://docs.ckeditor.com/#!/guide/dev_ad...ent_filter

Like I said, send me your content or post to github in an issue if you want me to investigate...

Are you actually just having utf-8 problems ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#17
<pre tags

http://tablatronix.com/testing-stuff/?lang=en

hmm seems ok, but it actually is trying to close stuff in my code.

</times;x++)></button.h></wifimanager.h></esp8266webserver.h></dnsserver.h></simpletimer.h></esp8266wifi.h></pre>

hmmmmmmm

edit nevermind, I updated to patch 4.x works fine now.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#18
if you want protected source say for php tags

config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP code
but that probably needs tweaking if you want php source code display.

if you want source code, stick it in pre tags.
I gotta figure out how to add support for phrase and code tags, as of now they strip newlines.

Not sure why.

Either way it is pretty hard to paste non encoded source without a plugin I think.

When i paste php, it just turns it into comments.
<pre><!--?php echo $test; ?-->
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#19
just use this
http://ckeditor.com/apps/ckeditor/4.4.0/...ippet.html
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#20
(2016-01-29, 08:35:01)shawn_a Wrote: if you want protected source say for php tags

config.protectedSource.push( /<\?[\s\S]*?\?>/g );   // PHP code
but that probably needs tweaking if you want php source code display.

if you want source code, stick it in pre tags.
I gotta figure out how to add support for phrase and code tags, as of now they strip newlines.

Not sure why.

Either way it is pretty hard to paste non encoded source without a plugin I think.

When i paste php, it just turns it into comments.
<pre><!--?php echo $test; ?-->

I do use <pre>, it still does not work. I also tried <code>, <xml>, and <tt> and a myriad of custom <div>.
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Reply
#21
(2016-01-29, 07:49:12)shawn_a Wrote: There are already plugins for that, that are beyond proof of concepts, carlos makes one.

How is a wysiwyg editor supposed to not change your code.

It doesn't remember the source separately, it cant preserve your jacked up manual edits, open tags, and other nonsense that is not representable in the UI.

It HAS to reformat it so it can perform wysiwyg editing on it, then convert it back to source. It can't track what you want as inline styles and what you want as html4 <color> tags, it can't allow old school font tags mixed with inline styles, same way it can't allow you to just stick things that are not semantically correct or open or bad tags, it is not made for programmers, its made for users, if you want control turn it off and use an alternative, you can't have both.

You can expand CKE to allow certain things, or treat thing as inline or block tags. This requires advanced configuration and reading the cke forums and release notes and documentation.

But if you stick stuff in source and save it, it will still reformat it next time you save the wysiwyg mode.
If you want code blocks with control over entities you can probably configure that somehow. But this is beyond the scope of simple. The point of cke is you use a widget or a plugin to insert stuff like that,

For the markdown editors you have to save both the source code and the content separately, which quickly becomes a pain in the ass. I think carlos's plugin works pretty well though, or at least has the right idea if you want UI and source editing preserved.

Hopefully in the future a simpler html5 editor and a markdown editor will be easier to implement.

Think MS Word - the indentation, spaces, and hard returns don't move Smile

In MS Word or a true (wysiwyg), if I write...
dit(); da(); dit();  // against the margin, it will stay there
<br><br><br> // compact

ckedit will do this (or something similar)...
           dit();
           da();
           dit();  // no longer one line or against the margin
           <p>&nbsp;
           <br>
           <br></p> // now spread out and screwed with
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Reply
#22
thats because ckeditor turns that into a dom then saves it back out.
You can use protected source, but then that Element ONLY shows in source.

Ms word doesnt have a source mode, nor does it need to convert to other formats on the fly and back.
Ever try that? I do it all day doc csv xml pdf rtf, try preserving anything across those and the problem of wysiwyg becomes apparant.

Whitespace is preserved in pre elements, i gotta figure which oart of the datawriter handles whitespace newlines and indentation. And figure out how you customize those things for elements.

If you stick that example you just put inside a pre in source mode it stays that way from my experience.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#23
I have some stuff to try, ill start testing.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#24
(2016-01-29, 11:58:00)shawn_a Wrote: I have some stuff to try, ill start testing.

Just so you know this is an irritation, but not a deal breaker.

As near as I can recall, this is the only real issue I have left with GS and I am happily using it  - I can cheerfully live with it if necessary. I started with about 5-6 major issues a month ago and you and others slowly whittled away at each of them - now we are down to one and it isn't that big.

The only problem I run into is if I forget to switch to source view... it can blow everything up. After having that happen every once in a while, I remember pretty good for a few days.

As far as stability and user support, you folks are doing quite a bit better than most commercial paid programs - I and others are very appreciative of the hard work and quick response times.

------
Quick story...
Right after Aerobus made their first fully automated 525 seat A380 computer flight control system, they sent their test pilot to a airshow to show it off with a fly by. Aerobus had announced that aviation was entering a new era and would be virtually accident free because computers would prevent human error. The pilot put the airplane in "landing" mode, lowered flaps and gear, and lazily flew past the awe struck crowed just a few feet above the runway. As he came near the end of the field, he pushed the throttles full forward, the computer refused the command because it thought he was trying to takeoff and it decided there was not enough runway for a takeoff. The aircraft majestically glided into the tall trees at the end of the runway. The closest the pilot ever got to a funeral was the spectacular fiery $30 million dollar public cremation that followed. The moral of the story is "...there are always unintended consequences when we allow a computer to over ride human operators". (And most people would rather die from their own mistakes, then from one made by a computer!)
Thanks,
jwzumwalt
(\__/)
(='.'=)
(")_(")
Reply
#25
I would like to see protected code but that still shows as read only in the editor, that does nit seem to be possible, unless its a widget or similar.

Either way i dont use it for the same reasons and inthink its a huge problem and has been since like 2009.
It is just not at the top of any priority list. It is something that the userbase and members has never fixed or adressed so i am going to have to. It is well within the capability of the public, but as i said it takes a lot of reading up on ckeditor maybe 12 hours of reseach and testing.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)