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

#15033 Editor: preserve selected text (if any) when inserting a file. #15515

Conversation

dannylagrouw
Copy link
Contributor

Fix for #15033 (on inserting a non-image file, any selected text in the editor is overwritten with the file's title). This fix will preserve the selected text and link the file to that. If no text is selected, the file title is inserted. However...

  • I'm not sure if I used the right way to get to the selected text (this.tinymce.activeEditor.selection.getContent), I didn't see another easy way.
  • If you insert multiple files at once, the selected text will be repeated for every inserted file. I'm not sure if that's what you'd expect.
  • I got a lot of lint warnings on vars in the existing source file (markup.js). I replaced these with consts to be able to commit.

@matticbot matticbot added OSS Citizen [Size] S Small sized issue labels Jun 26, 2017
@designsimply designsimply added [Feature] Post/Page Editor The editor for editing posts and pages. [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Jun 26, 2017
@matticbot
Copy link
Contributor

@dannylagrouw This PR needs a rebase

@apeatling
Copy link
Member

Closing this because it is old and inactive. @aduth if you're willing to give this a review please reopen.

@apeatling apeatling closed this Nov 9, 2017
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. OSS Citizen [Size] S Small sized issue [Status] Needs Rebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants