Effect on varies | Atto

Effect on varies | Atto

by Derek Chirnside -
Number of replies: 8

I am finding sometimes I get a new line with a space, and sometimes no space.  

In this particular place I had 

  1. typed a little text
  2. pressed ctrl-z, lost the lot
  3. continued typing <enter>
  4. Continued typing <enter>


Here, in both cases I pressed <Enter>:


Any idea why the difference?

-Derek

Average of ratings: -
In reply to Derek Chirnside

Re: Effect on varies | Atto

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

The ctr-z feature is related to an upstream firefox bug. Cut and paste is handled by the browser rather than by Atto. When this happens it deletes the whole content of the editor including the default paragraph block element. The thinner line spacing is inherited from the editor container which is a div element. The wider spacing appears when a p element is inserted. This happens when you select paragraph from the style menu, but there might be another way of doing it depending on the browser.

In reply to Daniel Thies

Re: Effect on varies | Atto

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
In reply to Visvanath Ratnaweera

Re: Effect on varies | Atto

by Just H -
In reply to Just H

Re: Effect on varies | Atto

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Dear Just

I said it once:
'What is a "text editor"' https://moodle.org/mod/forum/discuss.php?d=226174

and twice:
"text editor" https://moodle.org/mod/forum/discuss.php?d=311325#p1246274

and will keep on saying it any number of times!

For anybody who has seen a text editor (even Notepad is a text editor https://en.wikipedia.org/wiki/List_of_text_editors, BTW) things like The ctr-z feature is related to an upstream firefox bug. Cut and paste is handled by the browser rather than by Atto. When this happens it deletes the whole content of the editor including the default paragraph block element. just bizarre!

Calling a WYSIWYG HTML editor a text editor any number of times won't make it a text editor, just like you flogging the mule won't turn it to a donkey, not to talk of horses.
smile
In reply to Derek Chirnside

Re: Effect on varies | Atto

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Which version are you using? Eric Merrill recently did a number of fixes MDL-48467MDL-49693MDL-49686MDL-49671MDL-49564MDL-47002MDL-49565MDL-46746MDL-47003 to do with how atto cleans up the HTML (mostly focussed on what happens when you paste content in). I don't know if that improve things.

Almost all of that went into 2.9.0, 2.8.6 and 2.7.8.

In reply to Tim Hunt

Re: Effect on varies | Atto

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

I think it may be MDL-46069 again which you closed because Firefox changed, but I have seen it happen again. It would be helpful to have browser version info.

In reply to Daniel Thies

Re: Effect on varies | Atto

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

I realized that the formating problem is not from MDL-46069, but does occur in Firefox, but not Chrome. Whenever the contents of the editor are deleted in Firefox, a newline is inserted by default instead of and paragraph. Chrome's inserts both. Typing before newline in FF, does not cause a paragraph to be inserted, but inserting text after the last newline does.