draft-js-utils icon indicating copy to clipboard operation
draft-js-utils copied to clipboard

InlineStyles

Open Nikcrysis opened this issue 8 years ago • 3 comments

I've got a problem with using inline-styles. Fonts and colors are processed corretly, but font-size and text-align don't work.

Example:

let options = {
   inlineStyles: {
        //sizes
        'Medium': {element: "size", attributes: {size: 3}},
        //align
        'Left': {element: "family", attributes: {align: "Left"}},
      },
};
 stateToHTML(this.editor.content, options);

It igonres "medium" and "left" properties. Is it bug or I'm doing something wrong?

Nikcrysis avatar Feb 08 '17 15:02 Nikcrysis

I am facing a similar problem for me I am not passing any options param to stateToHTML function but do not get any inline styles. All the elements are exported to HTML but there is no inline style for any of the element. Can you suggest what I should do?

zeeshanjan82 avatar Aug 23 '17 00:08 zeeshanjan82

i have the same problem

ileonovdima avatar Oct 28 '17 09:10 ileonovdima

I just reported #120 and it sounds similar to this. You claim "colors are processed correctly" but I don't actually have that experience. Can you show me how you got colors to load?

sontek avatar Nov 29 '17 19:11 sontek