Hi!
Is there a way to retrieve if a style, like bold or italic, is used at the cursor position (or on current selection)?
I have tried things like:
var editor = FCKeditorAPI.GetInstance('data');
editor.Selection.GetSelectedElement();
editor.Selection.GetSelectedElement('_FCK_Bold');
editor.Selection.GetSelectedElement(editor.Styles.GetStyle('_FCK_Bold'));
editor.Styles.GetStyle('_FCK_Bold');
..and browsing different objects with Firebug, but with no luck. What I am locking for is a function that returns true/false if the selection has the specified style applied, or similar.
Hope you can help!
// Markus
Is there a way to retrieve if a style, like bold or italic, is used at the cursor position (or on current selection)?
I have tried things like:
var editor = FCKeditorAPI.GetInstance('data');
editor.Selection.GetSelectedElement();
editor.Selection.GetSelectedElement('_FCK_Bold');
editor.Selection.GetSelectedElement(editor.Styles.GetStyle('_FCK_Bold'));
editor.Styles.GetStyle('_FCK_Bold');
..and browsing different objects with Firebug, but with no luck. What I am locking for is a function that returns true/false if the selection has the specified style applied, or similar.
Hope you can help!
// Markus
Re: How to get style (ie bold) at cursor position
Re: How to get style (ie bold) at cursor position
This method call will return true if the selected text in fckeditor 'data' is bold.