Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: inline style with rich text export? #698

Closed
uliska opened this issue Jun 24, 2015 · 7 comments
Closed

Question: inline style with rich text export? #698

uliska opened this issue Jun 24, 2015 · 7 comments

Comments

@uliska
Copy link
Collaborator

uliska commented Jun 24, 2015

Is there a target where it makes sense to export colored html using

  • Do not use inline styles
  • Do not export HTML as plain text

?

When pasting such an export into a LibreOffice document it is not displayed as highlighted - which is natural as the styles don't exist there.

My question is if there is a possible target where it might make sense to export richtext without embedded stylesheets. If not we should handle this by

  • automatically switching on inlinestyles when richtext is selected
  • Describe this in the tooltip.
  • I don't think this dependency needs to be reflected in the GUI (e.g. by greying out options)
@wbsoft
Copy link
Collaborator

wbsoft commented Jun 24, 2015

I think you are talking about copying source as HTML to the clipboard? When you don't use inline styles, the span elements are marked with a class attribute which only show up correctly when an external stylesheet is used.

Copy HTML as plain text means that the HTML is copied to the clipboard with MIME-Type text/plain. So that it can be pasted in a text editor where you may type HTML manually.

If you enable the option 'only copy Pre element', no embedded style sheet is exported.

@uliska
Copy link
Collaborator Author

uliska commented Jun 24, 2015

Yes, I know these things. My question is: is there a target where I can paste source copied "as HTML" and "no inline styles" and there are external stylesheets?

@wbsoft
Copy link
Collaborator

wbsoft commented Jun 24, 2015

You mean an application where you can paste HTML, and that it makes sense not to include inline styles or embed a stylesheet? I don't know of any.

@wbsoft
Copy link
Collaborator

wbsoft commented Jun 24, 2015

What do you mean by

automatically switching on inlinestyles when richtext is selected

? Where is richtext selected?

@uliska
Copy link
Collaborator Author

uliska commented Jun 24, 2015

Yes, that's the question. I stumbled over that when pasting code into LibreOffice.

With "richtext selected" I mean unchecking the option "export HTML as plain text".
The combination

  • export HTML as plain text and
  • don't use inline styles

doesn't seem to make sense, so inline styles could implicitly switched on in that constellation.

@wbsoft
Copy link
Collaborator

wbsoft commented Jun 24, 2015

Ah, ok. This is all about copying colored HTML. When you copy it while "copy HTML as plain text" is selected, HTML is copied to the clipboard, but as text/plain. So when pasting it in LibreOffice, you get plain HTML source. (Probably not what you want). When you disable that option, the HTML is copied to the clipboard exactly the same way, but as text/html.

The combination that you mention:

  • export HTML as plain text and
  • don't use inline styles

does make sense! When you must type text in some web application, where HTML is allowed, and where you know that the stylesheet is already available.

(You can create a stylesheet by copying colored HTML to the clipboard as text (with "inline styles" and "only pre tag" disabled) and then paste it back in a new document. Then save the CSS part.)

@uliska
Copy link
Collaborator Author

uliska commented Jun 24, 2015

OMG, I should have a few days offline ;-)

Of course I'm talking about the opposite. What you are describing is exactly what we do on Scores of Beauty: exporting a <pre> tag without inline styles because we have a ready-made stylesheet available. What I mean is:

  • Export HTML as plain text disabled and
  • don't use inline styles

@uliska uliska closed this as completed Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants