Editor format tools delays execution on empty lines ???

6 posts, 1 answers
  1. Dustin
    Dustin avatar
    79 posts
    Member since:
    Oct 2012

    Posted 22 Apr 2013 Link to this post

    Why are some of the formatting options applied to an empty line (<p></p> or <p><span></span></p>) delayed and added to the pending formats until a character is added? If I want to apply a font size to an empty line, but leave that line empty the format is never applied because it is added to the pending formats and if I don't add any text to that line then the format never gets applied. How can I change this functionality?

    I've tried overriding the willDelayExecution method to return always return false on the fontSize tool for example when I have a <p><span></span></p>, but the fontSize doesn't get applied even when the Range's startContainer is the text node inside the span element. Your anchor marker element gets added after the text node and I'm not sure if that's what the problem is.

    Please help because this is a much needed. My users can't change the font sizes of empty lines for consistent layout through out the document.
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 23 Apr 2013 Link to this post

    Hello Dustin,

    This functionality is hard to change, due to the fact that IE does not allow to focus empty nodes. If you need to have pre-defined styling on a row, you can either insert a whitespace in it (so that it has content), or use a stylesheet that sets the default paragraph styles.

    All the best,
    Alex Gyoshev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Dustin
    Dustin avatar
    79 posts
    Member since:
    Oct 2012

    Posted 23 Apr 2013 Link to this post

    The span node is not empty, it has a empty text node. Now if I override the willDelayExecution method on the fontSize tool, the range is passed in and the startContainer is the text node and from there I can get the parent span to apply the font size to.

    I know that Google Docs is a lot more advanced then your guys' editor, but that editor does not delay any format execution. If you are on an empty line and apply a format, the format gets applied immediately.

    And by the way, an empty space does not apply the format immediately either. It doesn't get applied until a character exists in the text node. Even highlighting the empty space and applying a different font size still adds it to the pending formats.

    Also, this is not a default style requirement. If a user needs to change the font size of an empty row to whatever how am I supposed to know what that font size is going to be and what if one empty line they want a font size 10px and another 16px?

    This seems like functionality that should have been there from the beginning instead of designing a complicated pending formats process to post pone formats on empty text nodes. Seems like overkill on something that could have been so much simpler and taken care of immediately instead having to track formats to apply at a later time.
  5. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 24 Apr 2013 Link to this post

    Hello Dustin,

    > This seems like functionality that should have been there from the beginning instead of designing a complicated pending formats process to post pone formats on empty text nodes.
    We are actually on the same page about this. In fact, we did have this implemented prior to switching to the pending formats algorithm. We switched because of the many errors that were occurring when we used the other approach.

    Since we are currently refactoring the editor code, we will consider improving the situation around the pending formats. This will be done no sooner than Q2.2013.

    Regards,
    Alex Gyoshev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Answer
    Dustin
    Dustin avatar
    79 posts
    Member since:
    Oct 2012

    Posted 24 Apr 2013 Link to this post

    That is good to hear that you guys will be refactoring the editor code. I really hope you guys implement this functionality into the new editor.

    Also, any idea when the roadmap for Q2.2013 will be available? I am really curious what new cool stuff you guys will be adding to the Kendo suite, specifically the editor.
  7. Brandon
    Admin
    Brandon avatar
    21 posts

    Posted 24 Apr 2013 Link to this post

    Hi Dustin,

    The roadmap will be announced later today, via the blogs, so stay tuned there! 

    Kind regards,
    Brandon
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready