Comments (7)
Is there an option to disable the behaviour of --- or === creating sub headlines?
Which behaviour are we takling about? 😅
Or at least/also an option just to disable the background highlighting of these?
You could customize the styling completely like QOwnNotes does.
from qmarkdowntextedit.
Which behaviour are we takling about? 😅
Is there an option to disable the creation of headers by dashes/equals below text, and to remove the background color on dashes in the second example?
from qmarkdowntextedit.
Is there an option to disable the creation of headers by dashes/equals below text
No, not really, that's just Markdown. Why would you want to disable that specific syntax of Markdown?
You could always just override the one method that applies that highlighting.
and to remove the background color on dashes in the second example?
You can just override the style, like in:
from qmarkdowntextedit.
No, not really, that's just Markdown. Why would you want to disable that specific syntax of Markdown?
Sometimes I (and I believe many others, especially non Markdown users) just want to create a line seperator below some text without formatting the text above it as a header. But I think I'll keep the current behavior, it's just good to know I can ovveride it.
You can just override the style, like in:
Awesome, thanks!
Two more questions:
- I want to set the font size for code blocks, so they're smaller than the regular text. So I did something like that:
qreal codeBlockFontSize = fontSize - 2;
_formats[static_cast<HighlighterState>(HighlighterState::InlineCodeBlock)].setFontPointSize(codeBlockFontSize);
_formats[static_cast<HighlighterState>(HighlighterState::CodeBlock)].setFontPointSize(codeBlockFontSize);
_formats[static_cast<HighlighterState>(HighlighterState::CodeBlockComment)].setFontPointSize(codeBlockFontSize);
But the size of some syntex of cpp stays the same while the rest does gets smaller (I set a very small number below just to show the difference):
- Do you think you can add marking/highlighting a piece of text syntax like Bear is doing here with two colons around a piece of text to highlight it?
from qmarkdowntextedit.
- hard to tell without actually playing around with the code
- since that's no Markdown syntax, it's best to implement that somewhere else. QOwnNotes for example has a script function to do that
from qmarkdowntextedit.
That's our customMarkdownHighlighter.cpp. Did I miss any HighlighterState
in my code above?
from qmarkdowntextedit.
Well, there are lots of code-states:
qmarkdowntextedit/markdownhighlighter.h
Lines 82 to 177 in b2926ab
from qmarkdowntextedit.
Related Issues (20)
- License of markdownhighlighter HOT 1
- README and screenshots are outdated HOT 4
- Setext Headlines with 4 spaces in front still get partly highlighted HOT 11
- Character auto-removal for same char types doesn't work correctly HOT 2
- Use Qmarkdowntextedit just to view the markdown HOT 5
- Highlighting support for numbered list checkboxes HOT 4
- how can i build correct HOT 1
- is it possible to use this plugin in a qml script? HOT 41
- Build fails with -DQT_NO_CAST_FROM_ASCII HOT 3
- Highlight line break HOT 3
- Bold italics are not supported HOT 39
- Bringing features from QTextMarkdownWriter HOT 9
- Support for Forth Syntax Highlighting HOT 3
- Question: How to zoom? HOT 1
- Idea: Highlight links in headings HOT 1
- What is the license? GPL or MIT? HOT 2
- Falsely highlighting of links in 4-Spaces fence code blocks HOT 4
- Links in lists broken
- Cannot apply bold and italic when last char is not space HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qmarkdowntextedit.