codeeditor problems

Questions about how to use the online - editors and suggestions how to improve them
Post Reply
svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

codeeditor problems

Post by svasti » Wed Jul 16, 2014 6:49 pm

I have to re-do a website with complex text area. Texts are in divs next to each other. Some divs have only images. For instance a page may start with 3 divs next to each other: 1st div text, 2nd photo, 3rd logo, and continue with 2 divs (under the 3 divs), both containing some lists.
Everything is tight.
Because it is tight, it will not fit into an online editor with scroll bar.

So I though I'll use codeeditor... problem: the cursor is one letter off! Let's say I want to correct this: "t|xt" where | is the cursor. Now I type "e". Result: "etxt"... well, not always, but often.

Another thing: no practical image filemanager: clicking on an image in the image filemanager just inserts the filename... would be more practical if it would insert the whole img code with image dimensions.

Another thing: toggle preview Ctrl p doesn't go to preview but to some intermediate view where the preview is shown plus a div with the code. Unfortunately this div attaches itself to the last small div in the text. Would be nice, if it would keep some distance...

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: codeeditor problems

Post by Holger » Wed Jul 16, 2014 7:11 pm

Just another problem:
it seems that Codeeditor is not working at all for the default textareas (stylesheet / template) with XH 1.6+, because the class has changed.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: codeeditor problems

Post by cmb » Wed Jul 16, 2014 9:12 pm

svasti wrote:problem: the cursor is one letter off! Let's say I want to correct this: "t|xt" where | is the cursor. Now I type "e". Result: "etxt"... well, not always, but often.
Well, I'm having this problem on my website, too, since a long time. Apparently, I'm not the only one, but others told me, that this doesn't happen on their site.
svasti wrote:Another thing: no practical image filemanager: clicking on an image in the image filemanager just inserts the filename... would be more practical if it would insert the whole img code with image dimensions.
Yes, I had thought about it, too. But I wanted to be able to insert links to images (particularly for lightboxes), so I did it this way. Furthermore it is not stricly necessary to set the width and height properties for the images (yes, I know, it's better to avoid reflow).
svasti wrote:Another thing: toggle preview Ctrl p doesn't go to preview but to some intermediate view where the preview is shown plus a div with the code. Unfortunately this div attaches itself to the last small div in the text. Would be nice, if it would keep some distance...
Well, I'm not happy with the preview either, but I can't use the normal view mode, as that would require to save the editor contents.
Holger wrote:it seems that Codeeditor is not working at all for the default textareas (stylesheet / template) with XH 1.6+, because the class has changed.
Thanks for the reminder.

All in all I'll see what I can do. I had started to overhaul Codeeditor_XH a few months ago, but hadn't any time since then to continue.

Anyway, a viable workaround for the problems would be to copy&paste the contents between the online installation and a good text editor; sometimes I'm doing this myself, because Codeeditor sucks in comparison to real code editor.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: codeeditor problems

Post by svasti » Wed Jul 16, 2014 9:18 pm

cmb wrote:
svasti wrote:Another thing: no practical image filemanager: clicking on an image in the image filemanager just inserts the filename... would be more practical if it would insert the whole img code with image dimensions.
Yes, I had thought about it, too. But I wanted to be able to insert links to images (particularly for lightboxes), so I did it this way. Furthermore it is not stricly necessary to set the width and height properties for the images (yes, I know, it's better to avoid reflow).
Could you make 2 different commands? one for the link and one for a nicely prepared <img...>?

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: codeeditor problems

Post by svasti » Fri Jul 18, 2014 3:39 pm

cmb wrote:Codeeditor sucks
still I am quite happy that it exists.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: codeeditor problems

Post by cmb » Tue Dec 23, 2014 2:14 am

svasti wrote:still I am quite happy that it exists.
Thanks. The new version is supposed to solve at least the most annoying bug.
cmb wrote:
svasti wrote:Another thing: no practical image filemanager: clicking on an image in the image filemanager just inserts the filename... would be more practical if it would insert the whole img code with image dimensions.
Yes, I had thought about it, too. But I wanted to be able to insert links to images (particularly for lightboxes), so I did it this way. Furthermore it is not stricly necessary to set the width and height properties for the images (yes, I know, it's better to avoid reflow).
I've reconsidered this, and wrt. to the new userfiles folder layout of CMSimple_XH 1.6+ it might be practical to rework the respective functionality. One major issue is to retrieve the image dimensions, though. It seems there is an Ajax request necessary. I'll try to see to it.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply