How can i custimize the styles of WMD editor's header similar to the one used here in stack overflow
I recently used the markitup editor and found the skin implementation pretty useful. Each skin has its own images and styles which you can easily override if you need to. The editor is also jQuery-driven, which is nice if you're used to that syntax. Check it out.
Related
We recently updated the styling of our app to use WinUI 2.x and while we generally like the changes we have found areas that look terrible and will require overriding the defaults. I looked for a file that would have the default XAML implementation/definitions associated with the new styles, something similar to what's in the generic.xaml file, but I was not able to find it. I would appreciate someone pointing me to this file, if it exists.
~Rich
The source code for the WinUI 2 controls and the XAML templates are available on GitHub.
For example, DropDownButton.xaml.
I'm using Hugo to generate static pages in Gitlab, seems the syntax of asciidoc not supported well (such as Admonition)? or it's just about the theme I'm using?
for code [TIP]
Expected:
Current:
Please enable font-based icons by adding
:icons: font
to your document. See Font Icon Mode in AsciiDoc docs for details.
Depending on the CSS you use, the tool tip might look different. See below for the "classic" CSS of Asciidoctor.
Once you add the :icons: font, it is a matter of updating the CSS to make it look like your screenshot above.
When I use YouTrack Wiki syntax, I can use {cut} like this:
{cut Block title}
Block content
{cut}
This is very useful feature, but Wiki syntax is deprecated and I can't find something similar in YouTrack Markdown syntax.
UPD: I figured out that I can use stacktrace as language with backticks:
```stacktrace
Header text
Hidden text
```
But it works different (possibly because it was designed to work with Java stacktraces), not preserving leading whitespaces, not highlighting code, etc.
In YouTrack 2019.3 it will be possible to use this (not tested personally yet):
<details>
<summary>Brief summary</summary>
Unnecessary long description
</details>
Implemented in https://youtrack.jetbrains.com/issue/JT-45636
On the subject of invisible notes, I use the following which do not show at all when using Markdown:
[//]: # (COMMENT DOES NOT SHOW)
This is great if doing a default description which needs some type of instruction.
Is it possible to capture the screen rendering of a QML Component and save it to an image file? I would like to drive a Component through several different states, and capture its visual appearance for documentation purposes, without having to do screen/window captures.
Yes, you could set up your state transitions to call QWidget::grab then save it to a file through QPixmap.
If you need an example of how to set up your code to call QWidget::grab take a look at this answer: How to take ScreenShot Qt/QML
It's important to replace QPixmap::grabWidget with QWidget::grab because QPixmap::grabWidget is now obsolete. Once you have the QPixmap from QWidget::grab follow the documentation in QPixmap to save to the format you'd like such as jpeg, png, gif.
Here are some links to the documentation to help you out.
QWidget::grab
QPixmap
QPixmap::save
With Qt 5.4 it is now made easier with grabToImage - this method resides on all QQuickItem objects.
EDIT
It's worth mentioning that the item you call grabToImage() on must be a child of a top-level Window item container
I have a jar I include with my application with some fonts. If I paste around
<font fontName="NimbusSansGlobal Light" size="12" pdfFontName="NimbusSansGlobal Light" pdfEncoding="Identity-H" isPdfEmbedded="true"/>
into all my text elements, PDF output works fine. If I switch them all to use a style which defines the font as such:
<style name="SansFontStyle" isDefault="true" pdfFontName="NimbusSansGlobal Light" pdfEncoding="Identity-H" isPdfEmbedded="true"/>, then the font can't be found by the JRLoader when I try to generate reports. Interesting enough, if I use JRLoader within my application directly, the font is found fine.
Why would styles break PDF export?
Using Font Extensions should solve this problem.
Once you use font extensions, then you can set the font in the text element or in the style. You will not specify pdfFontName, pdfEncoding, or isPdfEmbedded in the report. That gets specified in the font extension.
Note: In a strict interpretation, this doesn't actually answer the question. I have no idea why styles work differently from directly setting the fonts. It seems like a bug, but maybe it's unexpected yet intentional for some reason we aren't thinking of. Therefore, I started to enter this as a comment rather than an answer. But it got too long.
Regardless, this should allow you to use styles as you want to. So I expect that it will solve the heart of the problem.
Font extensions are documented in the JasperReports (and iReport) samples and documentation, so it should be pretty easy to use them once you know that you ought to.