Modifying the font.pixelSize of a TextEdit does not affect the code block.
-
May be sample code will help to help you. Post the sample code.
-
Hello,
When working with Markdown in TextEdit, adjusting font sizes for code blocks can be a bit tricky. Here are some approaches you can try: HTML Tags: To change the font size within Markdown cells, you can use the HTML <span> tag with the style attribute. Custom CSS (Advanced): If your Markdown renderer supports custom CSS (e.g., GitHub or certain Markdown editors), create a custom CSS rule to target code blocks.
I hope this info useful to you!...
Best Regard
Ford Benefits -
May be sample code will help to help you. Post the sample code.
import QtQuick 2.15 import QtQuick.Controls 2.15 TextEdit { id: textedit width: 600 height: 300 textFormat: TextEdit.MarkdownText Shortcut { sequence: "Ctrl+=" onActivated: { textedit.font.pixelSize += 1 } } text: "*Italic* **Bold** # Heading 1 ## Heading 2 body `code block` [Link](http://a.com) " }
Maybe you meant to replace "`" with "```". The size of the code block did not increase.