I am accessing FCK.GetNamedCommandValue( 'FontSize' ) but always getting null, even when I can see there is a value set on its display. Its happening in IE and Moz. Im on 2.6.3 stable
I have no problem returning values for all other commands I have tried with GetNamedCommandValue, just 'FontSize'.
This problem is the same with textual small, medium large font sizes AND with redefined pixel sizes, so I dont think its to do with the values themselves.
I cant find any reported bugs after x hours on google. Am I just being stupid here?
Thanks in advance
Dave
OR
Let me ask this another way.
How should I be getting the currently selected value for FontSize, or can you point me towards the docs for this?
I have no problem returning values for all other commands I have tried with GetNamedCommandValue, just 'FontSize'.
This problem is the same with textual small, medium large font sizes AND with redefined pixel sizes, so I dont think its to do with the values themselves.
I cant find any reported bugs after x hours on google. Am I just being stupid here?
Thanks in advance
Dave
OR
Let me ask this another way.
How should I be getting the currently selected value for FontSize, or can you point me towards the docs for this?
Re: How do I return the command value for "FontSize"
This could be pointing to an old (pre-CSS), deprecated HTML tag for font size, and was just never removed from the newer version of FCKeditor. That's just a wildass guess.
I seem to have the best compatibility with browsers handling ALL font sizes (all font attributes, really) in CSS, and I set the fonts to percentages rather than pixels or points. The web pages scale very well, and the visitor has control over zooming the font sizes. (Newer browsers make it even easier, but I still code this way which works for the new and the medium-old browsers (like IE6 )
Hope this is of some help!
Dennis
Re: How do I return the command value for "FontSize"
Within the html source I can see that having changed font size around a selection of text adds spans as this <span style="font-size: 22px;">text</span>
@Everyone
In FCK editor when you select some text or even just move the cursor point to have focus within the text , FCK knows to change the relevant boolean values for buttons like bold or italic, and the relevant textual values for format or font.
I need to get the FontSize of the currently point or selection I am at. I am trying to get it from the value in the drop down, but if theres a different method for getting what FontSize is for a selection (short of reading the innerHTML of the selection and doing a regex looking for the size) I would be glad to use an alternative.
I just thought it made sense to use the value from the comand FontSize, as FCK is able to update the value in this drop down based upon what I just selected. Internally it must have a method for accessing this value, and for example this works to get the name:
valFontName = editorInstance.GetNamedCommandValue('FontName');
Thanks again
Dave
Re: Is FCK.GetNamedCommandValue( 'FontSize' ) Broken?
Anyone out there help me on this?
Someone must know how to get currently selected FontSize....please!
Thanks
Dave
Re: Is FCK.GetNamedCommandValue( 'FontSize' ) Broken?
Re: Is FCK.GetNamedCommandValue( 'FontSize' ) Broken?
No, theres no values in that HTML dump that relate to font size.
FCK EDITOR 2.6.3 has no way of returning currently selected font size, though methods exits for it.
This is a bug IMO