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

Compatibility with TinyMCE 3? #3

Closed
tdm00 opened this issue Aug 29, 2013 · 3 comments
Closed

Compatibility with TinyMCE 3? #3

tdm00 opened this issue Aug 29, 2013 · 3 comments

Comments

@tdm00
Copy link

tdm00 commented Aug 29, 2013

I'm using TinyMCE for a text area and I'm trying to grab the selected text within the TinyMCE editor to modify. My var range = $("#editor").textrange(); code keeps returning an object but the position, start, end and length are all 0 and text is blank.

@tdm00
Copy link
Author

tdm00 commented Aug 29, 2013

Sorry, it looks like TinyMCE has this capability already and I didn't know it.

// get the selected text in the editor
alert(tinymce.activeEditor.selection.getContent());

// replace the selected text with different text
alert(tinymce.activeEditor.selection.setContent('Ready for battle princess?'));

@tdm00 tdm00 closed this as completed Aug 29, 2013
@imhoffd
Copy link
Owner

imhoffd commented Sep 8, 2013

Typically I would not advise the use of this plugin with any WYSIWYG editors, as so much is going on within the actual editor. It's a bit out of scope for this jQuery plugin and as you found out many of the extensive editors have this functionality already.

@tdm00
Copy link
Author

tdm00 commented Sep 8, 2013

No idea, it's beyond my JavaScript skills at the moment. In any case, thanks for a great plugin.

On Sep 8, 2013, at 12:04 AM, Daniel Imhoff notifications@github.com wrote:

Typically I would not advise the use of this plugin with any WYSIWYG editors, as so much is going on within the actual editor. It's a bit out of scope for this jQuery plugin and as you found out many of the extensive editors have this functionality already.

Still, I am curious as to why it did not work.


Reply to this email directly or view it on GitHub.

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

2 participants