mirror of
https://github.com/xevidos/codiad.git
synced 2025-01-03 11:42:12 +01:00
Updated selection of text when opening sort
This commit is contained in:
parent
2e6367e459
commit
167cd673a7
1 changed files with 16 additions and 2 deletions
|
@ -1566,9 +1566,23 @@
|
|||
|
||||
openSort: function() {
|
||||
|
||||
if( this.getActive() && codiad.active.getSelectedText() != "" ) {
|
||||
let selected = codiad.active.getSelectedText();
|
||||
|
||||
if( this.getActive() && selected != "" ) {
|
||||
|
||||
codiad.modal.load( 400, 'components/editor/dialog.php?action=sort' );
|
||||
codiad.modal.load(
|
||||
400,
|
||||
'components/editor/dialog.php?action=sort'
|
||||
{},
|
||||
function( c ) {
|
||||
|
||||
let textarea = c.find( 'textarea:first' );
|
||||
|
||||
textarea.val( selected )
|
||||
textarea.focus();
|
||||
codiad.modal.hideOverlay();
|
||||
}
|
||||
);
|
||||
codiad.modal.hideOverlay();
|
||||
} else {
|
||||
|
||||
|
|
Loading…
Reference in a new issue