Main navigation
Product navigation
Main content
CKEditor 4
Overview
Demo
Accessibility Checker
Add-ons
Documentation
Download
Pricing
More
Home
WYSIWYG Editors
CKEditor 4
CKEditor 5
Image upload
CKFinder
Easy Image
Collaboration
Comments
New
Track changes
New
Collaborative editing
Pricing
Case studies
New
Documentation
Help center
Blog
Contact us
The forum operates in
read-only
mode. Please head to
StackOverflow
for support.
Forums
CKEditor
Support
Last post
Tue, 09/09/2003 - 04:11
#1
havran
Joined:
09/09/2003
Posts:
2
function GetSelectedText()
How to get selected text from FckEditor edit area. Is there function which done this??? Thnx.
Tue, 09/09/2003 - 04:11
#2
havran
Joined:
09/09/2003
Posts:
2
RE: function GetSelectedText()
Ok i create this function in fck_actions.js after
function GetClipboardHTML() >>>
function GetClipboardText()
{
var str_text = '';
var oSelection = objContent.DOM.selection ;
var oTextRange = oSelection.createRange() ;
if (oTextRange.text.substr(oTextRange.text.length-1) == ' ')
str_text = oTextRange.text.substr(0,oTextRange.text.lastIndexOf(' '));
else str_text = oTextRange.text;
return str_text
}
Twitter
Facebook
Facebook
Instagram
Medium
Linkedin
GitHub
Arrow down
Phone
Menu
Close icon
Check
RE: function GetSelectedText()
function GetClipboardHTML() >>>
function GetClipboardText()
{
var str_text = '';
var oSelection = objContent.DOM.selection ;
var oTextRange = oSelection.createRange() ;
if (oTextRange.text.substr(oTextRange.text.length-1) == ' ')
str_text = oTextRange.text.substr(0,oTextRange.text.lastIndexOf(' '));
else str_text = oTextRange.text;
return str_text
}