Opened 4 years ago

Last modified 4 years ago

#1544 reopened enhancement

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 (2)

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

Download all attachments as: .zip

Change History (9)

comment:1 Changed 4 years ago by guest

comment:2 Changed 4 years ago by gogo

  • Resolution set to wontfix
  • Status changed from new to closed

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!

comment:3 Changed 4 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?

comment:4 Changed 4 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.

comment:5 Changed 4 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 4 years ago by adamj

comment:6 follow-up: Changed 4 years ago by adamj

  • Resolution wontfix deleted
  • Status changed from closed to reopened

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.

comment:7 in reply to: ↑ 6 Changed 4 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 4 years ago by adamj

patch from winmerge

Note: See TracTickets for help on using tickets.