Skip to content

Can i CSS the caret ? #3

Answered by SymboLinker
DungnvKaopiz asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @DungnvKaopiz,

A short answer:

latexConfiguration.activePlaceholderShape = '|';

A longer answer:

By default the LatexConfiguration uses a \blacksquare as activePlaceholderShape. You can change this to anything that your typesetting library supports. Both KaTeX and MathJax support the | character and this character looks most like the caret/cursor that is often used in texts. On most keyboards it is above the Enter key and shares the key with \.

I've updated the examples to use both the | and \blacksquare, depending on its position, like this (which is executed each time just before display):

if (keyboardMemory.current instanceof mke.Placeholder && keyboardMemory.current.nodes.length =…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DungnvKaopiz
Comment options

Answer selected by DungnvKaopiz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants