Ticket #1544 (reopened enhancement)

Opened 3 years ago

Last modified 3 years ago

retain selection between modes

Reported by: Adam J Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version: trunk
Severity: normal Keywords:
Cc: adam@…

Description

similar to #900 but this would also retain cursor selection instead of just cursor position when toggling between modes.

Adam J

Attachments

Gecko.js (28.2 kB) - added by adamj 3 years ago.
gecko.txt (55.2 kB) - added by adamj 3 years ago.
patch from winmerge

Change History

  Changed 3 years ago by guest

works in wysiwygpro http://www.wysiwygpro.com/index.php?id=337

Adam J

  Changed 3 years ago by gogo

  • status changed from new to closed
  • resolution set to wontfix

They do not use a plain textarea for the source like we do, their source view is "rich" (note the syntax highlighting etc) which would allow them to do this.

I guess this could be done as a plugin to allow similar "rich source" editing, overriding the standard view source button. But not part of Xinha core.

Closing wontfix but plugin contributions welcome!

  Changed 3 years ago by guest

Thanks for the quick reply.

Is it not possible to add a control character to the beginning and end of a selection?

Also if I was to look into the plugin route how would it be easier to achieve?

  Changed 3 years ago by gogo

Yes maybe you could do that, I don't know enough about the selection/range capabilities of the textarea.

Patches welcome but not something I can put time into.

As for plugin, I meant if you/somebody was to create a rich source view like in WYSIWYGPro, that should be a plugin, not part of core. Not easier, just better.

  Changed 3 years ago by adamj

  • cc adam@… added
  • reporter changed from guest to Adam J

I'm pretty sure this can be made to work. I may implement this at some point. Perhaps we could reopen this bug and add it to a "Features Paradize" category in the roadmap? This category could be used for bugs/ features that you can't put time into.

Changed 3 years ago by adamj

follow-up: ↓ 7   Changed 3 years ago by adamj

  • status changed from closed to reopened
  • resolution deleted

Submitted a patch for gecko. Webkit should work in the same way.

Needs a little more work as some circumstances can break the selection. But generally seems to work ok.

in reply to: ↑ 6   Changed 3 years ago by guest

Replying to adamj:

Submitted a patch for gecko. Webkit should work in the same way. Needs a little more work as some circumstances can break the selection. But generally seems to work ok.

@adamj, do you have a diff against the Gecko.js trunk that you could upload?

Changed 3 years ago by adamj

patch from winmerge

Note: See TracTickets for help on using tickets.