Formatting options in Telegraph - format

I want to use monospaced format in Telegraph, just like I just did, not a block of code, just a single word. Also I'd like some strike-through too. Those are formatting options available in most (if not all) Telegram apps, and my purpose is to move some large posts to Telegraph pages. But those formats are not available in telegra.ph. Or are they? I've noted that the hidden underline format is available by using the intuitive Ctrl+U shortcut, but that's the only one I've found so far.
It is possible use monospace format in telegra.ph? If not, then I must code the content manually.
If the latter, the Telegraph API states the following:
tag (String)
Name of the DOM element. Available tags: a, aside, b, blockquote, br, code, em, figcaption, figure, h3, h4, hr, i, iframe, img, li, ol, p, pre, s, strong, u, ul, video.
I don't know if there are any tag that can represent a monospaced word or text because I don't know what many of them are for.

Update!
You can try the following:
Go to the next line and try entering ```
This can be done by using the pre tag. However, I'm not sure if it's possible to do this with the in-house telegra.ph tool. From the documentation:
NodeElement This object represents a DOM element node.
tag (String) Name of the DOM element. Available tags: a, aside, b,
blockquote, br, code, em, figcaption, figure, h3, h4, hr, i, iframe,
img, li, ol, p, pre, s, strong, u, ul, video.
Telegra.ph API

Related

How to map level 1 to H1 in asciidoc

the default mapping is level 1(==) maps h2 in asciidoc
https://docs.asciidoctor.org/asciidoc/latest/sections/titles-and-levels/#section-level-syntax
How to map level 1 to H1 when convert .adoc to .html?
I use an online markdown-like editor which use H1 as section title.
To achieve your goal, you would likely need to modify the converter.
Currently, the document title converts to H1. If a level 1 heading converts to H1, you'd have to figure out what the level 0 heading converts to.
You haven't stated your goal when making this change. However, if it is presentation-based, you can customize the CSS used to make an H2 look like an H1, continuing through the heading levels to making an H6 look like an H5.

In Ublock Origin how do I modify the style of div depending on if it has a child's child?

In UBlcok Origin I'm trying to hide the search/header bar at the top of Youtube when on a video page, but not when on the home page. It's been far trickier then I imagined because youtube not only reuses ids on the same page, but also reuses the same ids and classes on the home page as the video pages - so I thought I would try and use a procedural cosmetic filter.
So far I have:
! stop search bar from floating when scrolling
youtube.com###masthead-container.ytd-app:style(position: static !important)
! remove resulting whitespace (search bar still remains for some reason)
youtube.com###masthead-container:style(height: 0 !important)
! move video up to cover search bar but only if #content's ytd-page-manager element contains a ytd-watch-flexy element
youtube.com###content.style-scope.ytd-app:has(ytd-page-manager:has(ytd-watch-flexy)):style(position: relative; top: -56px !important)
but the last line doesn't work. So I changed it to call the custom youtube elements by id and class:
youtube.com###content.style-scope.ytd-app:has(#page-manager:has(.hide-skeleton)):style(position: relative; top: -56px !important)
and it will successfully select the correct #content element if I remove the :style(...) conditional - but, as shown, it doesn't appear to apply hide or apply the style if I chain a :style() to the :has() conditional.
Can you chain :has() and :style()?
The feature of chaining conditionals to :style() has not been added as of the end of 2019
https://github.com/uBlockOrigin/uBlock-issues/issues/382

In reStructuredText, how do you make a table column have monospaced text?

I want to create a table in ReStructuredText (ReST / RST) where every column should be rendered as an inline literal / monospace font.
I can't find a way to have inline literals span multiple lines, where there is text in front of them, like a table.
Is there a way for me to set a table to render a specific column as inline literal / monospace font? If not, what is the best practice for this?
Try this.
.. csv-table::
:header: Header1, Header2, Header3
A, B, "These lines appear as one line,
even though they are written in two lines."
C, D, "This is normal text. ``this is inline stuff that is very long and may wrap on multiple lines of text in a table cell, and it could look OK, but who knows?`` This is normal text again."
Yields this screenshot, using the Alabaster theme.
You might have to twiddle your theme's CSS to get it just right.

Xpath syntax to grab listed elements based on ID above containing word

I want to grab li element text and links from a list. The challenge is, the span sometimes has different class names BUT always has the word 'notable' featured in them, example:
<span class="mw-headline" id="Notable_alumni">Notable alumni</span>
OR
<span class="mw-headline" id="Notable_former_pupils">Notable former pupils</span>
So I need to use "contains" somehow, so I am along these lines:
//li[contains(span/#id,'Notable')]/span/#id/following-sibling::text()
But can't get this right.
Another issue is these blocks of text and headers are not in the same containing div either. Added an image to simplify and you can see the code.
Assuming that the span with the #id is always under the h2 (you could make more generic by using * instead of h2 if that doesn't hold true). If you anchor to that containing element, then look for the first ul that is a following-sibling, you can select the text() from all of it's li elements:
//h2[span[contains(#id,'Movie Title')]]/following-sibling::ul[1]/li//text()

A links in H3 headings appear smaller than the H3 text

The a href links I create with CKeditor are part of h3 headings and appear smaller in font-size, from their counterpart non-link h3 text... For example, if the sentence is:
"We provide Google SEO support", and the word "Google" links to google.com, this word will appear smaller than the rest of that text (say 18px instead of 24px for the rest) and looks funny.
What can cause such a problem? what is worth checking in the text? Here is a link with a live example - You could see the problem in the second heading (h2) right away.
Thanks for you advice,
Provide CSS which format the elements as well as headings.Basically I think that your problem comes from assuming that if you format the header element in css it will affect the child elements too, it will not.
You can fix it like this:
h2, h2>a { font-size: 28px; }
This snippet causes all second headers and it's link children to have the same font size.

Resources