Advanced HTML Editor 3 Support Product Page

Implemented

Applying CSS Classes

Shared 03 Apr 2012 02:54:49
5
like this idea
03 Apr 2012 02:54:49 Richard Apperly posted:
Why is it when I apply a CSS class to some selected text does it apply the style to the entire paragraph rather than just the span of text that is selected?

QUite often I may want to change the style of some text that is in the middle of a paragraph.

And are there any plans on implementing a style preview in the CSS dropdown list? Some other editors offer this.

Replies

Replied 08 Aug 2012 22:53:20
08 Aug 2012 22:53:20 Richard Apperly replied:
I notice this still has not been fixed in the latest update. I don't know how anyone can use this when such a basic feature is not working?

I would say that 95% of my clients often wish to change the style of a portion of text within a paragrapgh...not wanting the entire paragraph to change style.

Not very happy.
Replied 09 Aug 2012 08:41:54
09 Aug 2012 08:41:54 Teodor Kuduschiev replied:
Hello,

Unfortunately that is how the editor works - a class can only be applied to an already created html element <p>, <div> ... etc.
If you want to style the color, size, font-decoration of a single word for example, you can do this using those options in the editor.
Replied 09 Aug 2012 08:56:46
09 Aug 2012 08:56:46 Richard Apperly replied:
Sorry to say that I find that really strange and makes it pretty unusable for me.
Replied 08 Nov 2012 00:09:48
08 Nov 2012 00:09:48 Richard Apperly replied:
I see you still can't style a section of a paragraph. If you apply a CSS style it applies it to the entire paragraph or html element above.

Surely you should be able to create a <span> within an HTML element? I continue to find this extremely strange and something that prevents me from using or recommeding, despite the fact I have purchased this extension.
Replied 01 Feb 2013 19:30:52
01 Feb 2013 19:30:52 Tom Waters replied:
This really is needed. I would think that since you can apply bold, italic, color and font choices to selected text, you should be able to update the editor to apply a span and then apply your css selectors to that.
Replied 03 Feb 2013 19:14:16
03 Feb 2013 19:14:16 Linda Huff replied:
I agree with Tom Waters. Normally, CMS editors allow you to apply a style-based class using span to selected words within a paragraph.
Replied 03 Feb 2013 21:48:19
03 Feb 2013 21:48:19 Richard Apperly replied:
I've been asking for this for a long time without luck...so don't hold your breath.
Replied 20 Feb 2013 19:00:14
20 Feb 2013 19:00:14 Tom Waters replied:
I posted this in "Ideas" but I will repost here.
Looking at the javascript file for the editor you can see that at the top it says:
"Rangy, a cross-browser JavaScript range and selection library
code.google.com/p/rangy/"

Go to the Randy site linked above and go to modules and you can see that this capability is now available.

code.google.com/p/rangy/wiki/CSSClassApplierModule

So it should be possible to work this capability into the editor. It may have not been an option before, but with this rangy class applier module it can be done now. Without it I am going to have to switch clients who are complaining over to a different editor, and I really don;t want to do that. I love the editor except for this one exception.
Replied 20 Feb 2013 20:58:55
20 Feb 2013 20:58:55 Richard Apperly replied:
+1 and well spotted Tom. I've had to ditch this as well for the time being and I've stopped recommending it to others I know. I'd gladly go back if this was implemented.
Replied 21 Feb 2013 09:34:20
21 Feb 2013 09:34:20 Teodor Kuduschiev replied:
Hello,

I discussed your suggestion with our developers. We will try to implement the feature in the next update of Advanced HTML Editor 3.
Replied 21 Feb 2013 09:56:33
21 Feb 2013 09:56:33 Richard Apperly replied:
That's great news. I really hope you guys stick with this one.

And any chance of a style preview in the CSS Class dropdown as well...like you can do with tinyMCE? AT the moment it just displays the name of the class but you have no idea how it looks.
Replied 21 Feb 2013 14:00:21
21 Feb 2013 14:00:21 Tom Waters replied:
Thank you Teodor, that would be immensely helpful. And much appreciated.
Replied 30 Dec 2013 15:05:28
30 Dec 2013 15:05:28 Peter Piper replied:
I recently purchased the Advanced Editor and reported the problem of styling/changing individual letters, words, etc, separately from a paragraph, for example, by using the Font Size - but it's broken in the latest version of the editor (3.5.0) and being able to do that is a basic requirement of any text editor. I reported this issue under "Problems" (you can see it under "Recent" but so far it seems that it hasn't even been looked at. However, you still can apply a class to a letter, word, sentence, or paragraph (or more) if you use the custom class drop-down that DOES work. I'm using it myself and it works quite well. However, as good as the current editor extension is, the latest versionhas some serious defects (and so is not ready for prime-time in a commercial setting) in that the Font size selection, when applied produces incorrect and erratic results (and there are other formatting issues as well). Technically, it's a show stopper as most users need - or want - to style individual letters, words, etc. and that cannot be done using the Font size. Teodor, I'll be happy to provide a short tutorial (as I previously mentioned) on how to use the Class drop-down if anyone using this extension is interested.
In the meantime the issue with the Font size must be addressed otherwise from the perspective of the end-user, the editor is broken. (If you have any doubts about this, check out two other prominent editors such as CKEdit and TinyMCE where the ability to style text using the Font size or other formatting, works flawlessly)
Replied 06 Jan 2014 11:26:07
06 Jan 2014 11:26:07 Teodor Kuduschiev replied:
Hello Peter,

Currently the extension has the option to apply a custom class to a single word. It is as simple as selecting the word and choosing the class from the dropdown.
The code generated is:
<span class="class_name another_class_name">word</span>


Replied 06 Jan 2014 14:46:37
06 Jan 2014 14:46:37 Peter Piper replied:
Hello Teodor: Yes, I understand that the editor has the ability to apply a custom class. However, the issue I posted has to do with applying a Font Size: The current version (3.5.0) has a Font Size drop-down which has nothing to do with applying a custom class. Applying a font size should work on a single lette, word, sentence paragraph, or entire document. That's the way it works in Microsoft WORD, that's the way it works if CKEdit (ckeditor.com/), TinyMCE (www.tinymce.com/), and any other textarea edit plugin or control. In the case of the DMXZone editor the font size feature is broken. I posted the actual problem elsewhere to highlight the issue and will repeat it here:

As an example, if you enter "THIS IS SOME TEXT" (without the quotation marks) into the editor and you look at the HTML in Code-View you'll see:

<p>​This is some text.</p>

So far so good.

Now if you highlight anything, for example, a single word, "SOME", then click on the FONT SIZE dropdown and select 28px (the largest size in the dropdown list) as the size, you don't get 28px but something smaller: When you look at the HTML in Code-View (click on </> button of the editor) it shows

<p>​This is <span style="font-size: medium;">some </span>text.<p>

As you can see the font-size shows as "medium" which is not correct. It should show: font-size:28px instead, and if I make the change in Code View it looks normal. But you can't expect a client that has no HTML or CSS knowledge to do that and besides, they should not have to.

In addition, when applying a FONT size change, unpredictable results occur, sometimes it applies a change to what is selected, sometimes it applies to a block of text even though only a word was selected, etc. - in short it's unreliable and unpredictable - it simply does not work correctly.

Changing the font size of selected text is a major feature of any editor and it should work correctly using the FONT size dropdown and not using a custom class. I mean why have a font size dropdown at all if it doesn't work correctly? Client's want to apply a font change using the FONT size dropdown and not by applying a custom CSS class which is different. (Even my workaround using the custom class feature has an issue because the DMXZone implementation of custom classes puts a checkbox next to the custom class which confuses clients) I also sent a letter to George Petrov on this issue and pointed out that with every other editor out there changing the font size with the font size dropdown works and works correctly (I have yet to hear from Mr. Petrov). Please refer this problem back to the developers. As it stands currently, technically, the editor is "defective" because of this Font size problem (and clients are not completely happy with my workaround because of the check boxes next to the class selection). I'm not asking for my money back so-far, but this really needs to be addressed. Please let me know when this issue will be addressed and resolved. Thanks Teodor.

Replied 06 Jan 2014 14:57:14
06 Jan 2014 14:57:14 Teodor Kuduschiev replied:
Hi Peter,
The issue with the font size is under investigation. The topic you are posting this into is about applying css classes.
Replied 06 Jan 2014 14:59:35
06 Jan 2014 14:59:35 Peter Piper replied:
OK, I have no problem with applying CSS classes. Sorry if my commentary got into the CSS Classes section.

Reply to this topic