A function that returns a table cell #1432
Unanswered
Alexander335726
asked this question in
Help
Replies: 1 comment
-
This is more of a CSS question than a Templater question. It's fine to ask that here, but you'll be more likely to get help in other places. I would recommend the appearance channel in the Obsidian Discord, they're very helpful in helping create CSS snippets. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone!
I will explain right away that I do not know English well, I use translators. Therefore, I can make mistakes in the description of the problem. I also do not know the CSS language, please take this into account and describe the methods of solving the problem in detail.
I recently started using Obsidian as an Evernote sharing tool.
The main problem is that, as standard, Obsidian is very inconvenient without using plug-ins, unlike Evernote. Of the functions, it is very important for me to align the text inside the cells of the table horizontally and vertically.
I solved the horizontal alignment using a combination of: CSS fragment + template pages + Templater plugin + Editing Toolbar plugin.
More details here.
On the website, follow the link to see the comments of the FiekeB user. The CMenu and Editing Toolbar plugins are similar to each other. Only the Editing Toolbar has more functions.
And now I need to figure out how to enable vertical text alignment in a table cell.
To align horizontally, I used a CSS fragment:
And templates are pages with the following lines:
To align vertically, I tried using the following code:
Template page:
<span class="TC-vertical-alignment"><% tp.file.selection ( ) %></span>
.And it didn't work.
I suspect that instead of the tp.file.selection function, there is some other function that returns not text, but a specific table cell in which the cursor is located or in which the text is highlighted. I need this feature to make my code work. Please help me
Beta Was this translation helpful? Give feedback.
All reactions