Maintain cursor location between WYSIWYG and HTML

Re: Maintain cursor location between WYSIWYG and HTML

by Rick Jerz -
Number of replies: 4
Picture of Particularly helpful Moodlers Picture of Testers
When I first click "Reply" (to your post), I am in regular editor mode. Then if I click on Advanced, I get more editor features. I believe that the cursor position is not maintained. In this post, my cursor is at the end of the paragraph. If I click Advanced, it is at the beginning of the paragraph.
Attachment advanced.png
In reply to Rick Jerz

Re: Maintain cursor location between WYSIWYG and HTML

by Theo Hughes -
Of course! Apologies. I was thinking about when, for example, an author edits a page etc. I was not thinking about forum posts.

I've got to say that I hadn't come across that problem. I'd either be typing a "basic" reply as now, or click "Advanced" straight away to create a more "designed" reply.

Also, even if I started typing and then click Advanced, I'm not sure my forum posts would be long enough or complex enough to worry.

However, I agree that it seems odd that it would not maintain the cursor position in this case... and I can see that it would be mildly disturbing.
In reply to Theo Hughes

Re: Maintain cursor location between WYSIWYG and HTML

by Theo Hughes -
My initial post is more about extensive authoring of content (often going back and editing)... and I like "clean" html (helps with ensuring it behaves nicely, especially on mobile... otherwise you can get some odd things.

A basic example being odd line breaks due to unintended   which you cannot see in WYSWIG... though I think you should be able to toggle to see, and is another feature that should be added to atto... could potentially even void most/many needs for toggling to HTML view).

Also, I like keeping my semantics and styling as separated as possible to aid design changes... e.g. if I want to change how I have styled "points to remember" in my text, I can just make one change to my css rather than having to go through hundreds of pages to change each one individually.
In reply to Theo Hughes

Re: Maintain cursor location between WYSIWYG and HTML

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Yep, different scenarios, but both involving the ATTO editor.  I have no clue if they are related.

In reply to Rick Jerz

Re: Maintain cursor location between WYSIWYG and HTML

by Theo Hughes -
They are related somewhat in use. Not related in code. If you switch to "advanced" that remains "within the atto code" (I'm guessing, haven't actually looked at the code. Whereas the switch to html actually switches out the atto editor for one that uses Code Mirror.