Opened 8 years ago

Closed 6 months ago

#1544 closed enhancement (fixed)

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 8 years ago.
gecko.txt (55.2 KB) - added by adamj 8 years ago.
patch from winmerge

Download all attachments as: .zip

Change History (10)

comment:1 Changed 8 years ago by guest

comment:2 Changed 8 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 8 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 8 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 8 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 8 years ago by adamj

comment:6 follow-up: Changed 8 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 8 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 8 years ago by adamj

patch from winmerge

comment:8 Changed 6 months ago by gogo

  • Resolution set to fixed
  • Status changed from reopened to closed

[1393] Implements your solution as plugin PreserveSelection?

@NOTE This may be the first notification you will have seen from activity
on Xinha in years. If you currently use Xinha you might want to check
the Timeline at trac.xinha.org , to borrow from Twain, reports of it's
death have been greatly exaggerated.

Note: See TracTickets for help on using tickets.