Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CodeMirror #2894

Closed
tranzitwww opened this issue Mar 4, 2018 · 10 comments
Closed

Update CodeMirror #2894

tranzitwww opened this issue Mar 4, 2018 · 10 comments
Milestone

Comments

@tranzitwww
Copy link

Hi, Since the old ways the exporting scripts are gone, there seems to be another issue when someone tries to copy text from Greasemonkey editor window.
Evan editing it there is complicated, because, if I want to move a block of lines or a bigger function with cut&paste is not possible
Now it allows me to copy just a part of the code (more exactly 1055 characters), but never the whole thing.
Trying to do a CRTL+A and CRTL+C for a script larger than 1055 characters will results in having a clipboard with just one character "-" (minus).
It always fill the clipboard "-" for when trying to copy a larger text code, and this is frustrating because I just want to edit my own scripts and not to steal code from others (if is a security/privacy/copyright stuff)

I'm using Firefox 58 and Greasemonkey 4.2
Thanks!

@Eselce
Copy link
Contributor

Eselce commented Mar 4, 2018

Just copied 271323 bytes from a script by using Ctrl-A Ctrl-C without a problem (Win 8.1)...

@tranzitwww
Copy link
Author

tranzitwww commented Mar 4, 2018

I have Win7 64bit, but defensively that is not the cause...
Is there any other way to "extract" the script code from the editor or from firefox itself?

#2814 Doesn't include any export button...

@Eselce
Copy link
Contributor

Eselce commented Mar 4, 2018

Just wondered, because I never experienced any size limit.

In future, you can expect #2747 to help you. For now? I just wonder...

@tranzitwww
Copy link
Author

For sure, it will be nice to have a way to backup or export the script,
I saw that before posting this, but Copy/Paste was no included :)

@Sxderp
Copy link
Contributor

Sxderp commented Mar 4, 2018

I think it's a code mirror thing. If I remember correctly the hidden text field it uses doesn't always have all the text in it.

Might be and add-on or something that could help.

@tranzitwww
Copy link
Author

tranzitwww commented Mar 4, 2018

I experienced that to when I've tried to save the GM editor as a HTML page (or txt) from Firefox "Save Page as".
It just saves few lines, and everything that is bellow the screen (in the scroll bar) are missing.
But with copy/paste is different. If I exceed the 1055 bytes even if I select one more character from the same line, (not going more lines below) it will replace the clipboard with that "-" minus sign

@Sxderp
Copy link
Contributor

Sxderp commented Mar 4, 2018

It's a codemirror issue. I can find reports going back to years mentioning this odd behavior.

According to openstyles/stylus#225 the issue is resolved in 5.28.0+. We currently have 5.25.0 in our repo. An update may be what's required.

@tranzitwww
Copy link
Author

Thanks Sxderp!
It was related to that HTML object "Textarea" with its makeup scripts (codemirror)
Anyway a export/download button next to save wouldn't hurt :)

@arantius arantius changed the title Copy the code from Greasemonkey editor Update CodeMirror Mar 16, 2018
@arantius arantius added this to the 4.4 milestone Mar 16, 2018
@Sxderp
Copy link
Contributor

Sxderp commented Mar 25, 2018

I think @arantius should do this. Mostly because it's part of a third-party library and I assume when submitting to AMO he needs to provide links to exact versions and whatnot.

@arantius
Copy link
Collaborator

09d1fe4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants