Character styles

Hey! I want to make a style for bold text which specified that the bold text must be … well, bold according to this style. What I decided to do:

  • insert random text
  • make all the text have Normal style
  • select the particular word
  • set its style to Subtle emphasis
  • make the text bold
  • press Update from selection
  • unexpectedly get the text in the same paragraph becoming bold

So IOW, my question is: can I apply style to specific word or character? If I can which style can be used for that purpose.

Is there any option to keep style overrides for characters when I reapply style for the whole paragraph? Why can I find it useful? Because maybe I want some specific word to be bold not thinking about what style and when applied to the whole paragraph. At the same time if I can apply styles to specific characters the most specialized style should define the looking of the text. For instance the paragraph style is not a bold text, while some character / word has a style which tells it to be bold. So this word or character will remain bold at any case. At least it’s how I imagine it to work.

One more interesting observation

For some reason when I update the color of font in Normal style I get color updated in Subtle emphasis style automatically. So my question here is: how to understand what styles are linked and how? Is it some sort of style inheritance where styles inherit some properties from their parent ones?

Update from selection causes that problem I mentioned above to appear with the current paragraph. So I am really confused by this right here.

Note

Because relationships among styles are opaque for me, I can’t properly learn them here. Is there any comprehensive page which lists all available styles, their properties and how all of them are related to each other? I feel like this information is lacking currently. If there is some style inheritance I want to visually see it. For instance I want to be able to hover over the style name and see something like Inherits {bla-bla-bla} from {Another-style}.

I used to write programs, I need clarity and precision regarding styles. I’m not a Word user to know some tricks from it. I learn and know OnlyOffice / LibreOffice just.

And I have been trying to resolve this mystery of styles for myself earlier but it didn’t help:

I just want to effectively edit documents and become good at this, that’s why I need your help to get styles right. I want to click on the style and clearly see what properties it will apply (not just visual ones shown in preview), but also paragraph options (if they are set for the style). I am tired of working with styles being a guessing game in some sense as you don’t see all settings will be applied before you apply the style.

Hello, thank you for your detailed questions and experiments. We are currently checking all style-related scenarios on our side in more detail, and we will get back to you with a more precise answer a bit later.

1 Like

Hello,

We’ve checked the behavior on our side — what you’re seeing is related to the current style handling in ONLYOFFICE, especially when working with text-level formatting within a paragraph.

At the moment, ONLYOFFICE does not provide full standalone character style support. We already have a related feature request to add the ability to create and apply character styles.

In the current implementation, you can create a style from selected text and apply it to selected text only, but this depends on how exactly the text is selected. If you select only a text fragment without the paragraph mark, the style can be applied to that fragment. If the cursor is placed inside a paragraph without any selection, or if the selection includes the paragraph mark, the style is applied to the entire paragraph.

This is also why your “Update from selection” test affects the current paragraph. At the moment, this is expected behavior, because the editor does not fully distinguish between updating a text-only style and updating a paragraph style in this scenario.

Regarding Normal and Subtle Emphasis: some styles are linked styles. For these, paragraph properties are applied only when the selection includes the paragraph mark; otherwise, only text properties are applied.

In short: yes, you can apply a style to a specific text fragment in some cases, but full character-style behavior and clear visibility of style relationships are not yet implemented.

As for a comprehensive page listing all styles, their parameters, and their dependencies: at the moment, we do not have such a page in the product or the UI. We understand why this would be useful, especially for users who want a precise and transparent style model. We also hope to add more detailed documentation on styles, as you suggested in this thread:

This is all the information I can provide at the moment. We are actively working on improving styles and plan to enhance both their behavior and the associated documentation.

Best regards!

1 Like