Hey guys! Today I want to test how OnlyOffice works with styles and how they are dependent on each other. I feel that this information is lacking in their official documentation. So here is my take on this. I will interpret results as I can, I may be mistaken, by comparing style previews visually, but I hope this will be useful after all.
I will not check all possible style settings for now. I will concentrate on some basic font style settings to let me start with it.
How I check
All experiments will be done on the following dummy text which right styles applied to these text lines:
CurrentStyle
NoSpacing
Heading1
Heading2
Heading3
Heading4
Heading5
Heading6
Heading7
Heading8
Heading9
Title
Subtitle
SubtleEmphasis
Emphasis
IntenseEmphasis
Strong
Quote
IntenseQuote
SubtleReference
IntenseReference
BookTitle
ListParagraph
Caption
Header
Footer
FootnoteText
EndnoteText
Testing.docx (26.6 KB)
I iterate over styles and change the following properties for them:
-
bold
-
italic
-
underlined
-
strikethrough
-
superscript
-
subscript
-
highlight color
-
text color
-
alignment (left, centered, right, by width)
After change specific property of the current style I update it and check what styles has been changed also. It should give us a ground for understanding style dependencies.
What I don’t check
Here I don’t test custom styles and whether current paragraph style affects what will be saved in the user defined style and what this style will root from.
What is important
I assume that there are no bugs in Update from selection functionality meaning that Ctrl+Z cancells all style changes correctly when I need to revert style changes.
Besides, I test on a default style setup. If you have customized default styles somehow this experiment results may not apply to you.
My guesses
Here are my guesses which I will try to prove or reject according to results:
-
Each style has a set of properties
-
When style is dependent on another one, it will take unfilled properties from the parent style
Anology: each program might have its CLI flags set via an environment variable and they will be defaults which can be overriden by specifying CLI flags directly while program call.
Results
Normal style
Normal is parent for:
-
No spacing
-
Heading 1 .. Heading 9
-
Title, Subtitle
-
Subtle emphasis, Emphasis, Intense emphasis
-
Strong
-
Quote, Intense quote
-
Subtle reference, Intense reference
-
Book title
-
List paragraph
-
Caption
-
Header, Footer
-
Footnote text, Endnote text
The following settings:
-
bold
-
italic
-
underlined
-
strikethrough
-
superscript
-
subscript
are inherited by all dependent styles.
The following settings:
- text color
are inherited by:
-
No spacing
-
Title
-
Subtle emphasis, Emphasis, Intense emphasis
-
Strong
-
Subtle reference, Intense reference
-
Book title
-
List paragraph
-
Header, Footer
-
Footnote text, Endnote text
The following settings:
- alignment (left, centered, right, by width)
are inherited by:
-
No spacing
-
Heading 1 .. Heading 9
-
Title, Subtitle
-
Subtle emphasis, Emphasis, Intense emphasis
-
Strong
-
Subtle reference, Intense reference
-
Book title
-
List paragraph
-
Caption
-
Header, Footer
-
Footnote text, Endnote text
No spacing style
No spacing is parent for no styles.
Heading 1 .. Heading 9 styles
Heading 1 .. Heading 9 are parents for no styles.
Title and Subtitle styles
Title and Subtitle are parents for no styles.
Subtle emphasis, Emphasis, Intense emphasis styles
Subtle emphasis, Emphasis and Intense emphasis are parents for no styles.
Strong style
Strong is parent for no styles.
Quote and Intense quote styles
Quote and Intense quote are parents for no styles.
Subtle reference and Intense reference styles
Subtle reference and Intense reference are parents for no styles.
Book title style
Book title is parent for no styles.
List paragraph style
List paragraph is parent for no styles.
Caption style
Caption is parent for no styles.
Header and Footer styles
Header and Footer are parents for no styles.
Footnote text and Endnote text styles
Footnote text and Endnote text are parents for no styles.
Conclusion
Normal style is the root of style hierarchy amd other styles inherit its properties (unless they are overriden down there).
Request for developers
I ask developers consider adding test results to the documentation to make it clear for users what styles are dependent which styles on. Besides, I would love to have something like Depends on {Parent style} and overrides {Properties} as a hint for each style.
Document Editor - Apply formatting styles doesn’t describe explicitly such important thing like as a style hierachy.