Html editor - Text to HTML convertor - html-editor

I want to convert my text into HTML format, it would be just like this: that I just copy paste the text from word, pdf [with formatting & colors] to the editor and it will convert it into HTML tags, so that when I decode it again it would give me the same format that I have pasted.
I am mostly happy with PageBreeze but sometimes it destroys the formatting.
Are there any other editor suggestions?

Though I think it's a crude solution, you can try using the on-the-fly generated comment below, highlight, view source and copy it or pretty much any of the Rich Text Editor Javascript plugins out there such as RTE, the simplest I could find. (I'm not sure if those preserves copy-pasted formatting)
However, you won't be assured that any formatting (font/color) you get from here will be carried over to your website. In addition to HTML, CSS plays a huge part in styling, especially text-color, highlighting, spacing, etc.

I think in word you can do file >saveas > html
However it's going to be junky and nasty.
Your best option is to learn basic HTML (it really is super easy) and manually do it yourself.

Related

Markdown to markdown but undo hard wraps

Can pandoc be used to take a (pandoc) markdown file that is hard wrapped and reflow the text and use one line for paragraph, but otherwise don't change anything? Usecase would be to take hardwrapped text and transform it so an online textbox doesn't mess it up when pasting.
It depends a little in your definition of "doesn't change anything else", but --wrap=none is probably the option that you are after. Pandoc's Markdown output is opinionated, so it may not do exactly what you want.

How to handle big chunks of text

Until now I have used
<Label Text="Some Text"</Label>
to present text for the user. However, I was wondering if this is the correct way to render big premade text strings with bullets etc. or if there is another, more neat way to do it?
I have used a WebView in the past with a transparent background. That allows as much markup as needed and is fairly easy to do. Though I have also just used a simple Label and added a bunch of \n's and \t's to make it look like a formatted document. I think it depends on your preference, the layout you are putting the element in, and if the text will be dynamically pulled or not.
There are also markdown plugins you can add that will format mark down text so thats another option. Something like this (I have not tried this plugin myself btw).

converting asciidoc to html - too big result file

I created huge documentation with Asciidoc.
It contains about 600 .adoc files.
When I'm saving this documentation as a html file, I'm getting ~70MB file. It is to big file.
What can I do to create htmls from .adoc files. It's important for me to have table of contents.
I found plugin (https://gist.github.com/mojavelinux/d94372393950ca76d594) to asciidoc, but it doesn't work properly
Greets,
Adam
How does the resulting HTML file look? Doesn’t it contain duplicated stylesheets or similar content?
Part of the problem is that built-in Asciidoctor “HTML5” converter generates really bloated and non-semantic markup (it has nothing in common with HTML5 except the doctype). And the built-in stylesheet is not better. The result is quite hard to process for browser, so large document takes long to render. And the HTML file is also quite big, but I don’t think that this is the only cause of your 70MiB file.
You may try alternative converter asciidoctor-html5s. It generates much cleaner markup, focuses mainly on correct semantics, accessibility and compatibility with common typographic CSS styles. However, I don’t have a complete stylesheet for it yet and it’s not (can’t be) compatible with Asciidoctor built-in styles.

text highlight in markdown

Within a Markdown editor I want to support text highlight, not in the sense of code highlighting, but the type of highlighting people do on books.
In code oriented sites people can use backquotes for a grey background, normally inline code within a paragraph. However on books there is the marker pen for normal text within a paragraph. That is the classical black text on yellow background.
Is there any syntax within Markdown (or its variants) to specify that the user want that type of highlight? I want to preserve the backquotes syntax for code related marking, but also want a way to enable highlighted user text
My first thought is just using double backquotes, since triple backquotes are reserved for code blocks. I am just wondering if other implementations have already decided a syntax for it... I would also appreciate if someone could justify if this is a very bad idea.
As the markdown documentation states, it is fine to use HTML if you need a feature that is not part of Markdown.
HTML5 supports
<mark>Marked text</mark>
Else you can use span as suggested by Rad Lexus
<span style="background-color: #FFFF00">Marked text</span>
I'm late to the party but it seems like a couple of markdown platforms (Quilt & iA Writer) are using a double equal to show highlighting.
==highlight==
Typora is also using double equal for highlighting. It would be nice it that becomes a CommonMark standard, as mentioned by DirtyF. It would be nice for those who use it frequently, since it is only 4 repeated chars: ==highlight==
If you want the option to use multiple editors, it may be best to stick with <mark>highlight</mark> for now, as answered by Matthias.
Here is the latest spec from CommonMark, "which attempts to specify Markdown syntax unambiguously". Currently "highlighting" is not included.
Editors using ==highlight== from comments mentioned previously:
Typora
Obsidian
Quilt
IA Writer
Feel free to add to this list.
You can use the Grave accent (backtick) ` to highlight text in markdown
Highlighted text
Also works with VS Code extension markdownlint
Grey-colored Higlighting Solution
A possible solution is to use the <code> element:
This solution works really well on git/github, because git/github doesn't allow css styling.
OBS!:
Using the code-element for highlighting is not semantic.
However, it is a possible solution for adding grey-colored highlighting to text in markdown.
Markdown/HTML
<code> <i>This text will be italic</i> <b>this text will be bold</b> </code>
Output
This text will be italic this text will be bold
Roam markdown uses double-caret: ^^highlight^^. Andrew Shell's answer mentions double-equals.
The accepted and clearly correct answer is <mark> from Matthias above, but I thought I had seen carets in some other flavor of markdown. Maybe not. I want to transform my ^^highlights^^ to <mark>highlights</mark> in pandoc conversion to html, and somehow ended up here...
Probably best bet is just use html e.g
<pre><b>Hello</b> is higlighted</pre>
Hello is higlighted
Remember nearly all html is valid in markdown too.

How is formatting retained on the clipboard?

When copy & pasting formatted text, where does the separation between content and formatting occur? For example, copy & pasting from Word. When the content is copied, it can be pasted into something like TinyMCE which can retain the formatting, or into a regular browser textarea which will strip the formatting.
I've been told that the stripping of the formatting occurs by the application that is having content pasted into it. Because of this, pasting formatted content is unreliable.
However, to me it seems like the clipboard either has two versions of the content, and pastes the appropriate one, or one version is copied but the formatting is somehow flagged so that an app can request the content with or without the formatting.
How and where does this separation occur?
Thanks
Since you're talking about Word, I'm assuming you're asking about Windows:
Clipboard Formats.

Resources