mirror of
https://github.com/Codiad/Codiad.git
synced 2026-03-10 03:06:48 +01:00
Resolved color tool load issue
This commit is contained in:
@@ -210,7 +210,13 @@ var active = {
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
get_selected_text : function(){
|
||||
return editor.get_selected_text(active.get_id());
|
||||
var path = this.get_path();
|
||||
var id = this.get_id();
|
||||
if(path && id){
|
||||
return editor.get_selected_text(active.get_id());
|
||||
}else{
|
||||
message.error('No Open Files or Selected Text');
|
||||
}
|
||||
},
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -17,7 +17,13 @@
|
||||
$(function(){
|
||||
|
||||
selected = active.get_selected_text();
|
||||
sellength = selected.length;
|
||||
|
||||
if(selected==null){
|
||||
selected = '#45818a';
|
||||
sellength = 7;
|
||||
}else{
|
||||
sellength = selected.length;
|
||||
}
|
||||
|
||||
var colorRegEx = /^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$/;
|
||||
seltest = colorRegEx.test(selected);
|
||||
|
||||
Reference in New Issue
Block a user