diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..6ad18fa7387c69b29d38c3ecc926187e86f75f11 --- /dev/null +++ b/.gitignore @@ -0,0 +1,162 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ +.cache +.vscode \ No newline at end of file diff --git a/README.md b/README.md index 5c1fa20367be1293664872b44be92b1b77a33c1c..0d6eec8ad3fb3d951f3f9ea45724462ba2c72c01 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ --- -title: Obsidian Qa Bot +title: Obsidian QA Bot emoji: ⚡ colorFrom: gray colorTo: gray diff --git a/app.py b/app.py new file mode 100644 index 0000000000000000000000000000000000000000..a7b2f44f9377ecb2b8bd4c1f258662147d04b9ee --- /dev/null +++ b/app.py @@ -0,0 +1,177 @@ +import os +import gradio as gr + +from langchain_community.document_loaders import TextLoader +from langchain_text_splitters import RecursiveCharacterTextSplitter, Language + +from langchain.embeddings import CacheBackedEmbeddings +from langchain.storage import LocalFileStore +from langchain_community.embeddings import HuggingFaceEmbeddings +from langchain_community.vectorstores import FAISS + +from langchain_community.retrievers import BM25Retriever +from langchain.retrievers import EnsembleRetriever + +from langchain_cohere import CohereRerank +from langchain.retrievers.contextual_compression import ContextualCompressionRetriever + +from langchain_core.prompts import PromptTemplate + +from langchain_core.callbacks.streaming_stdout import StreamingStdOutCallbackHandler +from langchain_core.callbacks.manager import CallbackManager +from langchain_core.runnables import ConfigurableField +from langchain.callbacks.base import BaseCallbackHandler +from langchain_core.output_parsers import StrOutputParser +from langchain_core.runnables import RunnablePassthrough +from langchain_groq import ChatGroq +from langchain_community.llms import HuggingFaceHub +from langchain_google_genai import GoogleGenerativeAI + + +directories = ["./docs/obsidian-help", "./docs/obsidian-developer"] + + +# 1. 문서 로더를 사용하여 모든 .md 파일을 로드합니다. +md_documents = [] +for directory in directories: + # os.walk를 사용하여 root_dir부터 시작하는 모든 디렉토리를 순회합니다. + for dirpath, dirnames, filenames in os.walk(directory): + # 각 디렉토리에서 파일 목록을 확인합니다. + for file in filenames: + # 파일 확장자가 .md인지 확인하고, 경로 내 '*venv/' 문자열이 포함되지 않는지도 체크합니다. + if (file.endswith(".md")) and "*venv/" not in dirpath: + try: + # TextLoader를 사용하여 파일의 전체 경로를 지정하고 문서를 로드합니다. + loader = TextLoader(os.path.join(dirpath, file), encoding="utf-8") + # 로드한 문서를 분할하여 documents 리스트에 추가합니다. + md_documents.extend(loader.load()) + except Exception: + # 파일 로드 중 오류가 발생하면 이를 무시하고 계속 진행합니다. + pass + + +# 2. 청크 분할기를 생성합니다. +# 청크 크기는 2000, 청크간 겹치는 부분은 200 문자로 설정합니다. +md_splitter = RecursiveCharacterTextSplitter.from_language( + language=Language.MARKDOWN, + chunk_size=2000, + chunk_overlap=200, +) +md_docs = md_splitter.split_documents(md_documents) + + +# 3. 임베딩 모델을 사용하여 문서의 임베딩을 계산합니다. +# 허깅페이스 임베딩 모델 인스턴스를 생성합니다. 모델명으로 "BAAI/bge-m3 "을 사용합니다. +model_name = "BAAI/bge-m3" +model_kwargs = {"device": "mps"} +encode_kwargs = {"normalize_embeddings": False} +embeddings = HuggingFaceEmbeddings( + model_name=model_name, + model_kwargs=model_kwargs, + encode_kwargs=encode_kwargs, +) + +# CacheBackedEmbeddings를 사용하여 임베딩 계산 결과를 캐시합니다. +store = LocalFileStore("./.cache/") +cached_embeddings = CacheBackedEmbeddings.from_bytes_store( + embeddings, + store, + namespace=embeddings.model_name, +) + +# 4. FAISS 벡터 데이터베이스 인덱스를 생성하고 저장합니다. +FAISS_DB_INDEX = "db_index" + +if os.path.exists(FAISS_DB_INDEX): + # 저장된 데이터베이스 인덱스가 이미 존재하는 경우, 해당 인덱스를 로드합니다. + db = FAISS.load_local( + FAISS_DB_INDEX, # 로드할 FAISS 인덱스의 디렉토리 이름 + cached_embeddings, # 임베딩 정보를 제공 + allow_dangerous_deserialization=True, # 역직렬화를 허용하는 옵션 + ) +else: + # combined_documents 문서들과 cached_embeddings 임베딩을 사용하여 + # FAISS 데이터베이스 인스턴스를 생성합니다. + db = FAISS.from_documents(md_docs, cached_embeddings) + # 생성된 데이터베이스 인스턴스를 지정한 폴더에 로컬로 저장합니다. + db.save_local(folder_path=FAISS_DB_INDEX) + + +# 5. Retrieval를 생성합니다. +faiss_retriever = db.as_retriever(search_type="mmr", search_kwargs={"k": 10}) + +# 문서 컬렉션을 사용하여 BM25 검색 모델 인스턴스를 생성합니다. +bm25_retriever = BM25Retriever.from_documents(md_docs) # 초기화에 사용할 문서 컬렉션 +bm25_retriever.k = 10 # 검색 시 최대 10개의 결과를 반환하도록 합니다. + +# EnsembleRetriever 인스턴스를 생성합니다. +ensemble_retriever = EnsembleRetriever( + retrievers=[bm25_retriever, faiss_retriever], # 사용할 검색 모델의 리스트 + weights=[0.6, 0.4], # 각 검색 모델의 결과에 적용할 가중치 + search_type="mmr", # 검색 결과의 다양성을 증진시키는 MMR 방식을 사용 +) + +# 6. CohereRerank 모델을 사용하여 재정렬을 수행합니다. +compressor = CohereRerank(model="rerank-multilingual-v3.0") +compression_retriever = ContextualCompressionRetriever( + base_compressor=compressor, + base_retriever=ensemble_retriever, +) + +# 7. Prompt를 생성합니다. +prompt = PromptTemplate.from_template( + """당신은 20년 경력의 옵시디언 노트앱 및 플러그인 개발 전문가로, 옵시디언 노트앱 사용법, 플러그인 및 테마 개발에 대한 깊은 지식을 가지고 있습니다. 당신의 주된 임무는 제공된 문서를 바탕으로 질문에 최대한 정확하고 상세하게 답변하는 것입니다. +문서에는 옵시디언 노트앱의 기본 사용법, 고급 기능, 플러그인 개발 방법, 테마 개발 가이드 등 옵시디언 노트앱을 깊이 있게 사용하고 확장하는 데 필요한 정보가 포함되어 있습니다. +귀하의 답변은 다음 지침에 따라야 합니다: +1. 모든 답변은 명확하고 이해하기 쉬운 한국어로 제공되어야 합니다. +2. 답변은 문서의 내용을 기반으로 해야 하며, 가능한 한 구체적인 정보를 포함해야 합니다. +3. 문서 내에서 직접적인 답변을 찾을 수 없는 경우, "문서에는 해당 질문에 대한 구체적인 답변이 없습니다."라고 명시해 주세요. +4. 가능한 경우, 답변과 관련된 문서의 구체적인 부분(예: 섹션 이름, 페이지 번호 등)을 출처로서 명시해 주세요. +5. 질문에 대한 답변이 문서에 부분적으로만 포함되어 있는 경우, 가능한 한 많은 정보를 종합하여 답변해 주세요. 또한, 추가적인 연구나 참고자료가 필요할 수 있음을 언급해 주세요. + +#참고문서: +{context} + +#질문: +{question} + +#답변: + +출처: +- source1 +- source2 +- ... +""" +) + + +# 7. chain를 생성합니다. +llm = ChatGroq( + model_name="llama3-70b-8192", + temperature=0, +).configurable_alternatives( + ConfigurableField(id="llm"), + default_key="llama3", + gemini=GoogleGenerativeAI( + model="gemini-pro", + temperature=0, + ), +) + +rag_chain = ( + {"context": compression_retriever, "question": RunnablePassthrough()} + | prompt + | llm + | StrOutputParser() +) + +# # 8. chain를 실행합니다. +def predict(message, history=None): + answer = rag_chain.invoke(message) + return answer + +gr.ChatInterface( + predict, + title="옵시디언 노트앱 및 플러그인 개발에 대해서 물어보세요!", + description="안녕하세요!\n저는 옵시디언 노트앱과 플러그인 개발에 대한 인공지능 QA봇입니다. 옵시디언 노트앱의 사용법, 고급 기능, 플러그인 및 테마 개발에 대해 깊은 지식을 가지고 있어요. 문서 작업, 정보 정리 또는 개발에 관한 도움이 필요하시면 언제든지 질문해주세요!", +).launch() diff --git a/docs/obsidian-developer/Assets/command.png b/docs/obsidian-developer/Assets/command.png new file mode 100644 index 0000000000000000000000000000000000000000..947bb49b7967d5a325c327c182f43effdc3b93e4 Binary files /dev/null and b/docs/obsidian-developer/Assets/command.png differ diff --git a/docs/obsidian-developer/Assets/context-menu-positions.png b/docs/obsidian-developer/Assets/context-menu-positions.png new file mode 100644 index 0000000000000000000000000000000000000000..f78da0c6cbfc1e9eb831eb0bebea4fa433ae0904 Binary files /dev/null and b/docs/obsidian-developer/Assets/context-menu-positions.png differ diff --git a/docs/obsidian-developer/Assets/decorations.svg b/docs/obsidian-developer/Assets/decorations.svg new file mode 100644 index 0000000000000000000000000000000000000000..ded9d9402437af5c425d860ea110d11aeddc15c2 --- /dev/null +++ b/docs/obsidian-developer/Assets/decorations.svg @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 👉 + + + 👉 + + + 👉 + + + 👉 + + + 👉 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 👉 + + + 👉 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/obsidian-developer/Assets/default-violet.webp b/docs/obsidian-developer/Assets/default-violet.webp new file mode 100644 index 0000000000000000000000000000000000000000..c23dde4f8be9b04d5f16dc4d65d94793f32e79dc Binary files /dev/null and b/docs/obsidian-developer/Assets/default-violet.webp differ diff --git a/docs/obsidian-developer/Assets/editor-todays-date.gif b/docs/obsidian-developer/Assets/editor-todays-date.gif new file mode 100644 index 0000000000000000000000000000000000000000..e1c4773410e1904d7beaa4045e227d29b90bc835 Binary files /dev/null and b/docs/obsidian-developer/Assets/editor-todays-date.gif differ diff --git a/docs/obsidian-developer/Assets/editor-uppercase.gif b/docs/obsidian-developer/Assets/editor-uppercase.gif new file mode 100644 index 0000000000000000000000000000000000000000..d9dd71bfa76ba7d6f64c53b40114c885156bc876 Binary files /dev/null and b/docs/obsidian-developer/Assets/editor-uppercase.gif differ diff --git a/docs/obsidian-developer/Assets/example-insert-link.gif b/docs/obsidian-developer/Assets/example-insert-link.gif new file mode 100644 index 0000000000000000000000000000000000000000..ff921852ef4646a97557e7e4f345008eb5e8212e Binary files /dev/null and b/docs/obsidian-developer/Assets/example-insert-link.gif differ diff --git a/docs/obsidian-developer/Assets/fuzzy-suggestion-modal.png b/docs/obsidian-developer/Assets/fuzzy-suggestion-modal.png new file mode 100644 index 0000000000000000000000000000000000000000..e4ed73241a5aca321e6c3cf5d2e73286a8e76f84 Binary files /dev/null and b/docs/obsidian-developer/Assets/fuzzy-suggestion-modal.png differ diff --git a/docs/obsidian-developer/Assets/logo.svg b/docs/obsidian-developer/Assets/logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..ca2b680a9637c74d41251428f5bedfc04f9d2424 --- /dev/null +++ b/docs/obsidian-developer/Assets/logo.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/docs/obsidian-developer/Assets/modal-input.png b/docs/obsidian-developer/Assets/modal-input.png new file mode 100644 index 0000000000000000000000000000000000000000..dc91d115bf4a7d58bc7e40638e8f5e18fb4ae1b8 Binary files /dev/null and b/docs/obsidian-developer/Assets/modal-input.png differ diff --git a/docs/obsidian-developer/Assets/obsidian-lockup-docs.svg b/docs/obsidian-developer/Assets/obsidian-lockup-docs.svg new file mode 100644 index 0000000000000000000000000000000000000000..e7d6c1a9bebc849a250db214cbdc3d9c7e332e30 --- /dev/null +++ b/docs/obsidian-developer/Assets/obsidian-lockup-docs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-developer/Assets/settings-headings.png b/docs/obsidian-developer/Assets/settings-headings.png new file mode 100644 index 0000000000000000000000000000000000000000..bbea533e33e5d7258920cc582cda66a5af2c28cc Binary files /dev/null and b/docs/obsidian-developer/Assets/settings-headings.png differ diff --git a/docs/obsidian-developer/Assets/settings.png b/docs/obsidian-developer/Assets/settings.png new file mode 100644 index 0000000000000000000000000000000000000000..69efd9b6497aa258937198ceccb8cd1a1d7eaad8 Binary files /dev/null and b/docs/obsidian-developer/Assets/settings.png differ diff --git a/docs/obsidian-developer/Assets/status-bar.png b/docs/obsidian-developer/Assets/status-bar.png new file mode 100644 index 0000000000000000000000000000000000000000..0c2ddfa5319ecab065105498ae7d1260ceacff25 Binary files /dev/null and b/docs/obsidian-developer/Assets/status-bar.png differ diff --git a/docs/obsidian-developer/Assets/styles.png b/docs/obsidian-developer/Assets/styles.png new file mode 100644 index 0000000000000000000000000000000000000000..7f69195f870bb1ee27eb3c61b99f25c0ddc94309 Binary files /dev/null and b/docs/obsidian-developer/Assets/styles.png differ diff --git a/docs/obsidian-developer/Assets/suggest-modal.gif b/docs/obsidian-developer/Assets/suggest-modal.gif new file mode 100644 index 0000000000000000000000000000000000000000..274efa35849ff3afd3b2608bbade42b1a1c5f3da Binary files /dev/null and b/docs/obsidian-developer/Assets/suggest-modal.gif differ diff --git a/docs/obsidian-developer/Assets/user-interface.png b/docs/obsidian-developer/Assets/user-interface.png new file mode 100644 index 0000000000000000000000000000000000000000..800be5782b28ca67b1215fadbb5d5c9f1982ecb0 Binary files /dev/null and b/docs/obsidian-developer/Assets/user-interface.png differ diff --git a/docs/obsidian-developer/Assets/viewport.svg b/docs/obsidian-developer/Assets/viewport.svg new file mode 100644 index 0000000000000000000000000000000000000000..6d9b8d4c07db5215a230b62345a19c41615f981b --- /dev/null +++ b/docs/obsidian-developer/Assets/viewport.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/obsidian-developer/Developer policies.md b/docs/obsidian-developer/Developer policies.md new file mode 100644 index 0000000000000000000000000000000000000000..21edeaad3455e2dc7b026487486ac3a101d06142 --- /dev/null +++ b/docs/obsidian-developer/Developer policies.md @@ -0,0 +1,55 @@ +Our goal for community plugins and themes is to make it easy for users to safely modify and expand the capabilities of Obsidian, while prioritizing private and offline usage of the app. + +All community plugins and themes added to the Obsidian directory must respect the following policies. Every plugin and theme is individually vetted before being included in the directory. Plugins and themes that don't follow these policies will be removed from the directory. + +## Policies + +### Not allowed + +Plugins and themes must not: + +- Obfuscate code to hide its purpose. +- Insert dynamic ads that are loaded over the internet. +- Insert static ads outside a plugin’s own interface. +- Include client-side telemetry. +- Themes may not load assets from the network. To bundle an asset, see [[Embed fonts and images in your theme|this guide]]. + +### Disclosures + +The following are only allowed if clearly indicated in your README: + +- Payment is required for full access. +- An account is required for full access. +- Network use. Clearly explain which remote services are used and why they're needed. +- Accessing files outside of Obsidian vaults. Clearly explain why this is needed. +- Static ads such as banners and pop-up messages within the plugin's own interface. +- Server-side telemetry. Link to a privacy policy that explains how the data is handled must be included. +- Close sourced code. This will be handled on a case by case basis. + +### Copyright and licensing + +All community plugins and themes must follow these requirements: + +- Include a [LICENSE file](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository) and clearly indicate the license of your plugin or theme. +- Comply with the original licenses of any code your plugin or theme makes use of, including attribution in the README if required. +- Respect Obsidian's trademark policy. Don't use the "Obsidian" trademark in a way that could confuse users into thinking your plugin or theme is a first-party creation. + +## Reporting violations + +If you encounter a plugin or theme that violates the policies above, please let the developer know by opening a GitHub issue in their repository. Kindly check existing issues to see if it’s already reported. + +If the developer doesn’t response after 7 days, [contact the Obsidian team](https://help.obsidian.md/Help+and+support#Report+a+security+issue). For serious violations, you can contact our team immediately. + +## Removing plugins and themes + +In case of a policy violation, we may attempt to contact the developer and provide a reasonable timeframe for them to resolve the problem. + +If the problem isn't resolved by then, we'll remove plugins or themes from our directory. + +We may immediately remove a plugin or theme if: + +- The plugin or theme appears to be malicious. +- The developer is uncooperative. +- This is a repeated violation. + +In addition, we may also remove plugins or themes that have become unmaintained or severely broken. diff --git a/docs/obsidian-developer/Home.md b/docs/obsidian-developer/Home.md new file mode 100644 index 0000000000000000000000000000000000000000..aace23d7cbf0074041fbdec76c9d6bf98808f2bf --- /dev/null +++ b/docs/obsidian-developer/Home.md @@ -0,0 +1,35 @@ +--- +cssClass: hide-title +--- +# Obsidian Developer Docs + +Welcome to the official Obsidian Developer Documentation, where you can learn how to build plugins and themes for [Obsidian](https://obsidian.md/). For tips on how to use Obsidian, visit [the official Help site](https://help.obsidian.md/). + +## Plugins + +Build plugins to extend the existing functionality in Obsidian using TypeScript. + +- [[Build a plugin|Build your first plugin]] +- [[Submit your plugin]] + +## Themes + +Design beautiful themes and snippets for Obsidian using CSS. + +- [[Build a theme|Build your first theme]] +- [[Submit your theme]] +- [[CSS variables]] + +## Join the developer community + +If you get stuck, or if you're looking for feedback, [join the community](https://obsidian.md/community). + +- `#plugin-dev` and `#theme-dev` channels on Discord. +- [Developers & API](https://forum.obsidian.md/c/developers-api/14) and [Share & showcase](https://forum.obsidian.md/c/share-showcase/9) on the forum. + +## Contributing + +If you see any errors or room for improvement on this site, or want to submit a PR, feel free to open an issue on [our GitHub repository](https://github.com/obsidianmd/obsidian-developer-docs). +Additional details are available on our [readme](https://github.com/obsidianmd/obsidian-developer-docs#readme). + +Thank you in advance for contributing! diff --git a/docs/obsidian-developer/Plugins/Editor/Communicating with editor extensions.md b/docs/obsidian-developer/Plugins/Editor/Communicating with editor extensions.md new file mode 100644 index 0000000000000000000000000000000000000000..61584307edc8310ab023b6b5eb3d0c8507254864 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Editor/Communicating with editor extensions.md @@ -0,0 +1,53 @@ +Once you've built your editor extension, you might want to communicate with it from outside the editor. For example, through a [[Commands|command]], or a [[Ribbon actions|ribbon action]]. + +You can access the CodeMirror 6 editor from a [[MarkdownView|MarkdownView]]. However, since the Obsidian API doesn't actually expose the editor, you need to tell TypeScript to trust that it's there, using `@ts-expect-error`. + +```ts +import { EditorView } from "@codemirror/view"; + +// @ts-expect-error, not typed +const editorView = view.editor.cm as EditorView; +``` + +## View plugin + +You can access the [[View plugins|view plugin]] instance from the `EditorView.plugin()` method. + +```ts +this.addCommand({ + id: "example-editor-command", + name: "Example editor command", + editorCallback: (editor, view) => { + // @ts-expect-error, not typed + const editorView = view.editor.cm as EditorView; + + const plugin = editorView.plugin(examplePlugin); + + if (plugin) { + plugin.addPointerToSelection(editorView); + } + }, +}); +``` + +## State field + +You can dispatch changes and [[State fields#Dispatching state effects|dispatch state effects]] directly on the editor view. + +```ts +this.addCommand({ + id: "example-editor-command", + name: "Example editor command", + editorCallback: (editor, view) => { + // @ts-expect-error, not typed + const editorView = view.editor.cm as EditorView; + + editorView.dispatch({ + effects: [ + // ... + ], + }); + }, +}); +``` + diff --git a/docs/obsidian-developer/Plugins/Editor/Decorations.md b/docs/obsidian-developer/Plugins/Editor/Decorations.md new file mode 100644 index 0000000000000000000000000000000000000000..557efcbd16a20aa02e99378c382933213eb66575 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Editor/Decorations.md @@ -0,0 +1,226 @@ +Decorations let you control how to draw or style content in [[Editor extensions|editor extensions]]. If you intend to change the look and feel by adding, replacing, or styling elements in the editor, you most likely need to use decorations. + +By the end of this page, you'll be able to: + +- Understand how to use decorations to change the editor appearance. +- Understand the difference between providing decoration using state fields and view plugins. + +> [!note] +> This page aims to distill the official CodeMirror 6 documentation for Obsidian plugin developers. For more detailed information on state fields, refer to [Decorating the Document](https://codemirror.net/docs/guide/#decorating-the-document). + +## Prerequisites + +- Basic understanding of [[State fields]]. +- Basic understanding of [[View plugins]]. + +## Overview + +Without decorations, the document would render as plain text. Not very interesting at all. Using decorations, you can change how to display the document, for example by highlighting text or adding custom HTML elements. + +You can use the following types of decorations: + +- [Mark decorations](https://codemirror.net/docs/ref/#view.Decoration%5Emark) style existing elements. +- [Widget decorations](https://codemirror.net/docs/ref/#view.Decoration%5Ewidget) insert elements in the document. +- [Replace decorations](https://codemirror.net/docs/ref/#view.Decoration%5Ereplace) hide or replace part of the document with another element. +- [Line decorations](https://codemirror.net/docs/ref/#view.Decoration%5Eline) add styling to the lines, rather than the document itself. + +To use decorations, you need to create them inside an editor extension and have the extension _provide_ them to the editor. You can provide decorations to the editor in two ways, either _directly_ using [[State fields|state fields]] or _indirectly_ using [[View plugins|view plugins]]. + +## Should I use a view plugin or a state field? + +Both view plugins and state fields can provide decorations to the editor, but they have some differences. + +- Use a view plugin if you can determine the decoration based on what's inside the [[Viewport]]. +- Use a state field if you need to manage decorations outside of the viewport. +- Use a state field if you want to make changes that could change the content of the viewport, for example by adding line breaks. + +If you can implement your extension using either approach, then the view plugin generally results in better performance. For example, imagine that you want to implement an editor extension that checks the spelling of a document. + +One way would be to pass the entire document to an external spell checker which then returns a list of spelling errors. In this case, you'd need to map each error to a decoration and use a state field to manage decorations regardless of what's in the viewport at the moment. + +Another way would be to only spellcheck what's visible in the viewport. The extension would need to continuously run a spell check as the user scrolls through the document, but you'd be able to spell check documents with millions of lines of text. + +![State field vs. view plugin](decorations.svg) + +## Providing decorations + +Imagine that you want to build an editor extension that replaces the bullet list item with an emoji. You can accomplish this with either a view plugin or a state field, with some differences. In this section, you'll see how to implement it with both types of extensions. + +Both implementations share the same core logic: + +1. Use [syntaxTree](https://codemirror.net/docs/ref/#language.syntaxTree) to find list items. +2. For every list item, replace leading hyphens, `-`, with a _widget_. + +### Widgets + +Widgets are custom HTML elements that you can add to the editor. You can either insert a widget at a specific position in the document, or replace a piece of content with a widget. + +The following example defines a widget that returns an HTML element, `👉`. You'll use this widget later on. + +```ts +import { EditorView, WidgetType } from "@codemirror/view"; + +export class EmojiWidget extends WidgetType { + toDOM(view: EditorView): HTMLElement { + const div = document.createElement("span"); + + div.innerText = "👉"; + + return div; + } +} +``` + +To replace a range of content in your document with the emoji widget, use the [replace decoration](https://codemirror.net/docs/ref/#view.Decoration%5Ereplace). + +```ts +const decoration = Decoration.replace({ + widget: new EmojiWidget() +}); +``` + +### State fields + +To provide decorations from a state field: + +1. [[State fields#Defining a state field|Define a state field]] with a `DecorationSet` type. +2. Add the `provide` property to the state field. + + ```ts + provide(field: StateField): Extension { + return EditorView.decorations.from(field); + }, + ``` + +```ts +import { syntaxTree } from "@codemirror/language"; +import { + Extension, + RangeSetBuilder, + StateField, + Transaction, +} from "@codemirror/state"; +import { + Decoration, + DecorationSet, + EditorView, + WidgetType, +} from "@codemirror/view"; +import { EmojiWidget } from "emoji"; + +export const emojiListField = StateField.define({ + create(state): DecorationSet { + return Decoration.none; + }, + update(oldState: DecorationSet, transaction: Transaction): DecorationSet { + const builder = new RangeSetBuilder(); + + syntaxTree(transaction.state).iterate({ + enter(node) { + if (node.type.name.startsWith("list")) { + // Position of the '-' or the '*'. + const listCharFrom = node.from - 2; + + builder.add( + listCharFrom, + listCharFrom + 1, + Decoration.replace({ + widget: new EmojiWidget(), + }) + ); + } + }, + }); + + return builder.finish(); + }, + provide(field: StateField): Extension { + return EditorView.decorations.from(field); + }, +}); +``` + +### View plugins + +To manage your decorations using a view plugin: + +1. [[View plugins#Creating a view plugin|Create a view plugin]]. +2. Add a `DecorationSet` member property to your plugin. +3. Initialize the decorations in the `constructor()`. +4. Rebuild decorations in `update()`. + +Not all updates are reasons to rebuild your decorations. The following example only rebuilds decorations whenever the underlying document or the viewport changes. + +```ts +import { syntaxTree } from "@codemirror/language"; +import { RangeSetBuilder } from "@codemirror/state"; +import { + Decoration, + DecorationSet, + EditorView, + PluginSpec, + PluginValue, + ViewPlugin, + ViewUpdate, + WidgetType, +} from "@codemirror/view"; +import { EmojiWidget } from "emoji"; + +class EmojiListPlugin implements PluginValue { + decorations: DecorationSet; + + constructor(view: EditorView) { + this.decorations = this.buildDecorations(view); + } + + update(update: ViewUpdate) { + if (update.docChanged || update.viewportChanged) { + this.decorations = this.buildDecorations(update.view); + } + } + + destroy() {} + + buildDecorations(view: EditorView): DecorationSet { + const builder = new RangeSetBuilder(); + + for (let { from, to } of view.visibleRanges) { + syntaxTree(view.state).iterate({ + from, + to, + enter(node) { + if (node.type.name.startsWith("list")) { + // Position of the '-' or the '*'. + const listCharFrom = node.from - 2; + + builder.add( + listCharFrom, + listCharFrom + 1, + Decoration.replace({ + widget: new EmojiWidget(), + }) + ); + } + }, + }); + } + + return builder.finish(); + } +} + +const pluginSpec: PluginSpec = { + decorations: (value: EmojiListPlugin) => value.decorations, +}; + +export const emojiListPlugin = ViewPlugin.fromClass( + EmojiListPlugin, + pluginSpec +); +``` + +`buildDecorations()` is a helper method that builds a complete set of decorations based on the editor view. + +Notice the second argument to the `ViewPlugin.fromClass()` function. The `decorations` property in the `PluginSpec` specifies how the view plugin provides the decorations to the editor. + +Since the view plugin knows what's visible to the user, you can use `view.visibleRanges` to limit what parts of the syntax tree to visit. diff --git a/docs/obsidian-developer/Plugins/Editor/Editor extensions.md b/docs/obsidian-developer/Plugins/Editor/Editor extensions.md new file mode 100644 index 0000000000000000000000000000000000000000..cea515f7fab6ad512f1f036a25c0f1dcc22e878c --- /dev/null +++ b/docs/obsidian-developer/Plugins/Editor/Editor extensions.md @@ -0,0 +1,32 @@ +--- +alias: editor extension +--- + +Editor extensions let you customize the experience of editing notes in Obsidian. This page explains what editor extensions are, and when to use them. + +Obsidian uses CodeMirror 6 (CM6) to power the Markdown editor. Just like Obsidian, CM6 has plugins of its own, called _extensions_. In other words, an Obsidian _editor extension_ is the same thing as a _CodeMirror 6 extension_. + +The API for building editor extensions is a bit unconventional and requires that you have a basic understanding of its architecture before you get started. This section aims to give you enough context and examples for you to get started. If you want to learn more about building editor extensions, refer to the [CodeMirror 6 documentation](https://codemirror.net/docs/). + +## Do I need an editor extension? + +Building editor extensions can be challenging, so before you start building one, consider whether you really need it. + +- If you want to change how to convert Markdown to HTML in the Reading view, consider building a [[Markdown post processing|Markdown post processor]]. +- If you want to change how the document looks and feels in Live Preview, you need to build an editor extension. + +## Registering editor extensions + +CodeMirror 6 (CM6) is a powerful engine for editing code using web technologies. At its core, the editor itself has a minimal set of features. Any features you'd expect from a modern editor are available as _extensions_ that you can pick and choose. While Obsidian comes with many of these extensions out-of-the-box, you can also register your own. + +To register an editor extension, use [[registerEditorExtension|registerEditorExtension()]] in the `onload` method of your Obsidian plugin: + +```ts +onload() { + this.registerEditorExtension([examplePlugin, exampleField]); +} +``` + +While CM6 supports several types of extensions, two of the most common ones are [[View plugins]] and [[State fields]]. + + diff --git a/docs/obsidian-developer/Plugins/Editor/Editor.md b/docs/obsidian-developer/Plugins/Editor/Editor.md new file mode 100644 index 0000000000000000000000000000000000000000..4437c4d9547b1767b2832998540a59a1c5f1c468 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Editor/Editor.md @@ -0,0 +1,71 @@ +The [[Reference/TypeScript API/Editor/Editor|Editor]] class exposes operations for reading and manipulating an active Markdown document in edit mode. + +If you want to access the editor in a command, use the [[Commands#Editor commands|editorCallback]]. + +If you want to use the editor elsewhere, you can access it from the active view: + +```ts +const view = this.app.workspace.getActiveViewOfType(MarkdownView); + +// Make sure the user is editing a Markdown file. +if (view) { + const cursor = view.editor.getCursor(); + + // ... +} +``` + +> [!note] +> Obsidian uses [CodeMirror](https://codemirror.net/) (CM) as the underlying text editor, and exposes the CodeMirror editor as part of the API. `Editor` serves as an abstraction to bridge features between CM6 and CM5 (legacy editor, only available on desktop). By using `Editor` instead of directly accessing the CodeMirror instance, you ensure that your plugin works on both platforms. + +## Insert text at cursor position + +The [[replaceRange|replaceRange()]] method replaces the text between two cursor positions. If you only give it one position, it inserts the new text between that position and the next. + +The following command inserts today's date at the cursor position: + +```ts +import { Editor, moment, Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.addCommand({ + id: "insert-todays-date", + name: "Insert today's date", + editorCallback: (editor: Editor) => { + editor.replaceRange( + moment().format("YYYY-MM-DD"), + editor.getCursor() + ); + }, + }); + } +} +``` + +![[editor-todays-date.gif]] + +## Replace current selection + +If you want to modify the selected text, use [[replaceRange|replaceSelection()]] to replace the current selection with a new text. + +The following command reads the current selection and converts it to uppercase: + +```ts +import { Editor, Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.addCommand({ + id: "convert-to-uppercase", + name: "Convert to uppercase", + editorCallback: (editor: Editor) => { + const selection = editor.getSelection(); + editor.replaceSelection(selection.toUpperCase()); + }, + }); + } +} +``` + +![[editor-uppercase.gif]] diff --git a/docs/obsidian-developer/Plugins/Editor/Markdown post processing.md b/docs/obsidian-developer/Plugins/Editor/Markdown post processing.md new file mode 100644 index 0000000000000000000000000000000000000000..b3f48b2d7fb398024e7a50cc88dc080243253b5d --- /dev/null +++ b/docs/obsidian-developer/Plugins/Editor/Markdown post processing.md @@ -0,0 +1,76 @@ +If you want to change how a Markdown document is rendered in Reading view, you can add your own _Markdown post processor_. As indicated by the name, the post processor runs _after_ the Markdown has been processed into HTML. It lets you add, remove, or replace [[HTML elements]] to the rendered document. + +The following example looks for any code block that contains a text between two colons, `:`, and replaces it with an appropriate emoji: + +```ts +import { Plugin } from "obsidian"; + +const ALL_EMOJIS: Record = { + ":+1:": "👍", + ":sunglasses:": "😎", + ":smile:": "😄", +}; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.registerMarkdownPostProcessor((element, context) => { + const codeblocks = element.findAll("code"); + + for (let codeblock of codeblocks) { + const text = codeblock.innerText.trim(); + if (text[0] === ":" && text[text.length - 1] === ":") { + const emojiEl = codeblock.createSpan({ + text: ALL_EMOJIS[text] ?? text, + }); + codeblock.replaceWith(emojiEl); + } + } + }); + } +} +``` + +## Post-process Markdown code blocks + +Did you know that you can create [Mermaid](https://mermaid-js.github.io/) diagrams in Obsidian by creating a `mermaid` code block with a text definition like this one?: + +````md +```mermaid +flowchart LR + Start --> Stop +``` +```` + +If you change to Preview mode, the text in the code block becomes the following diagram: + +```mermaid +flowchart LR + Start --> Stop +``` + +If you want to add your own custom code blocks like the Mermaid one, you can use [[registerMarkdownCodeBlockProcessor|registerMarkdownCodeBlockProcessor()]]. The following example renders a code block with CSV data, as a table: + +```ts +import { Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.registerMarkdownCodeBlockProcessor("csv", (source, el, ctx) => { + const rows = source.split("\n").filter((row) => row.length > 0); + + const table = el.createEl("table"); + const body = table.createEl("tbody"); + + for (let i = 0; i < rows.length; i++) { + const cols = rows[i].split(","); + + const row = body.createEl("tr"); + + for (let j = 0; j < cols.length; j++) { + row.createEl("td", { text: cols[j] }); + } + } + }); + } +} +``` diff --git a/docs/obsidian-developer/Plugins/Editor/State fields.md b/docs/obsidian-developer/Plugins/Editor/State fields.md new file mode 100644 index 0000000000000000000000000000000000000000..341db6ebc6f4a6561fae3011c17fecc542c6dbaa --- /dev/null +++ b/docs/obsidian-developer/Plugins/Editor/State fields.md @@ -0,0 +1,95 @@ +A state field is an [[Editor extensions|editor extension]] that lets you manage custom editor state. This page walks you through building a state field by implementing a calculator extension. + +The calculator should be able to add and subtract a number from the current state, and to reset the state when you want to start over. + +By the end of this page, you'll understand the basic concepts of building a state field. + +> [!note] +> This page aims to distill the official CodeMirror 6 documentation for Obsidian plugin developers. For more detailed information on state fields, refer to [State Fields](https://codemirror.net/docs/guide/#state-fields). + +## Prerequisites + +- Basic understanding of [[State management]]. + +## Defining state effects + +State effects describe the state change you'd like to make. You may think of them as methods on a class. + +In the calculator example, you'd define a state effect for each of the calculator operations: + +```ts +const addEffect = StateEffect.define(); +const subtractEffect = StateEffect.define(); +const resetEffect = StateEffect.define(); +``` + +The type between the angle brackets, `<>`, defines the input type for the effect. For example, the number you want to add or subtract. The reset effect doesn't need any input, so you can leave it out. + +## Defining a state field + +Contrary to what one might think, state fields don't actually _store_ state. They _manage_ it. State fields take the current state, applies any state effects, and returns the new state. + +The state field contains the calculator logic to apply the mathematical operations depending on the effects in a transaction. Since a transaction can contain multiple effects, for example two additions, the state field needs to apply them all one after another. + +```ts +export const calculatorField = StateField.define({ + create(state: EditorState): number { + return 0; + }, + update(oldState: number, transaction: Transaction): number { + let newState = oldState; + + for (let effect of transaction.effects) { + if (effect.is(addEffect)) { + newState += effect.value; + } else if (effect.is(subtractEffect)) { + newState -= effect.value; + } else if (effect.is(resetEffect)) { + newState = 0; + } + } + + return newState; + }, +}); +``` + +- `create` returns the value the calculator starts with. +- `update` contains the logic for applying the effects. +- `effect.is()` lets you check the type of the effect before you apply it. + +## Dispatching state effects + +To apply a state effect to a state field, you need to dispatch it to the editor view as part of a transaction. + +```ts +view.dispatch({ + effects: [addEffect.of(num)], +}); +``` + +You can even define a set of helper functions that provide a more familiar API: + +```ts +export function add(view: EditorView, num: number) { + view.dispatch({ + effects: [addEffect.of(num)], + }); +} + +export function subtract(view: EditorView, num: number) { + view.dispatch({ + effects: [subtractEffect.of(num)], + }); +} + +export function reset(view: EditorView) { + view.dispatch({ + effects: [resetEffect.of(null)], + }); +} +``` + +## Next steps + +Provide [[Decorations]] from your state fields to change how to display the document. diff --git a/docs/obsidian-developer/Plugins/Editor/State management.md b/docs/obsidian-developer/Plugins/Editor/State management.md new file mode 100644 index 0000000000000000000000000000000000000000..9eedfe770070b0f41ed3b1da31d5f2c2cc613651 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Editor/State management.md @@ -0,0 +1,64 @@ +This page aims to give an introduction to state management for [[Editor extensions|editor extensions]]. + +> [!note] +> This page aims to distill the official CodeMirror 6 documentation for Obsidian plugin developers. For more detailed information on state management, refer to [State and Updates](https://codemirror.net/docs/guide/#state-and-updates). + +## State changes + +In most applications, you would update state by assigning a new value to a property or variable. As a consequence, the old value is lost forever. + +```ts +let note = ""; +note = "Heading" +note = "# Heading" +note = "## Heading" // How to undo this? +``` + +To support features like undoing and redoing changes to a user's workspace, applications like Obsidian instead keep a history of all changes that have been made. To undo a change, you can then go back to a point in time before the change was made. + +| | State | +|---|------------| +| 0 | | +| 1 | Heading | +| 2 | # Heading | +| 3 | ## Heading | + +In TypeScript, you'd then end up with something like this: + +```ts +const changes: ChangeSpec[] = []; + +changes.push({ from: 0, insert: "Heading" }); +changes.push({ from: 0, insert: "# " }); +changes.push({ from: 0, insert: "#" }); +``` + +## Transactions + +Imagine a feature where you select some text and press the double quote, `"` to surround the selection with quotes on both sides. One way to implement the feature would be to: + +1. Insert `"` at the start of the selection. +2. Insert `"` at the end of the selection. + +Notice that the implementation consists of _two_ state changes. If you added these to the undo history, the user would need to undo _twice_, once for each double quote. To avoid this, what if you could group these changes so that they appear as one? + +For editor extensions, a group of state changes that happen together is called a _transaction_. + +If you combine what you've learned so far—and if you allow transactions that contain only a single state change—then you can consider state as a _history of transactions_. + +Bringing it all together to implement the surround feature from before in an editor extension, here's how you'd add, or _dispatch_, a transaction to the editor view: + +```ts +view.dispatch({ + changes: [ + { from: selectionStart, insert: `"` }, + { from: selectionEnd, insert: `"` } + ] +}); +``` + +## Next steps + +On this page, you've learned about modeling state as a series of state changes, and how to group them into transactions. + +To learn how to manage custom state in your editor, refer to [[State fields]]. diff --git a/docs/obsidian-developer/Plugins/Editor/View plugins.md b/docs/obsidian-developer/Plugins/Editor/View plugins.md new file mode 100644 index 0000000000000000000000000000000000000000..deceb50346dd4b536c44b857e79d142f6b932b30 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Editor/View plugins.md @@ -0,0 +1,54 @@ +A view plugin is an [[Editor extensions|editor extension]] that gives you access to the editor [[Viewport]]. + +> [!note] +> This page aims to distill the official CodeMirror 6 documentation for Obsidian plugin developers. For more information on state management, refer to [Affecting the View](https://codemirror.net/docs/guide/#affecting-the-view). + +## Prerequisites + +- Basic understanding of the [[Viewport]]. + +## Creating a view plugin + +View plugins are editor extensions that run _after_ the viewport has been recomputed. While this means that they can access the viewport, it also means that a view plugin can't make any changes that would impact the viewport. For example, by inserting blocks or line breaks into the document. + +> [!tip] +> If you want to make changes that impact the vertical layout of the editor, by for example inserting blocks and line breaks, you need to use a [[State fields|state field]]. + +To create a view plugin, create a class that implements [PluginValue](https://codemirror.net/docs/ref/#view.PluginValue) and pass it to the [ViewPlugin.fromClass()](https://codemirror.net/docs/ref/#view.ViewPlugin^fromClass) function. + +```ts +import { + ViewUpdate, + PluginValue, + EditorView, + ViewPlugin, +} from "@codemirror/view"; + +class ExamplePlugin implements PluginValue { + constructor(view: EditorView) { + // ... + } + + update(update: ViewUpdate) { + // ... + } + + destroy() { + // ... + } +} + +export const examplePlugin = ViewPlugin.fromClass(ExamplePlugin); +``` + +The three methods of the view plugin control its lifecycle: + +- `constructor()` initializes the plugin. +- `update()` updates your plugin when something has changed, for example when the user entered or selected some text. +- `destroy()` cleans up after the plugin. + +While the view plugin in the example works, it doesn't do much. If you want to better understand what causes the plugin to update, you can add a `console.log(update);` line to the `update()` method to print all updates to the console. + +## Next steps + +Provide [[Decorations]] from your view plugin to change how to display the document. diff --git a/docs/obsidian-developer/Plugins/Editor/Viewport.md b/docs/obsidian-developer/Plugins/Editor/Viewport.md new file mode 100644 index 0000000000000000000000000000000000000000..e9165e004d109f60d98dc245ef9ac9fe0a0db612 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Editor/Viewport.md @@ -0,0 +1,12 @@ +The Obsidian editor supports [huge documents](https://codemirror.net/examples/million/) with millions of lines. One of the reasons why this is possible, is because the editor only renders what's visible (and a little bit more). + +Imagine that you want to edit a document that is too big to fit on your monitor. The Obsidian editor creates a "window" that moves across the document, only rendering the content within the window (and ignoring what's outside). This window is known as the editor's _viewport_. + +![Viewport](viewport.svg) + +Whenever the user scrolls through the document, or when the document itself changes, the viewport becomes out-of-date and needs to be recomputed. + +If you want to build an editor extension that depends on the viewport, refer to [[View plugins]]. + +> [!note] +> This page aims to distill the official CodeMirror 6 documentation for Obsidian plugin developers. For more information on state management, refer to [Viewport](https://codemirror.net/docs/guide/#viewport). diff --git a/docs/obsidian-developer/Plugins/Events.md b/docs/obsidian-developer/Plugins/Events.md new file mode 100644 index 0000000000000000000000000000000000000000..c1b9d4d92c5330657af69fc22179260c69887030 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Events.md @@ -0,0 +1,50 @@ +Many of the interfaces in the Obsidian lets you subscribe to events throughout the application, for example when the user makes changes to a file. + +Any registered event handlers need to be detached whenever the plugin unloads. The safest way to make sure this happens is to use the [[registerEvent|registerEvent()]] method. + +```ts +import { Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.registerEvent(this.app.vault.on('create', () => { + console.log('a new file has entered the arena') + })); + } +} +``` + +## Timing events + +If you want to repeatedly call a function with a fixed delay, use the [`window.setInterval()`](https://developer.mozilla.org/en-US/docs/Web/API/setInterval) function with the [[registerInterval|registerInterval()]] method. + +The following example displays the current time in the status bar, updated every second: + +```ts +import { moment, Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + statusBar: HTMLElement; + + async onload() { + this.statusBar = this.addStatusBarItem(); + + this.updateStatusBar(); + + this.registerInterval( + window.setInterval(() => this.updateStatusBar(), 1000) + ); + } + + updateStatusBar() { + this.statusBar.setText(moment().format("H:mm:ss")); + } +} +``` + +> [!tip] Date and time +> [Moment](https://momentjs.com/) is a popular JavaScript library for working with dates and time. Obsidian uses Moment internally, so you don't need to install it yourself. You can import it from the Obsidian API instead: +> +> ```ts +> import { moment } from "obsidian"; +> ``` diff --git a/docs/obsidian-developer/Plugins/Getting started/Anatomy of a plugin.md b/docs/obsidian-developer/Plugins/Getting started/Anatomy of a plugin.md new file mode 100644 index 0000000000000000000000000000000000000000..fb0d4e886699f968312b50cf0f25ccd668454e25 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Getting started/Anatomy of a plugin.md @@ -0,0 +1,40 @@ +The [[Plugin|Plugin]] class defines the lifecycle of a plugin and exposes the operations available to all plugins: + +```ts +import { Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + // Configure resources needed by the plugin. + } + async onunload() { + // Release any resources configured by the plugin. + } +} +``` + +## Plugin lifecycle + +[[onload|onload()]] runs whenever the user starts using the plugin in Obsidian. This is where you'll configure most of the plugin's capabilities. + +[[onunload|onunload()]] runs when the plugin is disabled. Any resources that your plugin is using must be released here to avoid affecting the performance of Obsidian after your plugin has been disabled. + +To better understand when these methods are called, you can print a message to the console whenever the plugin loads and unloads. The console is a valuable tool that lets developers monitor the status of their code. + +To view the console: + +1. Toggle the Developer Tools by pressing Ctrl+Shift+I in Windows and Linux, or Cmd-Option-I on macOS. +2. Click on the Console tab in the Developer Tools window. + +```ts +import { Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + console.log('loading plugin') + } + async onunload() { + console.log('unloading plugin') + } +} +``` diff --git a/docs/obsidian-developer/Plugins/Getting started/Build a plugin.md b/docs/obsidian-developer/Plugins/Getting started/Build a plugin.md new file mode 100644 index 0000000000000000000000000000000000000000..ffc0aa7b8a37395ff92337704551958b80166f0c --- /dev/null +++ b/docs/obsidian-developer/Plugins/Getting started/Build a plugin.md @@ -0,0 +1,131 @@ +Plugins let you extend Obsidian with your own features to create a custom note-taking experience. + +In this tutorial, you'll compile a sample plugin from source code and load it into Obsidian. + +## What you'll learn + +After you've completed this tutorial, you'll be able to: + +- Configure an environment for developing Obsidian plugins. +- Compile a plugin from source code. +- Reload a plugin after making changes to it. + +## Prerequisites + +To complete this tutorial, you'll need: + +- [Git](https://git-scm.com/) installed on your local machine. +- A local development environment for [Node.js](https://Node.js.org/en/about/). +- A code editor, such as [Visual Studio Code](https://code.visualstudio.com/). + +## Before you start + +When developing plugins, one mistake can lead to unintended changes to your vault. To prevent data loss, you should never develop plugins in your main vault. Always use a separate vault dedicated to plugin development. + +[Create an empty vault](https://help.obsidian.md/Getting+started/Create+a+vault#Create+empty+vault). + +## Step 1: Download the sample plugin + +In this step, you'll download a sample plugin to the `plugins` directory in your vault's [`.obsidian` directory](https://help.obsidian.md/Advanced+topics/How+Obsidian+stores+data#Per+vault+data) so that Obsidian can find it. + +The sample plugin you'll use in this tutorial is available in a [GitHub repository](https://github.com/obsidianmd/obsidian-sample-plugin). + +1. Open a terminal window and change the project directory to the `plugins` directory. + + ```bash + cd path/to/vault + mkdir .obsidian/plugins + cd .obsidian/plugins + ``` + +2. Clone the sample plugin using Git. + + ```bash + git clone https://github.com/obsidianmd/obsidian-sample-plugin.git + ``` + +> [!tip] GitHub template repository +> The repository for the sample plugin is a GitHub template repository, which means you can create your own repository from the sample plugin. To learn how, refer to [Creating a repository from a template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template). +> +> Remember to use the URL of your own repository when cloning the sample plugin. + +## Step 2: Build the plugin + +In this step, you'll compile the sample plugin so that Obsidian can load it. + +1. Navigate to the plugin directory. + + ```bash + cd obsidian-sample-plugin + ``` + +2. Install dependencies. + + ```bash + npm install + ``` + +3. Compile the source code. The following command keeps running in the terminal and rebuilds the plugin when you modify the source code. + + ```bash + npm run dev + ``` + +Notice that the plugin directory now has a `main.js` file that contains a compiled version of the plugin. + +## Step 3: Enable the plugin + +To load a plugin in Obsidian, you first need to enable it. + +1. In Obsidian, open **Settings**. +2. In the side menu, select **Community plugins**. +3. Select **Turn on community plugins**. +4. Under **Installed plugins**, enable the **Sample Plugin** by selecting the toggle button next to it. + +You're now ready to use the plugin in Obsidian. Next, we'll make some changes to the plugin. + +## Step 4: Update the plugin manifest + +In this step, you'll rename the plugin by updating the plugin manifest, `manifest.json`. The manifest contains information about your plugin, such as its name and description. + +1. Open `manifest.json` in your code editor. +2. Change `id` to a unique identifier, such as `"hello-world"`. +3. Change `name` to a human-friendly name, such as `"Hello world"`. +4. Restart Obsidian to load the new changes to the plugin manifest. + +Go back to **Installed plugins** and notice that the name of the plugin has been updated to reflect the changes you made. + +Remember to restart Obsidian whenever you make changes to `manifest.json`. + +## Step 5: Update the source code + +To let the user interact with your plugin, add a _ribbon icon_ that greets the user when they select it. + +1. Open `main.ts` in your code editor. +2. Rename the plugin class from `MyPlugin` to `HelloWorldPlugin`. +3. Import `Notice` from the `obsidian` package. + + ```ts + import { Notice, Plugin } from "obsidian"; + ``` + +4. In the `onload()` method, add the following code: + + ```ts + this.addRibbonIcon('dice', 'Greet', () => { + new Notice('Hello, world!'); + }); + ``` + +5. In the **Command palette**, select **Reload app without saving** to reload the plugin. + +You can now see a dice icon in the ribbon on the left side of the Obsidian window. Select it to display a message in the upper-right corner. + +Remember, you need to **reload your plugin after changing the source code**, either by disabling it then enabling it again in the community plugins panel, or using the command palette as detailed in part 5 of this step. + +> [!tip] Hot reloading +> Install the [Hot-Reload](https://github.com/pjeby/hot-reload) plugin to automatically reload your plugin while developing. + +## Conclusion + +In this tutorial, you've built your first Obsidian plugin using the TypeScript API. You've modified the plugin and reloaded it to reflect the changes inside Obsidian. diff --git a/docs/obsidian-developer/Plugins/Getting started/Development workflow.md b/docs/obsidian-developer/Plugins/Getting started/Development workflow.md new file mode 100644 index 0000000000000000000000000000000000000000..0045875805cce20fcc88e5c8f38880165e0dc3a0 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Getting started/Development workflow.md @@ -0,0 +1,19 @@ +Whenever you make a change to the plugin source code, the plugin needs to be reloaded. You can reload the plugin by quitting Obsidian and starting it again, but that gets tiring quickly. + +## Reload plugin inside Obsidian + +You can reload the plugin by re-enabling it in the list of installed plugins: + +1. Open **Preferences**. +2. Click **Community plugins**. +3. Find your plugin under **Installed plugins**. +4. Toggle the switch off to disable the plugin. +5. Toggle the switch on to enable the plugin. + +You're now running the updated version of your plugin. + +## Reload plugin on file changes + +The [Hot-Reload](https://github.com/pjeby/hot-reload) plugin reloads your plugin whenever the source code changes. + +For more information, check out the [forum announcement](https://forum.obsidian.md/t/plugin-release-for-developers-hot-reload-the-plugin-s-youre-developing/12185). diff --git a/docs/obsidian-developer/Plugins/Getting started/Mobile development.md b/docs/obsidian-developer/Plugins/Getting started/Mobile development.md new file mode 100644 index 0000000000000000000000000000000000000000..e979b830a8b704b8b804260a8fc639a30be51f96 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Getting started/Mobile development.md @@ -0,0 +1,73 @@ +Learn how you can develop your plugin for mobile devices. + +## Emulate mobile device on desktop + +You can emulate Obsidian running a mobile device directly from the Developer Tools. + +1. Open the **Developer Tools**. +2. Select the **Console** tab. +3. Enter the following and then press `Enter`. + + ```ts + this.app.emulateMobile(true); + ``` + +To disable mobile emulation, enter the following and press `Enter`: + +```ts +this.app.emulateMobile(false); +``` + + +> [!tip] +> To instead toggle mobile emulation back and forth, you can use the `this.app.isMobile` flag: +> +> ```ts +> this.app.emulateMobile(!this.app.isMobile); +> ``` + +## Inspecting the webview on the actual mobile device + +### Android + +You can inspect Obsidian running on an Android device if you enable USB Debugging in Developer settings of Android. Then go to a chromium based browser on your desktop/laptop and navigate to chrome://inspect/. If you did everything right, if you have your phone/tablet connected to your PC via USB and the browser open at that link you should see your device pop up and it will let you run the usual devtools from there on it. + +### iOS + +You can inspect Obsidian on an iOS device running 16.4 or later and a macOS based computer. Instructions on how to set it up can be found here: https://webkit.org/web-inspector/enabling-web-inspector/ + +## Platform-specific features + +To detect the platform your plugin is running on, you can use `Platform`: + +```ts +import { Platform } from "obsidian"; + +if (Platform.isIosApp) { + // ... +} + +if (Platform.isAndroidApp) { + // ... +} +``` + +## Disable your plugin on mobile devices + +If your plugin requires the Node.js or Electron API, you can prevent users from installing the plugin on mobile devices. + +To only support the desktop app, set `isDesktopOnly` to `true` in the [[Manifest]]. + +## Troubleshooting + +This section lists common issues when developing for mobile devices. + +### Node and Electron APIs + +The Node.js API and the Electron API aren't available on mobile devices. Any calls to these libraries result cause your plugin to crash. + +### Lookbehind in regular expressions + +Lookbehind in regular expressions is only supported on iOS 16.4 and above, and some iPhone and iPad users may still use earlier versions. To implement a fallback for iOS users, either refer to [[#Platform-specific features]], or use a JavaScript library to detect specific browser versions. + +Refer to [Can I Use](https://caniuse.com/js-regexp-lookbehind) for more information and exact version statistics. Look for "Safari on iOS". diff --git a/docs/obsidian-developer/Plugins/Getting started/Use React in your plugin.md b/docs/obsidian-developer/Plugins/Getting started/Use React in your plugin.md new file mode 100644 index 0000000000000000000000000000000000000000..7e26f3cb418b4f2c24466e9b19b0ebfc44fb3802 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Getting started/Use React in your plugin.md @@ -0,0 +1,138 @@ +In this guide, you'll configure your plugin to use [React](https://react.dev/). It assumes that you already have a plugin with a [[Views|custom view]] that you want to convert to use React. + +While you don't need to use a separate framework to build a plugin, there are a few reasons why you'd want to use React: + +- You have existing experience of React and want to use a familiar technology. +- You have existing React components that you want to reuse in your plugin. +- Your plugin requires complex state management or other features that can be cumbersome to implement with regular [[HTML elements]]. + +## Configure your plugin + +1. Add React to your plugin dependencies: + + ```bash + npm install react react-dom + ``` + +2. Add type definitions for React: + + ```bash + npm install --save-dev @types/react @types/react-dom + ``` + +3. In `tsconfig.json`, enable JSX support on the `compilerOptions` object: + + ```ts + { + "compilerOptions": { + "jsx": "preserve" + } + } + ``` + +## Create a React component + +Create a new file called `ReactView.tsx` in the plugin root directory, with the following content: + +```tsx title="ReactView.tsx" +export const ReactView = () => { + return

Hello, React!

; +}; +``` + +## Mount the React component + +To use the React component, it needs to be mounted on a [[HTML elements]]. The following example mounts the `ReactView` component on the `this.containerEl.children[1]` element: + +```tsx +import { StrictMode } from "react"; +import { ItemView, WorkspaceLeaf } from "obsidian"; +import { Root, createRoot } from "react-dom/client"; +import { ReactView } from "./ReactView"; + +const VIEW_TYPE_EXAMPLE = "example-view"; + +class ExampleView extends ItemView { + root: Root | null = null; + + constructor(leaf: WorkspaceLeaf) { + super(leaf); + } + + getViewType() { + return VIEW_TYPE_EXAMPLE; + } + + getDisplayText() { + return "Example view"; + } + + async onOpen() { + this.root = createRoot(this.containerEl.children[1]); + this.root.render( + + , + , + ); + } + + async onClose() { + this.root?.unmount(); + } +} +``` + +For more information on `createRoot` and `unmount()`, refer to the documentation on [ReactDOM](https://react.dev/reference/react-dom/client/createRoot#root-render). + +You can mount your React component on any `HTMLElement`, for example [[Plugins/User interface/Status bar|status bar items]]. Just make sure to clean up properly by calling `this.root.unmount()` when you're done. + +## Create an App context + +If you want to access the [[Reference/TypeScript API/App/App|App]] object from one of your React components, you need to pass it as a dependency. As your plugin grows, even though you're only using the `App` object in a few places, you start passing it through the whole component tree. + +Another alternative is to create a React context for the app to make it globally available to all components inside your React view. + +1. Use `createContext()` to create a new app context. + + ```tsx title="context.ts" + import { createContext } from "react"; + import { App } from "obsidian"; + + export const AppContext = createContext(undefined); + ``` + +2. Wrap the `ReactView` with a context provider and pass the app as the value. + + ```tsx title="view.tsx" + this.root = createRoot(this.containerEl.children[1]); + this.root.render( + + + + ); + ``` + +3. Create a custom hook to make it easier to use the context in your components. + + ```tsx title="hooks.ts" + import { useContext } from "react"; + import { AppContext } from "./context"; + + export const useApp = (): App | undefined => { + return useContext(AppContext); + }; + ``` + +4. Use the hook in any React component within `ReactView` to access the app. + + ```tsx title="ReactView.tsx" + import { useApp } from "./hooks"; + + export const ReactView = () => { + const { vault } = useApp(); + + return

{vault.getName()}

; + }; + ``` + +For more information, refer to the React documentation for [Passing Data Deeply with Context](https://react.dev/learn/passing-data-deeply-with-context) and [Reusing Logic with Custom Hooks](https://react.dev/learn/reusing-logic-with-custom-hooks). diff --git a/docs/obsidian-developer/Plugins/Getting started/Use Svelte in your plugin.md b/docs/obsidian-developer/Plugins/Getting started/Use Svelte in your plugin.md new file mode 100644 index 0000000000000000000000000000000000000000..9cd25ada9c2da7049cc8df6f73c51d5758423cce --- /dev/null +++ b/docs/obsidian-developer/Plugins/Getting started/Use Svelte in your plugin.md @@ -0,0 +1,187 @@ +This guide explains how to configure your plugin to use [Svelte](https://svelte.dev/), a light-weight alternative to traditional frameworks like React and Vue. + +Svelte is built around a compiler that preprocesses your code and outputs vanilla JavaScript, which means it doesn't need to load any libraries at run time. This also means that it doesn't need a virtual DOM to track state changes, which allows your plugin to run with minimal additional overhead. + +If you want to learn more about Svelte, and how to use it, refer to the [tutorial](https://svelte.dev/tutorial/basics) and the [documentation](https://svelte.dev/docs). + +This guide assumes that you've finished [[Build a plugin]]. + +> [!tip] Visual Studio Code +> Svelte has an [official Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) that enables syntax highlighting and rich IntelliSense in Svelte components. + +## Configure your plugin + +To build a Svelte application, you need to install the dependencies and configure your plugin to compile code written using Svelte. + +1. Add Svelte to your plugin dependencies: + + ```bash + npm install --save-dev svelte svelte-preprocess @tsconfig/svelte esbuild-svelte + ``` + +2. Extend the `tsconfig.json` to enable additional type checking for common Svelte issues. The `types` property is important for TypeScript to recognize `.svelte` files. + + ```json + { + "extends": "@tsconfig/svelte/tsconfig.json", + "compilerOptions": { + "types": ["svelte", "node"], + + // ... + } + } + ``` + +3. Remove the following line from your `tsconfig.json` as it conflicts with the Svelte configuration. + + ```json + "inlineSourceMap": true, + ``` + +4. In `esbuild.config.mjs`, add the following imports to the top of the file: + + ```js + import esbuildSvelte from "esbuild-svelte"; + import sveltePreprocess from "svelte-preprocess"; + ``` + +5. Add Svelte to the list of plugins. + + ```js + esbuild + .build({ + plugins: [ + esbuildSvelte({ + compilerOptions: { css: true }, + preprocess: sveltePreprocess(), + }), + ], + // ... + }) + .catch(() => process.exit(1)); + ``` + +## Create a Svelte component + +In the root directory of the plugin, create a new file called `Component.svelte`: + +```tsx + + +
+ My number is {variable}! +
+ + +``` + +## Mount the Svelte component + +To use the Svelte component, it needs to be mounted on an existing [[HTML elements|HTML element]]. For example, if you are mounting on a custom [[ItemView|ItemView]] in Obsidian: + +```ts +import { ItemView, WorkspaceLeaf } from "obsidian"; + +import Component from "./Component.svelte"; + +export const VIEW_TYPE_EXAMPLE = "example-view"; + +export class ExampleView extends ItemView { + component: Component; + + constructor(leaf: WorkspaceLeaf) { + super(leaf); + } + + getViewType() { + return VIEW_TYPE_EXAMPLE; + } + + getDisplayText() { + return "Example view"; + } + + async onOpen() { + this.component = new Component({ + target: this.contentEl, + props: { + variable: 1 + } + }); + } + + async onClose() { + this.component.$destroy(); + } +} +``` + +> [!info] +> Svelte requires at least TypeScript 4.5. If you see the following error when you build the plugin, you need to upgrade TypeScript to a more recent version. +> +> ```plain +> error TS5023: Unknown compiler option 'preserveValueImports'. +> ``` +> +> To fix the error, run the following in your terminal: +> +> ```bash +> npm update typescript@~4.5.0 +> ``` + +## Create a Svelte store + +To create a store for your plugin and access it from within a generic Svelte component instead of passing the plugin as a prop, follow these steps: + +1. Create a file called `store.ts`: + + ```jsx + import { writable } from "svelte/store"; + import type ExamplePlugin from "./main"; + + const plugin = writable(); + export default { plugin }; + ``` + +2. Configure the store: + + ```ts + import { ItemView, WorkspaceLeaf } from "obsidian"; + import type ExamplePlugin from "./main"; + import store from "./store"; + import Component from "./Component.svelte"; + + const VIEW_TYPE_EXAMPLE = "example-view"; + + class ExampleView extends ItemView { + // ... + + async onOpen() { + store.plugin.set(this.plugin); + + this.component = new Component({ + target: this.contentEl, + props: { + variable: 1 + } + }); + } + } + ``` + +3. To use the store in your component: + + ```jsx + + ``` diff --git a/docs/obsidian-developer/Plugins/Releasing/Beta-testing plugins.md b/docs/obsidian-developer/Plugins/Releasing/Beta-testing plugins.md new file mode 100644 index 0000000000000000000000000000000000000000..3cb473577930cbf2359392028fdc7f1c81b48e3e --- /dev/null +++ b/docs/obsidian-developer/Plugins/Releasing/Beta-testing plugins.md @@ -0,0 +1,3 @@ +Before you [[Submit your plugin|submit your plugin]], you may want to let users try it out first. While Obsidian doesn't officially support beta releases, we recommend that you use the [BRAT](https://github.com/TfTHacker/obsidian42-brat) plugin to distribute your plugin to beta testers before it's been published. + +For more information, refer to the [BRAT](https://github.com/TfTHacker/obsidian42-brat/blob/main/README.md) documentation. diff --git a/docs/obsidian-developer/Plugins/Releasing/Plugin guidelines.md b/docs/obsidian-developer/Plugins/Releasing/Plugin guidelines.md new file mode 100644 index 0000000000000000000000000000000000000000..c9630035eed347d32dade4d056af0e8759048b47 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Releasing/Plugin guidelines.md @@ -0,0 +1,301 @@ +This page lists common review comments plugin authors get when submitting their plugin. + +While the guidelines on this page are recommendations, depending on their severity, we may still require you to address any violations. + +> [!important] Policies for plugin developers +> Make sure that you've read our [[Developer policies]] as well as the [[Submission requirements for plugins]]. + +## General + +### Avoid using global app instance + +Avoid using the global app object, `app` (or `window.app`). Instead, use the reference provided by your plugin instance, `this.app`. + +The global app object is intended for debugging purposes and might be removed in the future. + +## UI text + +This section lists guidelines for formatting text in the user interface, such as settings, commands, and buttons. + +The example below from **Settings → Appearance** demonstrates the guidelines for text in the user interface. + +![[settings-headings.png]] + +1. [[#Only use headings under settings if you have more than one section.|General settings are at the top and don't have a heading]]. +2. [[#Avoid "settings" in settings headings|Section headings don't have "settings" in the heading text]]. +3. [[#Use Sentence case in UI]]. + +For more information on writing and formatting text for Obsidian, refer to our [Style guide](https://help.obsidian.md/Contributing+to+Obsidian/Style+guide). + +### Only use headings under settings if you have more than one section. + +Avoid adding a top-level heading in the settings tab, such as "General", "Settings", or the name of your plugin. + +If you have more than one section under settings, and one contains general settings, keep them at the top without adding a heading. + +For example, look at the settings under **Settings → Appearance**: + +### Avoid "settings" in settings headings + +In the settings tab, you can add headings to organize settings. Avoid including the word "settings" to these headings. Since everything in under the settings tab is settings, repeating it for every heading becomes redundant. + +- Prefer "Advanced" over "Advanced settings". +- Prefer "Templates" over "Settings for templates". + +### Use sentence case in UI + +Any text in UI elements should be using [Sentence case](https://en.wiktionary.org/wiki/sentence_case) instead of [Title Case](https://en.wikipedia.org/wiki/Title_case), where only the first word in a sentence, and proper nouns, should be capitalized. + +- Prefer "Template folder location" over "Template Folder Location". +- Prefer "Create new note" over "Create New Note". + +## Security + +### Avoid `innerHTML`, `outerHTML` and `insertAdjacentHTML` + +Building DOM elements from user-defined input, using `innerHTML`, `outerHTML` and `insertAdjacentHTML` can pose a security risk. + +The following example builds a DOM element using a string that contains user input, `${name}`. `name` can contain other DOM elements, such as ``, and can allow a potential attacker to execute arbitrary code on the user's computer. + +```ts +function showName(name: string) { + let containerElement = document.querySelector('.my-container'); + // DON'T DO THIS + containerElement.innerHTML = `
Your name is: ${name}
`; +} +``` + +Instead, use the DOM API or the Obsidian helper functions, such as `createEl()`, `createDiv()` and `createSpan()` to build the DOM element programmatically. For more information, refer to [[HTML elements]]. + +## Resource management + +### Clean up resources when plugin unloads + +Any resources created by the plugin, such as event listeners, must be destroyed or released when the plugin unloads. + +When possible, use methods like [[registerEvent|registerEvent()]] or [[addCommand|addCommand()]] to automatically clean up resources when the plugin unloads. + +```ts +export default class MyPlugin extends Plugin { + onload() { + this.registerEvent(this.app.vault.on("create", this.onCreate)); + } + + onCreate: (file: TAbstractFile) => { + // ... + } +} +``` + +> [!note] +> You don't need to clean up resources that are guaranteed to be removed when your plugin unloads. For example, if you register a `mouseenter` listener on a DOM element, the event listener will be garbage-collected when the element goes out of scope. + +### Don't detach leaves in `onunload` + +When the user updates your plugin, any open leaves will be reinitialized at their original position, regardless of where the user had moved them. + +## Commands + +### Avoid setting a default hotkey for commands + +Setting a default hotkey may lead to conflicts between plugins and may override hotkeys that the user has already configured. + +It's also difficult to choose a default hotkey that is available on all operating systems. + +### Use the appropriate callback type for commands + +When you add a command in your plugin, use the appropriate callback type. + +- Use `callback` if the command runs unconditionally. +- Use `checkCallback` if the command only runs under certain conditions. + +If the command requires an open and active Markdown editor, use `editorCallback`, or the corresponding `editorCheckCallback`. + +## Workspace + +### Avoid accessing `workspace.activeLeaf` directly + +If you want to access the active view, use [[getActiveViewOfType|getActiveViewOfType()]] instead: + +```ts +const view = this.app.workspace.getActiveViewOfType(MarkdownView); + +// getActiveViewOfType will return null if the active view is null, or if it's not a MarkdownView. +if (view) { + // ... +} +``` + +If you want to access the editor in the active note, use `activeEditor` instead: + +```ts +const editor = this.app.workspace.activeEditor; +``` + +### Avoid managing references to custom views + +Managing references to custom view can cause memory leaks or unintended consequences. + +**Don't** do this: + +```ts +this.registerViewType(MY_VIEW_TYPE, () => this.view = new MyCustomView()); +``` + +Do this instead: + +```ts +this.registerViewType(MY_VIEW_TYPE, () => new MyCustomView()); +``` + +To access the view from your plugin, use `Workspace.getActiveLeavesOfType()`: + +```ts +for (let leaf of app.workspace.getActiveLeavesOfType(MY_VIEW_TYPE)) { + let view = leaf.view; + if (view instanceof MyCustomView) { + // ... + } +} +``` + +## Vault + +### Prefer the Editor API instead of `Vault.modify` + +If you want to edit an active note, use the [[Editor]] interface instead of [[Vault/modify|Vault.modify()]]. + +Editor maintains information about the active note, such as cursor position, selection, and folded content. When you use [[Vault/modify|Vault.modify()]] to edit the note, all that information is lost, which leads to a poor experience for the user. + +Editor is also more efficient when making small changes to parts of the note. + +Only use [[Vault/modify|Vault.modify()]] if you're editing a file in the background. + +### Prefer the Vault API over the Adapter API + +Obsidian exposes two APIs for file operations: the Vault API (`app.vault`) and the Adapter API (`app.vault.adapter`). + +While the file operations in the Adapter API are often more familiar to many developers, the Vault API has two main advantages over the adapter. + +- **Performance:** The Vault API has a caching layer that can speed up file reads when the file is already known to Obsidian. +- **Safety:** The Vault API performs file operations serially to avoid any race conditions, for example when reading a file that is being written to at the same time. + +### Avoid iterating all files to find a file by its path + +This is inefficient, especially for large vaults. Use [[Vault/getAbstractFileByPath|getAbstractFileByPath()]] instead. + +**Don't** do this: + +```ts +vault.getAllFiles().find(file => file.path === filePath) +``` + +Do this instead: + +```ts +const filePath = 'folder/file.md'; + +const file = app.vault.getAbstractFileByPath(filePath); + +// Check if it exists and is of the correct type +if (file instanceof TFile) { + // file is automatically casted to TFile within this scope. +} +``` + +### Use `normalizePath()` to clean up user-defined paths + +Use [[normalizePath|normalizePath()]] whenever you accept user-defined paths to files or folders in the vault, or when you construct your own paths in the plugin code. + +`normalizePath()` takes a path and scrubs it to be safe for the file system and for cross-platform use. This function: + +- Cleans up the use of forward and backward slashes, such as replacing 1 or more of `\` or `/` with a single `/`. +- Removes leading and trailing forward and backward slashes. +- Replaces any non-breaking spaces, `\u00A0`, with a regular space. +- Runs the path through [String.prototype.normalize](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize). + +```ts +import { normalizePath } from "obsidian"; +const pathToPlugin = normalizePath(app.vault.configDir + "//plugins/my-plugin"); +// pathToPlugin contains ".obsidian/plugins/my-plugin" not .obsidian//plugins/my-plugin +``` + +## Editor + +### Change or reconfigure editor extensions + +If you want to change or reconfigure an [[Editor extensions|editor extension]] after you've registered using [[registerEditorExtension|registerEditorExtension()]], use [[updateOptions|updateOptions()]] to update all editors. + +```ts +class MyPlugin extends Plugin { + private editorExtension: Extension[] = []; + + onload() { + //... + + this.registerEditorExtension(this.editorExtension); + } + + updateEditorExtension() { + // Empty the array while keeping the same reference + // (Don't create a new array here) + this.editorExtension.length = 0; + + // Create new editor extension + let myNewExtension = this.createEditorExtension(); + // Add it to the array + this.editorExtension.push(myNewExtension); + + // Flush the changes to all editors + this.app.workspace.updateOptions(); + } +} + +``` + +## TypeScript + +### Prefer `const` and `let` over `var` + +For more information, refer to [4 Reasons Why var is Considered Obsolete in Modern JavaScript](https://javascript.plainenglish.io/4-reasons-why-var-is-considered-obsolete-in-modern-javascript-a30296b5f08f). + +### Prefer async/await over Promise + +Recent versions of JavaScript and TypeScript support the `async` and `await` keywords to run code asynchronously, which allow for more readable code than using Promises. + +**Don't** do this: + +```ts +function test(): Promise { + return requestUrl('https://example.com') + .then(res => res.text + .catch(e => { + console.log(e); + return null; + }); +} +``` + +Do this instead: + +```ts +async function AsyncTest(): Promise { + try { + let res = await requestUrl('https://example.com'); + let text = await r.text; + return text; + } + catch (e) { + console.log(e); + return null; + } +} +``` + +### Consider organizing your code base using folders + +If your plugin uses more than one `.ts` file, consider organizing them into folders to make it easier to review and maintain. + +### Rename placeholder class names + +The sample plugin contains placeholder names for common classes, such as `MyPlugin`, `MyPluginSettings`, and `SampleSettingTab`. Rename these to reflect the name of your plugin. diff --git a/docs/obsidian-developer/Plugins/Releasing/Release your plugin with GitHub Actions.md b/docs/obsidian-developer/Plugins/Releasing/Release your plugin with GitHub Actions.md new file mode 100644 index 0000000000000000000000000000000000000000..678bbc2fe31274b34236954f23c9441bef9db9db --- /dev/null +++ b/docs/obsidian-developer/Plugins/Releasing/Release your plugin with GitHub Actions.md @@ -0,0 +1,71 @@ +Manually releasing your plugin can be time-consuming and error-prone. In this guide, you'll configure your plugin to use [GitHub Actions](https://github.com/features/actions) to automatically create a release when you create a new tag. + +1. In the root directory of your plugin, create a file called `release.yml` under `.github/workflows` with the following content: + + ```yml + name: Release Obsidian plugin + + on: + push: + tags: + - "*" + + jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: "18.x" + + - name: Build plugin + run: | + npm install + npm run build + + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + tag="${GITHUB_REF#refs/tags/}" + + gh release create "$tag" \ + --title="$tag" \ + --draft \ + main.js manifest.json styles.css + ``` + +2. In your terminal, commit the workflow. + + ```bash + git add .github/workflows/release.yml + git commit -m "Add release workflow" + git push origin main + ``` + +3. Create a tag that matches the version in the `manifest.json` file. + + ```bash + git tag -a 1.0.1 -m "1.0.1" + git push origin 1.0.1 + ``` + + - `-a` creates an [annotated tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging#_creating_tags). + - `-m` specifies the name of your release. For Obsidian plugins, this must be the same as the version. + +4. Browse to your repository on GitHub and select the **Actions** tab. Your workflow might still be running, or it might have finished already. + +5. When the workflow finishes, go back to the main page for your repository and select **Releases** in the sidebar on the right side. The workflow has created a draft GitHub release and uploaded the required assets as binary attachments. + +6. Select **Edit** (pencil icon) on the right side of the release name. + +7. Add release notes to let users know what happened in this release, and then select **Publish release**. + +You've successfully set up your plugin to automatically create a GitHub release whenever you create a new tag. + +- If this is the first release for this plugin, you're now ready to [[Submit your plugin]]. +- If this is an update to an already published plugin, your users can now update to the latest version. diff --git a/docs/obsidian-developer/Plugins/Releasing/Submission requirements for plugins.md b/docs/obsidian-developer/Plugins/Releasing/Submission requirements for plugins.md new file mode 100644 index 0000000000000000000000000000000000000000..c6e8368a80cd1b8ed6fcd1daca222eef11d308a8 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Releasing/Submission requirements for plugins.md @@ -0,0 +1,43 @@ +This page lists extends the [[Developer policies]] with plugin-specific requirements that all plugins must follow to be published. + +## Only use `fundingUrl` to link to services for financial support + +Use [[Manifest#fundingUrl|fundingUrl]] if you accept financial support for your plugin, using services like Buy Me A Coffee or GitHub Sponsors. + +If you don't accept donations, remove `fundingUrl` from your manifest. + +## Keep plugin descriptions short and simple + +Good plugin descriptions help users understand your plugin quickly and succinctly. Good descriptions often start with an action statement such as: + +- "Translate selected text into..." +- "Generate notes automatically from..." +- "Import notes from..." +- "Sync highlights and annotations from..." +- "Open links in..." + +Avoid starting your description with "This is a plugin", because it'll be obvious to users in the context of the Community Plugins directory. + +Your description should: + +- Follow the [Obsidian style guide](https://help.obsidian.md/Contributing+to+Obsidian/Style+guide). +- Have 250 characters maximum. +- End with a period `.`. +- Avoid using emoji or special characters. +- Use correct capitalization for acronyms, proper nouns and trademarks such as "Obsidian", "Markdown", "PDF". If you are not sure how to capitalize a term, refer to its website or Wikipedia description. + +## Node.js and Electron APIs are only allowed on desktop + +The Node.js and Electron APIs are only available in the desktop version of Obsidian. For example, Node.js packages like `fs`, `crypto`, and `os`, are only available on desktop. + +If your plugin uses any of these APIs, you **must** set `isDesktopOnly` to `true` in the `manifest.json`. + +> [!tip] +> Many Node.js features have Web API alternatives: +> +> - [`SubtleCrypto`](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) instead of [`crypto`](https://nodejs.org/api/crypto.html). +> - `navigator.clipboard.readText()` and `navigator.clipboard.writeText()` to access clipboard contents. + +## Don't include the plugin ID in the command ID + +Obsidian automatically prefixes command IDs with your plugin ID. You don't need to include the plugin ID yourself. diff --git a/docs/obsidian-developer/Plugins/Releasing/Submit your plugin.md b/docs/obsidian-developer/Plugins/Releasing/Submit your plugin.md new file mode 100644 index 0000000000000000000000000000000000000000..6e07bdc9f179ac645258795434444e7a02238c9e --- /dev/null +++ b/docs/obsidian-developer/Plugins/Releasing/Submit your plugin.md @@ -0,0 +1,96 @@ +If you want to share your plugin with the Obsidian community, the best way is to submit it to the [official list of plugins](https://github.com/obsidianmd/obsidian-releases/blob/master/community-plugins.json). Once we've reviewed and published your plugin, users can install it directly from within Obsidian. It'll also be featured in the [plugin directory](https://obsidian.md/plugins) on the Obsidian website. + +You only need to submit the initial version of your plugin. After your plugin has been published, users can download new releases from GitHub directly from within Obsidian. + +## Prerequisites + +To complete this guide, you'll need: + +- A [GitHub](https://github.com/signup) account. + +## Before you begin + +Before you submit your plugin, make sure you have the following files in the root folder of your repository: + +- A `README.md` that describes the purpose of the plugin, and how to use it. +- A `LICENSE` that determines how others are allowed to use the plugin and its source code. If you need help to [add a license](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository) for your plugin, refer to [Choose a License](https://choosealicense.com/). +- A `manifest.json` that describes your plugin. For more information, refer to [[Manifest]]. + +## Step 1: Publish your plugin to GitHub + +> [!note] Template repositories +> If you created your plugin from one of our template repositories, you may skip this step. + +To review your plugin, we need to access to the source code on GitHub. If you're unfamiliar with GitHub, refer to the GitHub docs for how to [Create a new repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository). + +## Step 2: Create a release + +In this step, you'll prepare a release for your plugin that's ready to be submitted. + +1. In `manifest.json`, update `version` to a new version that follows the [Semantic Versioning](https://semver.org/) specification, for example `1.0.0` for your initial release. You can only use numbers and periods (`.`). +2. [Create a GitHub release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release). The "Tag version" of the release must match the version in your `manifest.json`. +3. Enter a name for the release, and describe it in the description field. Obsidian doesn't use the release name for anything, so feel free to name it however you like. +4. Upload the following plugin assets to the release as binary attachments: + + - `main.js` + - `manifest.json` + - `styles.css` (optional) + +## Step 3: Submit your plugin for review + +In this step, you'll submit your plugin to the Obsidian team for review. + +1. In [community-plugins.json](https://github.com/obsidianmd/obsidian-releases/edit/master/community-plugins.json), add a new entry at the end of the JSON array. + + ```json + { + "id": "doggo-dictation", + "name": "Doggo Dictation", + "author": "John Dolittle", + "description": "Transcribes dog speech into notes.", + "repo": "drdolittle/doggo-dictation" + } + ``` + + - `id`, `name`, `author`, and `description` determines how your plugin appears to the user, and should match the corresponding properties in your [[Manifest]]. + - `id` is unique to your plugin. Search `community-plugins.json` to confirm that there's no existing plugin with the same id. The `id` can't contain `obsidian`. + - `repo` is the path to your GitHub repository. For example, if your GitHub repo is located at https://github.com/your-username/your-repo-name, the path is `your-username/your-repo-name`. + + Remember to add a comma after the closing brace, `}`, of the previous entry. + +2. Select **Commit changes...** in the upper-right corner. +3. Select **Propose changes**. +4. Select **Create pull request**. +5. Select **Preview**, and then select **Community Plugin**. +6. Click **Create pull request**. +7. In the name of the pull request, enter "Add [...] plugin", where [...] is the name of your plugin. +8. Fill in the details in the description for the pull request. For the checkboxes, insert an `x` between the brackets, `[x]`, to mark them as done. +9. Click **Create pull request** (for the last time 🤞). + +You've now submitted your plugin to the Obsidian plugin directory. Sit back and wait for an initial validation by our friendly bot. It may take a few minutes before the results are ready. + +- If you see a **Ready to review** label on your PR, your submission has passed the automatic validation. +- If you see a **Validation failed** label on your PR, you need to address all listed issues until the bot assigns a **Ready to review** label. + +Once your submission is ready to review, you can sit back and wait for the Obsidian team to review it. + +> [!question] How long does it take to review my plugin? +> The time it takes to review your submission depends on the current workload of the Obsidian team. The team is still small, so please be patient while you wait for your plugin to be reviewed. We're currently unable to give any estimates on when we'll be able to review your submission. + +## Step 4: Address review comments + +Once a reviewer has reviewed your plugin, they'll add a comment to your pull request with the result of the review. The reviewer may require that you update your plugin, or they can offer suggestions on how you can improve it. + +Address any required changes and update the GitHub release with the new changes. Leave a comment on the PR to let us know you've addressed the feedback. Don't open a new PR. + +We'll publish the plugin as soon we've verified that all required changes have been addressed. + +> [!note] +> While only Obsidian team members can publish your plugin, other community members may also offer to review your submission in the meantime. + +## Next steps + +Once we've reviewed and published your plugin, it's time to announce it to the community: + +- Announce in [Share & showcase](https://forum.obsidian.md/c/share-showcase/9) in the forums. +- Announce in the `#updates` channel on [Discord](https://discord.gg/veuWUTm). You need the [`developer` role](https://discord.com/channels/686053708261228577/702717892533157999/830492034807758859) to post in `#updates`. diff --git a/docs/obsidian-developer/Plugins/User interface/About user interface.md b/docs/obsidian-developer/Plugins/User interface/About user interface.md new file mode 100644 index 0000000000000000000000000000000000000000..3da2870651628b6f3355fa8df0f89e8f556e56c9 --- /dev/null +++ b/docs/obsidian-developer/Plugins/User interface/About user interface.md @@ -0,0 +1,11 @@ +This page gives you an overview of how to add or change the Obsidian user interface. + +You can see some of the user interface components when you first open Obsidian. + +- [[Ribbon actions]] +- [[Views]] +- [[Plugins/User interface/Status bar|Status bar]] + +To modify the editor, refer to [[Editor]] and [[Editor extensions]]. + +![User interface](user-interface.png) diff --git a/docs/obsidian-developer/Plugins/User interface/Commands.md b/docs/obsidian-developer/Plugins/User interface/Commands.md new file mode 100644 index 0000000000000000000000000000000000000000..ea888cd715dc48c5d9489c47860640e55b3cc899 --- /dev/null +++ b/docs/obsidian-developer/Plugins/User interface/Commands.md @@ -0,0 +1,121 @@ +Commands are actions that the user can perform from the [Command Palette](https://help.obsidian.md/Plugins/Command+palette) or by using a hot key. + +![[command.png]] + +To register a new command for your plugin, call the [[addCommand|addCommand()]] method inside the `onload()` method: + +```ts +import { Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.addCommand({ + id: "print-greeting-to-console", + name: "Print greeting to console", + callback: () => { + console.log("Hey, you!"); + }, + }); + } +} +``` + +## Conditional commands + +If your command is only able to run under certain conditions, then consider using [[checkCallback|checkCallback()]] instead. + +The `checkCallback` runs twice. First, to perform a preliminary check to determine whether the command can run. Second, to perform the action. + +Since time may pass between the two runs, you need to perform the check during both calls. + +To determine whether the callback should perform a preliminary check or an action, a `checking` argument is passed to the callback. + +- If `checking` is set to `true`, perform a preliminary check. +- If `checking` is set to `false`, perform an action. + +The command in the following example depends on a required value. In both runs, the callback checks that the value is present but only performs the action if `checking` is `false`. + +```ts +this.addCommand({ + id: 'example-command', + name: 'Example command', + // highlight-next-line + checkCallback: (checking: boolean) => { + const value = getRequiredValue(); + + if (value) { + if (!checking) { + doCommand(value); + } + + return true + } + + return false; + }, +}); +``` + +## Editor commands + +If your command needs access to the editor, you can also use the [[editorCallback|editorCallback()]], which provides the active editor and its view as arguments. + +```ts +this.addCommand({ + id: 'example-command', + name: 'Example command', + editorCallback: (editor: Editor, view: MarkdownView) => { + const sel = editor.getSelection() + + console.log(`You have selected: ${sel}`); + }, +} +``` + +> [!note] +> Editor commands only appear in the Command Palette when there's an active editor available. + +If the editor callback can only run given under certain conditions, consider using the [[editorCheckCallback|editorCheckCallback()]] instead. For more information, refer to [[#Conditional commands]]. + +```ts +this.addCommand({ + id: 'example-command', + name: 'Example command', + editorCheckCallback: (checking: boolean, editor: Editor, view: MarkdownView) => { + const value = getRequiredValue(); + + if (value) { + if (!checking) { + doCommand(value); + } + + return true + } + + return false; + }, +}); +``` + +## Hot keys + +The user can run commands using a keyboard shortcut, or _hot key_. While they can configure this themselves, you can also provide a default hot key. + +> [!warning] +> Avoid setting default hot keys for plugins that you intend for others to use. Hot keys are highly likely to conflict with those defined by other plugins or by the user themselves. + +In this example, the user can run the command by pressing and holding Ctrl (or Cmd on Mac) and Shift together, and then pressing the letter `a` on their keyboard. + +```ts +this.addCommand({ + id: 'example-command', + name: 'Example command', + hotkeys: [{ modifiers: ["Mod", "Shift"], key: "a" }], + callback: () => { + console.log('Hey, you!'); + }, +}); +``` + +> [!note] +> The Mod key is a special modifier key that becomes Ctrl on Windows and Linux, and Cmd on macOS. diff --git a/docs/obsidian-developer/Plugins/User interface/Context menus.md b/docs/obsidian-developer/Plugins/User interface/Context menus.md new file mode 100644 index 0000000000000000000000000000000000000000..92ee6363572818ef96c2af11874fb311369a23be --- /dev/null +++ b/docs/obsidian-developer/Plugins/User interface/Context menus.md @@ -0,0 +1,80 @@ +If you want to open up a context menu, use [[Menu|Menu]]: + +```ts +import { Menu, Notice, Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.addRibbonIcon("dice", "Open menu", (event) => { + const menu = new Menu(); + + menu.addItem((item) => + item + .setTitle("Copy") + .setIcon("documents") + .onClick(() => { + new Notice("Copied"); + }) + ); + + menu.addItem((item) => + item + .setTitle("Paste") + .setIcon("paste") + .onClick(() => { + new Notice("Pasted"); + }) + ); + + menu.showAtMouseEvent(event); + }); + } +} +``` + +[[showAtMouseEvent|showAtMouseEvent()]] opens the menu where you clicked with the mouse. + +> [!tip] +> If you need more control of where the menu appears, you can use `menu.showAtPosition({ x: 20, y: 20 })` to open the menu at a position relative to the top-left corner of the Obsidian window. + +For more information on what icons you can use, refer to [[Plugins/User interface/Icons|Icons]]. + +You can also add an item to the file menu, or the editor menu, by subscribing to the `file-menu` and `editor-menu` workspace events: + +![[context-menu-positions.png]] + +```ts +import { Notice, Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.registerEvent( + this.app.workspace.on("file-menu", (menu, file) => { + menu.addItem((item) => { + item + .setTitle("Print file path 👈") + .setIcon("document") + .onClick(async () => { + new Notice(file.path); + }); + }); + }) + ); + + this.registerEvent( + this.app.workspace.on("editor-menu", (menu, editor, view) => { + menu.addItem((item) => { + item + .setTitle("Print file path 👈") + .setIcon("document") + .onClick(async () => { + new Notice(view.file.path); + }); + }); + }) + ); + } +} +``` + +For more information on handling events, refer to [[Events]]. diff --git a/docs/obsidian-developer/Plugins/User interface/HTML elements.md b/docs/obsidian-developer/Plugins/User interface/HTML elements.md new file mode 100644 index 0000000000000000000000000000000000000000..e3ea97058fb923b11a6a5593b648b0542561953c --- /dev/null +++ b/docs/obsidian-developer/Plugins/User interface/HTML elements.md @@ -0,0 +1,83 @@ +Several components in the Obsidian API, such as the [[Settings]], expose _container elements_: + +```ts +import { App, PluginSettingTab } from "obsidian"; + +class ExampleSettingTab extends PluginSettingTab { + plugin: ExamplePlugin; + + constructor(app: App, plugin: ExamplePlugin) { + super(app, plugin); + this.plugin = plugin; + } + + display(): void { + // highlight-next-line + let { containerEl } = this; + + // ... + } +} +``` + +Container elements are `HTMLElement` objects that make it possible to create custom interfaces within Obsidian. + +## Create HTML elements using `createEl()` + +Every `HTMLElement`, including the container element, exposes a `createEl()` method that creates an `HTMLElement` under the original element. + +For example, here's how you can add an `

` heading element inside the container element: + +```ts +containerEl.createEl("h1", { text: "Heading 1" }); +``` + +`createEl()` returns a reference to the new element: + +```ts +const book = containerEl.createEl("div"); +book.createEl("div", { text: "How to Take Smart Notes" }); +book.createEl("small", { text: "Sönke Ahrens" }); +``` + +## Style your elements + +You can add custom CSS styles to your plugin by adding a `styles.css` file in the plugin root directory. To add some styles for the previous book example: + +```css title="styles.css" +.book { + border: 1px solid var(--background-modifier-border); + padding: 10px; +} + +.book__title { + font-weight: 600; +} + +.book__author { + color: var(--text-muted); +} +``` + +> [!tip] +> `--background-modifier-border` and `--text-muted` are [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) that are defined and used by Obsidian itself. If you use these variables for your styles, your plugin will look great even if the user has a different theme! 🌈 + +To make the HTML elements use the styles, set the `cls` property for the HTML element: + +```ts +const book = containerEl.createEl("div", { cls: "book" }); +book.createEl("div", { text: "How to Take Smart Notes", cls: "book__title" }); +book.createEl("small", { text: "Sönke Ahrens", cls: "book__author" }); +``` + +Now it looks much better! 🎉 + +![[styles.png]] + +### Conditional styles + +Use the `toggleClass` method if you want to change the style of an element based on the user's settings or other values: + +```ts +element.toggleClass("danger", status === "error"); +``` diff --git a/docs/obsidian-developer/Plugins/User interface/Icons.md b/docs/obsidian-developer/Plugins/User interface/Icons.md new file mode 100644 index 0000000000000000000000000000000000000000..9630238bc7c139ec85916397fc9f6e5c1f58ccba --- /dev/null +++ b/docs/obsidian-developer/Plugins/User interface/Icons.md @@ -0,0 +1,72 @@ +Several of the UI components in the Obsidian API lets you configure an accompanying icon. You can choose from one of the built-in icons, or you can add your own. + +## Browse available icons + +Browse to [lucide.dev](https://lucide.dev/) to see all available icons and their corresponding names. + +**Please note:** Only icons up to v0.171.0 are supported at this time. + +## Use icons + +If you'd like to use icons in your custom interfaces, use the [[setIcon|setIcon()]] utility function to add an icon to an [[HTML elements|HTML element]]. The following example adds icon to the status bar: + +```ts +import { Plugin, setIcon } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + const item = this.addStatusBarItem(); + setIcon(item, "info"); + } +} +``` + +To change the size of the icon, set the `--icon-size` [[Reference/CSS variables/Foundations/Icons|CSS variable]] on the element containing the icon using preset sizes: + +```css +div { + --icon-size: var(--icon-size-m); +} +``` + +## Add your own icon + +To add a custom icon for your plugin, use the [[addIcon|addIcon()]] utility: + +```ts +import { addIcon, Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + addIcon("circle", ``); + + this.addRibbonIcon("circle", "Click me", () => { + console.log("Hello, you!"); + }); + } +} +``` + +`addIcon` takes two arguments: + +1. A name to uniquely identify your icon. +2. The SVG content for the icon, without the surrounding `` tag. + +Note that your icon needs to fit within a `0 0 100 100` view box to be drawn properly. + +After the call to `addIcon`, you can use the icon just like any of the built-in icons. + +### Icon design guidelines + +For compatibility and cohesiveness with the Obsidian interface, your icons should [follow Lucide’s guidelines](https://lucide.dev/guide/design/icon-design-guide): + +- Icons must be designed on a 24 by 24 pixels canvas +- Icons must have at least 1 pixel padding within the canvas +- Icons must have a stroke width of 2 pixels +- Icons must use round joins +- Icons must use round caps +- Icons must use centered strokes +- Shapes (such as rectangles) in icons must have border radius of 2 pixels +- Distinct elements must have 2 pixels of spacing between each other + +Lucide also [provides templates and guides](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md) for vector editors such as Illustrator, Figma, and Inkscape. diff --git a/docs/obsidian-developer/Plugins/User interface/Modals.md b/docs/obsidian-developer/Plugins/User interface/Modals.md new file mode 100644 index 0000000000000000000000000000000000000000..8dae9a6b7cc8d2718c8d987db5b89ded012eef1e --- /dev/null +++ b/docs/obsidian-developer/Plugins/User interface/Modals.md @@ -0,0 +1,169 @@ +Modals display information and accept input from the user. To create a modal, create a class that extends [[Reference/TypeScript API/Modal/Modal|Modal]]: + +```ts +import { App, Modal } from "obsidian"; + +export class ExampleModal extends Modal { + constructor(app: App) { + super(app); + } + + onOpen() { + let { contentEl } = this; + contentEl.setText("Look at me, I'm a modal! 👀"); + } + + onClose() { + let { contentEl } = this; + contentEl.empty(); + } +} +``` + +- [[Reference/TypeScript API/View/onOpen|onOpen()]] is called when the modal is opened and is responsible for building the content of your modal. For more information, refer to [HTML elements](HTML%20elements.md). +- [[Reference/TypeScript API/Modal/onClose|onClose()]] is called when the modal is closed and is responsible for cleaning up any resources used by the modal. + +To open a modal, create a new instance of `ExampleModal` and call [[Reference/TypeScript API/Modal/open|open()]] on it: + +```ts +import { Plugin } from "obsidian"; +import { ExampleModal } from "./modal"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.addCommand({ + id: "display-modal", + name: "Display modal", + callback: () => { + new ExampleModal(this.app).open(); + }, + }); + } +} +``` + +## Accept user input + +The modal in the previous example only displayed some text. Let's look at a little more complex example that handles input from the user. + +![[modal-input.png]] + +```ts +import { App, Modal, Setting } from "obsidian"; + +export class ExampleModal extends Modal { + result: string; + onSubmit: (result: string) => void; + + constructor(app: App, onSubmit: (result: string) => void) { + super(app); + this.onSubmit = onSubmit; + } + + onOpen() { + const { contentEl } = this; + + contentEl.createEl("h1", { text: "What's your name?" }); + + new Setting(contentEl) + .setName("Name") + .addText((text) => + text.onChange((value) => { + this.result = value + })); + + new Setting(contentEl) + .addButton((btn) => + btn + .setButtonText("Submit") + .setCta() + .onClick(() => { + this.close(); + this.onSubmit(this.result); + })); + } + + onClose() { + let { contentEl } = this; + contentEl.empty(); + } +} +``` + +The result is stored in `this.result` and returned in the `onSubmit` callback when the user clicks **Submit**: + +```ts +new ExampleModal(this.app, (result) => { + new Notice(`Hello, ${result}!`); +}).open(); +``` + +## Select from list of suggestions + +[[SuggestModal|SuggestModal]] is a special modal that lets you display a list of suggestions to the user. + +![[suggest-modal.gif]] + +```ts +import { App, Notice, SuggestModal } from "obsidian"; + +interface Book { + title: string; + author: string; +} + +const ALL_BOOKS = [ + { + title: "How to Take Smart Notes", + author: "Sönke Ahrens", + }, + { + title: "Thinking, Fast and Slow", + author: "Daniel Kahneman", + }, + { + title: "Deep Work", + author: "Cal Newport", + }, +]; + +export class ExampleModal extends SuggestModal { + // Returns all available suggestions. + getSuggestions(query: string): Book[] { + return ALL_BOOKS.filter((book) => + book.title.toLowerCase().includes(query.toLowerCase()) + ); + } + + // Renders each suggestion item. + renderSuggestion(book: Book, el: HTMLElement) { + el.createEl("div", { text: book.title }); + el.createEl("small", { text: book.author }); + } + + // Perform action on the selected suggestion. + onChooseSuggestion(book: Book, evt: MouseEvent | KeyboardEvent) { + new Notice(`Selected ${book.title}`); + } +} +``` + +In addition to `SuggestModal`, the Obsidian API provides an even more specialized type of modal for suggestions: the [[FuzzySuggestModal|FuzzySuggestModal]]. While it doesn't give you the same control of how each item is rendered, you get [fuzzy string search](https://en.wikipedia.org/wiki/Approximate_string_matching) out-of-the-box. + +![[fuzzy-suggestion-modal.png]] + +```ts +export class ExampleModal extends FuzzySuggestModal { + getItems(): Book[] { + return ALL_BOOKS; + } + + getItemText(book: Book): string { + return book.title; + } + + onChooseItem(book: Book, evt: MouseEvent | KeyboardEvent) { + new Notice(`Selected ${book.title}`); + } +} +``` diff --git a/docs/obsidian-developer/Plugins/User interface/Ribbon actions.md b/docs/obsidian-developer/Plugins/User interface/Ribbon actions.md new file mode 100644 index 0000000000000000000000000000000000000000..09d3746ed24fb8e6fd9f6950100e0f1e931012e9 --- /dev/null +++ b/docs/obsidian-developer/Plugins/User interface/Ribbon actions.md @@ -0,0 +1,17 @@ +The sidebar on the left side of the Obsidian interface is mainly known as the _ribbon_. In addition to system operations, such as opening the preferences or another vault, the ribbon can also host actions defined by plugins. + +To add a action to the ribbon, use the [[addRibbonIcon|addRibbonIcon()]] method: + +```ts +import { Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.addRibbonIcon("dice", "Print to console", () => { + console.log("Hello, you!"); + }); + } +} +``` + +The first argument specifies which icon to use. For more information on the available icons, and how to add your own, refer to [[Plugins/User interface/Icons|Icons]]. diff --git a/docs/obsidian-developer/Plugins/User interface/Settings.md b/docs/obsidian-developer/Plugins/User interface/Settings.md new file mode 100644 index 0000000000000000000000000000000000000000..4f9d78801b6eeba7abf0e183f492f23d7269f705 --- /dev/null +++ b/docs/obsidian-developer/Plugins/User interface/Settings.md @@ -0,0 +1,167 @@ +If you want users to be able to configure parts of your plugin themselves, you can expose them as _settings_. + +In this guide, you'll learn how to create a settings page like this 👇 + +![[settings.png]] + +The main reason to add settings to a plugin is to store configuration that persists even after the user quits Obsidian. The following example demonstrates how to save and load settings from disk: + +```ts +import { Plugin } from "obsidian"; +import { ExampleSettingTab } from "./settings"; + +interface ExamplePluginSettings { + dateFormat: string; +} + +const DEFAULT_SETTINGS: Partial = { + dateFormat: "YYYY-MM-DD", +}; + +export default class ExamplePlugin extends Plugin { + settings: ExamplePluginSettings; + + async onload() { + await this.loadSettings(); + + this.addSettingTab(new ExampleSettingTab(this.app, this)); + } + + async loadSettings() { + this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); + } + + async saveSettings() { + await this.saveData(this.settings); + } +} +``` + +> [!warning] Nested properties in settings +> `Object.assign()` copies the references to any nested properties (shallow copy). If your settings object contains nested properties, you need to copy each nested property recursively (deep copy). Otherwise, any changes to a nested property will apply do all objects that were copied using `Object.assign()`. + +There's a lot going on here 🤯, so let's look closer at each part. + +## Create a settings definition + +First, you need to create a definition, `ExamplePluginSettings`, for what settings you want the user to be able to configure. While the plugin is enabled, you can access the settings from the `settings` member variable. + +```ts +interface ExamplePluginSettings { + dateFormat: string; +} + +export default class ExamplePlugin extends Plugin { + settings: ExamplePluginSettings; + + // ... +} +``` + +## Save and load the settings object + +[[loadData|loadData()]] and [[saveData|saveData()]] provide an easy way to store and retrieve data from disk. The example also introduces two helper methods that makes it easier to use `loadData()` and `saveData()` from other parts of the plugin. + +```ts +export default class ExamplePlugin extends Plugin { + + // ... + + async loadSettings() { + this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); + } + + async saveSettings() { + await this.saveData(this.settings); + } +} +``` + +Finally, make sure to load the settings when the plugin loads: + +```ts +async onload() { + await this.loadSettings(); + + // ... +} +``` + +## Provide default values + +When the user enables the plugin for the first time, none of the settings have been configured yet. The preceding example provides default values for any missing settings. + +To understand how this work, let's look at the following code: + +```ts +Object.assign({}, DEFAULT_SETTINGS, await this.loadData()) +``` + +`Object.assign()` is a JavaScript function that copies all properties from one object to another. Any properties that are returned by `loadData()` override the properties in `DEFAULT_SETTINGS`. + +```ts +const DEFAULT_SETTINGS: Partial = { + dateFormat: "YYYY-MM-DD", +}; +``` + +> [!tip] +> `Partial` is a TypeScript utility that returns a type with all properties of `Type` set to optional. It enables type checking while letting you only define the properties you want to provide defaults for. + +## Register a settings tab + +The plugin can now save and load plugin configuration, but the user doesn't yet have any way of changing any of the settings. By adding a settings tab you can provide an easy-to-use interface for the user to update their plugin settings: + +```ts +this.addSettingTab(new ExampleSettingTab(this.app, this)); +``` + +Here, the `ExampleSettingTab` is a class that extends [[PluginSettingTab|PluginSettingTab]]: + +```ts +import ExamplePlugin from "./main"; +import { App, PluginSettingTab, Setting } from "obsidian"; + +export class ExampleSettingTab extends PluginSettingTab { + plugin: ExamplePlugin; + + constructor(app: App, plugin: ExamplePlugin) { + super(app, plugin); + this.plugin = plugin; + } + + display(): void { + let { containerEl } = this; + + containerEl.empty(); + + new Setting(containerEl) + .setName("Date format") + .setDesc("Default date format") + .addText((text) => + text + .setPlaceholder("MMMM dd, yyyy") + .setValue(this.plugin.settings.dateFormat) + .onChange(async (value) => { + this.plugin.settings.dateFormat = value; + await this.plugin.saveSettings(); + }) + ); + } +} +``` + +`display()` is where you build the content for the settings tab. For more information, refer to [[HTML elements]]. + +`new Setting(containerEl)` appends a setting to the container element. This example uses a text field using `addText()`, but there are several other setting types available. + +Update the settings object whenever the value of the text field changes, and then save it to disk: + +```ts +.onChange(async (value) => { + this.plugin.settings.dateFormat = value; + await this.plugin.saveSettings(); +}) +``` + +Nice work! 💪 Your users will thank you for giving them a way to customize how they interact with your plugin. Before heading to the next guide, experiment with what you've learned by adding another setting. diff --git a/docs/obsidian-developer/Plugins/User interface/Status bar.md b/docs/obsidian-developer/Plugins/User interface/Status bar.md new file mode 100644 index 0000000000000000000000000000000000000000..60f40e9536f69f68fe3c8cf0c25c763e843c0d33 --- /dev/null +++ b/docs/obsidian-developer/Plugins/User interface/Status bar.md @@ -0,0 +1,40 @@ +To create a new block in the status bar, call the [[addStatusBarItem|addStatusBarItem()]] in the `onload()` method. The `addStatusBarItem()` method returns an [[HTML elements]] that you can add your own elements to. + +> [!caution] Obsidian mobile +> Custom status bar items [are **not** supported](https://discord.com/channels/686053708261228577/707816848615407697/832321402106544179) on Obsidian mobile apps. + +```ts +import { Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + const item = this.addStatusBarItem(); + item.createEl("span", { text: "Hello from the status bar 👋" }); + } +} +``` + +> [!note] +> For more information on how to use the `createEl()` method, refer to [[HTML elements]]. + +You can add multiple status bar items by calling `addStatusBarItem()` multiple times. Since Obsidian adds a gap between them, you need to create multiple HTML element on the same status bar item if you need more control of spacing. + +```ts +import { Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + const fruits = this.addStatusBarItem(); + fruits.createEl("span", { text: "🍎" }); + fruits.createEl("span", { text: "🍌" }); + + const veggies = this.addStatusBarItem(); + veggies.createEl("span", { text: "🥦" }); + veggies.createEl("span", { text: "🥬" }); + } +} +``` + +The example above results in the following status bar: + +![[status-bar.png]] diff --git a/docs/obsidian-developer/Plugins/User interface/Views.md b/docs/obsidian-developer/Plugins/User interface/Views.md new file mode 100644 index 0000000000000000000000000000000000000000..b1e78ca76f184b8f6b1b6584789c12f1cd39e1c9 --- /dev/null +++ b/docs/obsidian-developer/Plugins/User interface/Views.md @@ -0,0 +1,99 @@ +Views determine how Obsidian displays content. The file explorer, graph view, and the Markdown view are all examples of views, but you can also create your own custom views that display content in a way that makes sense for your plugin. + +To create a custom view, create a class that extends the [[ItemView|ItemView]] interface: + +```ts +import { ItemView, WorkspaceLeaf } from "obsidian"; + +export const VIEW_TYPE_EXAMPLE = "example-view"; + +export class ExampleView extends ItemView { + constructor(leaf: WorkspaceLeaf) { + super(leaf); + } + + getViewType() { + return VIEW_TYPE_EXAMPLE; + } + + getDisplayText() { + return "Example view"; + } + + async onOpen() { + const container = this.containerEl.children[1]; + container.empty(); + container.createEl("h4", { text: "Example view" }); + } + + async onClose() { + // Nothing to clean up. + } +} +``` + +> [!note] +> For more information on how to use the `createEl()` method, refer to [[HTML elements]]. + +Each view is uniquely identified by a text string and several operations require that you specify the view you'd like to use. Extracting it to a constant, `VIEW_TYPE_EXAMPLE`, is a good idea—as you will see later in this guide. + +- `getViewType()` returns a unique identifier for the view. +- `getDisplayText()` returns a human-friendly name for the view. +- `onOpen()` is called when the view is opened within a new leaf and is responsible for building the content of your view. +- `onClose()` is called when the view should close and is responsible for cleaning up any resources used by the view. + +Custom views need to be registered when the plugin is enabled, and cleaned up when the plugin is disabled: + +```ts +import { Plugin } from "obsidian"; +import { ExampleView, VIEW_TYPE_EXAMPLE } from "./view"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.registerView( + VIEW_TYPE_EXAMPLE, + (leaf) => new ExampleView(leaf) + ); + + this.addRibbonIcon("dice", "Activate view", () => { + this.activateView(); + }); + } + + async onunload() { + } + + async activateView() { + const { workspace } = this.app; + + let leaf: WorkspaceLeaf | null = null; + const leaves = workspace.getLeavesOfType(VIEW_TYPE_EXAMPLE); + + if (leaves.length > 0) { + // A leaf with our view already exists, use that + leaf = leaves[0]; + } else { + // Our view could not be found in the workspace, create a new leaf + // in the right sidebar for it + leaf = workspace.getRightLeaf(false); + await leaf.setViewState({ type: VIEW_TYPE_EXAMPLE, active: true }); + } + + // "Reveal" the leaf in case it is in a collapsed sidebar + workspace.revealLeaf(leaf); + } +} +``` + +The second argument to [[registerView|registerView()]] is a factory function that returns an instance of the view you want to register. + +> [!warning] +> Never manage references to views in your plugin. Obsidian may call the view factory function multiple times. Avoid side effects in your view, and use `getLeavesOfType()` whenever you need to access your view instances. +> +> ```ts +> this.app.workspace.getLeavesOfType(VIEW_TYPE_EXAMPLE).forEach((leaf) => { +> if (leaf.view instanceof ExampleView) { +> // Access your view instance. +> } +> }); +> ``` diff --git a/docs/obsidian-developer/Plugins/User interface/Workspace.md b/docs/obsidian-developer/Plugins/User interface/Workspace.md new file mode 100644 index 0000000000000000000000000000000000000000..b1560d06d54af5624533da14458b494c3b424e44 --- /dev/null +++ b/docs/obsidian-developer/Plugins/User interface/Workspace.md @@ -0,0 +1,134 @@ +Obsidian lets you configure what content is visible to you at any given time. Hide the file explorer when you don't need it, display multiple documents side by side, or show an outline of your document while you're working on it. The configuration of visible content within your application window is known as the _workspace_. + +The workspace is implemented as a [tree data structure](https://en.wikipedia.org/wiki/Tree_(data_structure)), where each node in the tree is referred to as a [[WorkspaceItem|workspace item]]. There are two types of workspace items: [[WorkspaceParent|parents]] and [[WorkspaceLeaf|leaves]]. The main difference is that parent items can contain _child_ items, including other parent items, whereas leaf items can't contain any workspace items at all. + +There are two types of parent items, [[WorkspaceSplit|splits]] and [[WorkspaceTabs|tabs]], which determine how the children are presented to the user: + +```mermaid +flowchart TD + split{Split} + split --> A((Leaf)) + split --> B((Leaf)) + split --> C((Leaf)) + + tabs{Tabs} + tabs --> X((Leaf)) + tabs --> Y((Leaf)) + tabs --> Z((Leaf)) +``` + +- A split item lays out its child items one after another along a vertical or horizontal direction. +- A tabs item only displays one child item at a time and hides the others. + +The workspace has three special split items under it: _left_, _right_, and _root_. The following diagram shows a example of what a typical workspace could look like: + +```mermaid +flowchart TD + Workspace --> Left{Left split} + Workspace --> Root{Root split} + Workspace --> Right{Right split} + + Left --> leftTabs{Tabs} + leftTabs --> A((Leaf)) + leftTabs --> B((Leaf)) + + Root --> C{Split} + Root --> D((Leaf)) + + C --> E((Leaf)) + C --> F((Leaf)) + + Right --> rightTabs{Tabs} + + rightTabs --> I((Leaf)) + rightTabs --> J((Leaf)) + rightTabs --> K((Leaf)) +``` + +A leaf is a window that can display content in different ways. The type of leaf determines how content is displayed, and correspond to a specific _view_. For example, a leaf of type `graph` displays the [graph view](https://help.obsidian.md/Plugins/Graph+view). + +## Splits + +By default, the direction of the root split is set to vertical. When you create a new leaf to it, Obsidian creates a new column in the user interface. When you split a leaf, the resulting leaves are added to a new split item. While there's no defined limit to the number of levels you can create under the root split, in practice their usefulness diminish for each level. + +```mermaid +flowchart TD + rootBefore{"Root split\n(before)"} + + rootBefore --> leaf1((Leaf)) + rootBefore --> leaf2((Leaf)) + + rootAfter{"Root split\n(after)"} + + rootAfter --> split{Split} + rootAfter --> leaf3((Leaf)) + split --> leaf4((Leaf)) + split --> leaf5((Leaf)) +``` + +The left and right splits work a little differently. When you split a leaf in the side docks, Obsidian generates a new tabs item and adds the new leaf under it. Effectively, this means they can only have three levels of workspace items at any time, and any direct children must be tabs items. + +```mermaid +flowchart TD + split1{"Right split\n(before)"} + tabs1{Tabs} + leaf1((Leaf)) + leaf2((Leaf)) + + split1 --> tabs1 + tabs1 --> leaf1 + tabs1 --> leaf2 + + split2{"Right split\n(after)"} + tabs2{Tabs} + tabs3{Tabs} + leaf3((Leaf)) + leaf4((Leaf)) + leaf5((Leaf)) + + split2 --> tabs2 + tabs2 --> leaf3 + tabs2 --> leaf4 + + split2 --> tabs3 + tabs3 --> leaf5 +``` + +## Inspect the workspace + +You can access the workspace through the [[App|App]] object. The following example prints the type of every leaf in the workspace: + +```ts +import { Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.addRibbonIcon("dice", "Print leaf types", () => { + this.app.workspace.iterateAllLeaves((leaf) => { + console.log(leaf.getViewState().type); + }); + }); + } +} +``` + +## Leaf lifecycle + +Plugins can add leaves of any type to the workspace, as well as define new leaf types through [[Views|custom views]]. Here are a few ways to add a leaf to the workspace. For more ways, refer to [[Reference/TypeScript API/Workspace/Workspace|Workspace]]. + +- If you want to add a new leaf in the root split, use [[getLeaf|getLeaf(true)]]. +- If you want to add a new leaf in any of the side bars, use [[getLeftLeaf|getLeftLeaf()]] and [[getRightLeaf|getRightLeaf()]]. Both let you decide whether to add the leaf to a new split. + +You can also explicitly add the leaf in the split of your choice, using [[createLeafInParent|createLeafInParent()]]. + +Unless explicitly removed, any leaves that a plugin add to the workspace remain even after the plugin is disabled. Plugins are responsible for removing any leaves they add to the workspace. + +To remove a leaf from the workspace, call [[detach|detach()]] on the leaf you want to remove. You can also remove all leaves of a certain type, by using [[detachLeavesOfType|detachLeavesOfType()]]. + +## Leaf groups + +You can create [linked panes](https://help.obsidian.md/User+interface/Workspace/Panes/Linked+pane) by assigning multiple leaves to the same group, using [[setGroup|setGroup()]]. + +```ts +leaves.forEach((leaf) => leaf.setGroup("group1"); +``` diff --git a/docs/obsidian-developer/Plugins/Vault.md b/docs/obsidian-developer/Plugins/Vault.md new file mode 100644 index 0000000000000000000000000000000000000000..75838b736381b297a62df671afb751c3e4f8b6f4 --- /dev/null +++ b/docs/obsidian-developer/Plugins/Vault.md @@ -0,0 +1,112 @@ +Each collection of notes in Obsidian is known as a Vault. A Vault consists of a folder, and any sub-folders within it. + +While your plugin can access the file system like any other Node.js application, the [[Reference/TypeScript API/Vault/Vault|Vault]] module aims to make it easier to work with files and folders within a Vault. + +The following example recursively prints the paths of all Markdown files in a Vault: + +```ts +const files = this.app.vault.getMarkdownFiles() + +for (let i = 0; i < files.length; i++) { + console.log(files[i].path); +} +``` + +> [!tip] +> If you want to list _all_ files, and not just Markdown documents, use [[getFiles|getFiles()]] instead. + +## Read files + +There are two methods for reading the content of a file: [[Reference/TypeScript API/Vault/read|read()]] and [[cachedRead|cachedRead()]]. + +- If you only want to display the content to the user, then use `cachedRead()` to avoid reading the file from disk multiple times. +- If you want to read the content, change it, and then write it back to disk, then use `read()` to avoid potentially overwriting the file with a stale copy. + +> [!info] +> The only difference between `cachedRead()` and `read()` is when the file was modified outside of Obsidian just before the plugin reads it. As soon as the file system notifies Obsidian that the file has changed from the outside, `cachedRead()` behaves _exactly_ like `read()`. Similarly, if you save the file within Obsidian, the read cache is flushed as well. + +The following example reads the content of all Markdown files in the Vault and returns the average document size: + +```ts +import { Notice, Plugin } from "obsidian"; + +export default class ExamplePlugin extends Plugin { + async onload() { + this.addRibbonIcon("info", "Calculate average file length", async () => { + const fileLength = await this.averageFileLength(); + new Notice(`The average file length is ${fileLength} characters.`); + }); + } + + async averageFileLength(): Promise { + const { vault } = this.app; + + const fileContents: string[] = await Promise.all( + vault.getMarkdownFiles().map((file) => vault.cachedRead(file)) + ); + + let totalLength = 0; + fileContents.forEach((content) => { + totalLength += content.length; + }); + + return totalLength / fileContents.length; + } +} +``` + +## Modify files + +To write text content to an existing file, use [[modify|Vault.modify()]]. + +```ts +function writeCurrentDate(vault: Vault, file: TFile): Promise { + return vault.modify(file, `Today is ${new Intl.DateTimeFormat().format(new Date())}.`); +} +``` + +If you want to modify a file based on its current content, use [[process|Vault.process()]] instead. The second argument is a callback that provides the current file content and returns the modified content. + +```ts +// emojify replaces all occurrences of :) with 🙂. +function emojify(vault: Vault, file: TFile): Promise { + return vault.process(file, (data) => { + return data.replace(":)", "🙂"); + }) +} +``` + +`Vault.process()` is an abstraction on top of [[Reference/TypeScript API/Vault/read|Vault.read()]] and [[modify|Vault.modify()]] that guarantees that the file doesn't change between reading the current content and writing the updated content. Always prefer `Vault.process()` over `Vault.read()`/`Vault.modify()` to avoid unintentional loss of data. + +### Asynchronous modifications + +[[process|Vault.process()]] only supports synchronous modifications. If you need to modify a file asynchronously: + +1. Read the file using [[cachedRead|Vault.cachedRead()]]. +2. Perform the async operations. +3. Update the file using [[Reference/TypeScript API/Vault/process|Vault.process()]]. + +Remember to check that the `data` in the `process()` callback is the same as the data returned by `cachedRead()`. If they aren't the same, that means that the file was changed by a different process, and you may want to ask the user for confirmation, or try again. + +## Delete files + +There are two methods to delete a file, [[delete|delete()]], and [[trash|trash()]]. Which one you should use depends on if you want to allow the user to change their mind. + +- `delete()` removes the file without a trace. +- `trash()` moves the file to the trash bin. + +When you use `trash()`, you have the option to move the file to the system's trash bin, or to a local `.trash` folder at the root of the user's Vault. + +## Is it a file or folder? + +Some operations return or accept a [[TAbstractFile|TAbstractFile]] object, which can be either a file or a folder. Always check the concrete type of a `TAbstractFile` before you use it. + +```ts +const folderOrFile = this.app.vault.getAbstractFileByPath("folderOrFile"); + +if (folderOrFile instanceof TFile) { + console.log("It's a file!"); +} else if (folderOrFile instanceof TFolder) { + console.log("It's a folder!"); +} +``` diff --git a/docs/obsidian-developer/Reference/CSS variables/About styling.md b/docs/obsidian-developer/Reference/CSS variables/About styling.md new file mode 100644 index 0000000000000000000000000000000000000000..d97cfe6a1f88fa476f53a2f2120a2ef20f413d30 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/About styling.md @@ -0,0 +1,35 @@ +The Obsidian app uses [Cascading Style Sheets](https://en.wikipedia.org/wiki/CSS) (CSS) to control the design of the user interface. CSS is the same markup language used for websites and web-based apps, which means you can find many resources online to help you learn how to use and edit CSS. + +Obsidian includes hundreds of [[CSS variables]] that enable consistently beautiful user interfaces. + +## For plugins + +By using the built-in CSS variables for you own custom elements, you can create native-looking user interfaces in your plugin that look beautiful and are compatible with community themes. + +**styles.css**: + +```css +.todo-list { + background-color: var(--background-secondary); +} +``` + +## For themes and snippets + +By overriding the default values for the Obsidian CSS variables, you can create beautiful themes without the need for complex CSS selectors. + +**theme.css**: + +```css +.theme-dark { + --background-primary: #18004F; + --background-secondary: #220070; +} + +.theme-light { + --background-primary: #ECE4FF; + --background-secondary: #D9C9FF; +} +``` + +To learn more about how to build a theme using CSS variables, refer to [[Build a theme]]. \ No newline at end of file diff --git a/docs/obsidian-developer/Reference/CSS variables/CSS variables.md b/docs/obsidian-developer/Reference/CSS variables/CSS variables.md new file mode 100644 index 0000000000000000000000000000000000000000..9b0afae3e4270b3b704f8c849110a67f31147071 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/CSS variables.md @@ -0,0 +1,82 @@ +### Foundations + +Abstracted variables for colors, spacing, typography and more + +- [[Borders]] +- [[Colors]] +- [[Cursor]] +- [[Reference/CSS variables/Foundations/Icons|Icons]] +- [[Layers]] +- [[Radiuses]] +- [[Spacing]] +- [[Typography]] + +### Components + +Interactive components used throughout the app + +- [[Button]] +- [[Checkbox]] +- [[Color input]] +- [[Dialog]] +- [[Dragging]] +- [[Indentation guides]] +- [[Modal]] +- [[Multi-select]] +- [[Navigation]] +- [[Popover]] +- [[Slider]] +- [[Tabs]] +- [[Text input]] +- [[Toggle]] + +### Editor + +Content types and variables used for editing and reading text files + +- [[Block]] +- [[Blockquote]] +- [[Callout]] +- [[Code]] +- [[Embed]] +- [[File]] +- [[Footnote]] +- [[Headings]] +- [[Horizontal rule]] +- [[Inline title]] +- [[Link]] +- [[List]] +- [[Properties]] +- [[Table]] +- [[Tag]] + +### Plugins + +Variables related to interface elements in core plugins + +- [[Canvas]] +- [[File explorer]] +- [[Graph]] +- [[Search]] + +### Window + +Variables related to the window chrome for the Obsidian app + +- [[Divider]] +- [[Ribbon]] +- [[Scrollbar]] +- [[Reference/CSS variables/Window/Status bar|Status bar]] +- [[Window frame]] +- [[Reference/CSS variables/Window/Workspace|Workspace]] + +### Obsidian Publish + +Variables for Obsidian Publish sites + +- [[Site fonts]] +- [[Site header]] +- [[Site navigation]] +- [[Site components]] +- [[Site sidebars]] +- [[Site pages]] diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Button.md b/docs/obsidian-developer/Reference/CSS variables/Components/Button.md new file mode 100644 index 0000000000000000000000000000000000000000..35932a506d35b56042042cbdfe0165c0250c9e67 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Button.md @@ -0,0 +1,11 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for buttons. For button colors, refer to [[Colors#Interactive colors|Interactive colors]]. + +## CSS variables + +| Variable | Description | +| ----------------- | ------------- | +| `--button-radius` | Button radius | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Checkbox.md b/docs/obsidian-developer/Reference/CSS variables/Components/Checkbox.md new file mode 100644 index 0000000000000000000000000000000000000000..98b5ecf7da14a051f462545d89de1c46c61f538c --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Checkbox.md @@ -0,0 +1,19 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for checkboxes and text inside of task lists. + +## CSS variables + +| Variable | Description | +| ------------------------------- | ------------------------------------------ | +| `--checkbox-radius` | Checkbox radius | +| `--checkbox-size` | Checkbox height and width | +| `--checkbox-marker-color` | Checkbox marker color for the check itself | +| `--checkbox-color` | Checkbox background color | +| `--checkbox-color-hover` | Checkbox background color (hover) | +| `--checkbox-border-color` | Checkbox unchecked border color | +| `--checkbox-border-color-hover` | Checkbox unchecked border color (hover) | +| `--checklist-done-decoration` | Checkbox checked text decoration | +| `--checklist-done-color` | Checkbox checked text color | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Color input.md b/docs/obsidian-developer/Reference/CSS variables/Components/Color input.md new file mode 100644 index 0000000000000000000000000000000000000000..3ca303d9eda9bf741bbd45b235cdab811ca86b28 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Color input.md @@ -0,0 +1,14 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for color inputs, such as the accent color picker. + +## CSS variables + +| Variable | Description | +| ----------------- | ------------------- | +| `--swatch-radius` | Color swatch radius | +| `--swatch-height` | Color swatch height | +| `--swatch-width` | Color swatch width | +| `--swatch-shadow` | Color swatch shadow | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Dialog.md b/docs/obsidian-developer/Reference/CSS variables/Components/Dialog.md new file mode 100644 index 0000000000000000000000000000000000000000..252454a70af164452ac1c961d1f32fd2a3c0ea6c --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Dialog.md @@ -0,0 +1,13 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for dialogs. A dialog is a smaller modal that's primarily used for confirmation. + +## CSS variables + +| Variable | Description | +| --------------------- | --------------------- | +| `--dialog-width` | Dialog default width | +| `--dialog-max-width` | Dialog maximum width | +| `--dialog-max-height` | Dialog maximum height | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Dragging.md b/docs/obsidian-developer/Reference/CSS variables/Components/Dragging.md new file mode 100644 index 0000000000000000000000000000000000000000..66bc786c1fe34bb5f61c6e87ec96fa8b95bff4f0 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Dragging.md @@ -0,0 +1,12 @@ +--- +cssClasses: reference +--- + +Obsidian displays dragging affordances while the user drag files or tabs. + +## CSS variables + +| Variable | Description | +| ------------------------- | --------------------------- | +| `--drag-ghost-background` | Drag ghost background color | +| `--drag-ghost-text-color` | Drag ghost text color | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Indentation guides.md b/docs/obsidian-developer/Reference/CSS variables/Components/Indentation guides.md new file mode 100644 index 0000000000000000000000000000000000000000..f0d28d3a5366aefe80226897ca75bcd8aa54568b --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Indentation guides.md @@ -0,0 +1,14 @@ +--- +cssClass: reference +--- +This page lists CSS variables for indentation guides. Indentation guides visualize the indentation level in nested lists. + +## CSS variables + +| Variable | Description | +| ---------------------------------- | --------------------------------------- | +| `--indentation-guide-width` | Indentation guide border width | +| `--indentation-guide-width-active` | Indentation guide border width (active) | +| `--indentation-guide-color` | Indentation guide border color | +| `--indentation-guide-color-active` | Indentation guide border color (active) | +| `--indentation-guide-editing-indent` | Width of the indent in edit mode | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Modal.md b/docs/obsidian-developer/Reference/CSS variables/Components/Modal.md new file mode 100644 index 0000000000000000000000000000000000000000..27056d75deb51946053d038259c52650eda0ca0b --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Modal.md @@ -0,0 +1,20 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for modals, such as the settings window and [[Dialog|dialogs]]. + +## CSS variables + +| Variable | Description | +| --------------------------------- | ------------------------------------ | +| `--modal-background` | Modal background color | +| `--modal-width` | Modal default width | +| `--modal-height` | Modal default height | +| `--modal-max-width` | Modal maximum width | +| `--modal-max-height` | Modal maximum height | +| `--modal-max-width-narrow` | Narrow modal maximum width | +| `--modal-border-width` | Modal border thickness | +| `--modal-border-color` | Modal border color | +| `--modal-radius` | Modal radius | +| `--modal-community-sidebar-width` | Community plugin/theme sidebar width | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Multi-select.md b/docs/obsidian-developer/Reference/CSS variables/Components/Multi-select.md new file mode 100644 index 0000000000000000000000000000000000000000..9b4084908fd7290a2ba4ce4b5fdc85c7cc8ceaf9 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Multi-select.md @@ -0,0 +1,25 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for multi-select inputs. For example, used in List type [[Properties]]. + +## CSS variables + +| Variable | Description | +| --------------------------- | ------------------------------------- | +| `--pill-color` | Pill text color | +| `--pill-color-hover` | Pill text color (hover) | +| `--pill-color-remove` | Pill text color when removing | +| `--pill-color-remove-hover` | Pill text color when removing (hover) | +| `--pill-decoration` | Pill text decoration | +| `--pill-decoration-hover` | Pill text decoration (hover) | +| `--pill-background` | Pill background color | +| `--pill-background-hover` | Pill background color (hover) | +| `--pill-border-color` | Pill border color | +| `--pill-border-color-hover` | Pill border color (hover) | +| `--pill-border-width` | Pill border width | +| `--pill-padding-x` | Pill left/right padding | +| `--pill-padding-y` | Pill top/bottom padding | +| `--pill-radius` | Pill corner radius | +| `--pill-weight` | Pill font weight | \ No newline at end of file diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Navigation.md b/docs/obsidian-developer/Reference/CSS variables/Components/Navigation.md new file mode 100644 index 0000000000000000000000000000000000000000..d7f4c46dd5c36ed23b1e88757369953c4908a212 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Navigation.md @@ -0,0 +1,31 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for navigational items, such as files and folders in [[File explorer]]. + +## CSS variables + +| Variable | Description | +| ------------------------------------- | ------------------------------------------- | +| `--nav-item-size` | Nav item font size | +| `--nav-item-color` | Nav item text color | +| `--nav-item-color-hover` | Nav item text color (hover) | +| `--nav-item-color-active` | Nav item text color (active) | +| `--nav-item-color-selected` | Nav item text color (selected) | +| `--nav-item-color-highlighted` | Nav item text color (highlighted) | +| `--nav-item-background-hover` | Nav item background color (hover) | +| `--nav-item-background-active` | Nav item background color (active) | +| `--nav-item-background-selected` | Nav item background color (selected) | +| `--nav-item-padding` | Nav item padding | +| `--nav-item-parent-padding` | Nav item padding for parent elements | +| `--nav-item-children-padding-left` | Nav item children left padding | +| `--nav-item-children-margin-left` | Nav item children left margin | +| `--nav-item-weight` | Nav item font weight | +| `--nav-item-weight-hover` | Nav item font weight (hover) | +| `--nav-item-weight-active` | Nav item font weight (active) | +| `--nav-item-white-space` | Nav item `white-space` | +| `--nav-indentation-guide-width` | Nav item indentation guide border width | +| `--nav-indetation-guide-color` | Nav item indentation guide border color | +| `--nav-collapse-icon-color` | Nav item collapse chevron color | +| `--nav-collapse-icon-color-collapsed` | Nav item collapse chevron color (collapsed) | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Popover.md b/docs/obsidian-developer/Reference/CSS variables/Components/Popover.md new file mode 100644 index 0000000000000000000000000000000000000000..ca2baab7d8496fdab8302feb9bd12c85e822beaf --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Popover.md @@ -0,0 +1,16 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for popovers and file previews. + +## CSS variables + +| Variable | Description | +| ---------------------- | ----------------------- | +| `--popover-width` | Popover default width | +| `--popover-height` | Popover default height | +| `--popover-max-height` | Popover maximum height | +| `--popover-font-size` | Popover font size | +| `--popover-pdf-width` | PDF file preview width | +| `--popover-pdf-height` | PDF file preview height | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Prompt.md b/docs/obsidian-developer/Reference/CSS variables/Components/Prompt.md new file mode 100644 index 0000000000000000000000000000000000000000..655d41ef3fb4aeb03535916e9d62f774db958547 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Prompt.md @@ -0,0 +1,15 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for prompts, such as the [Quick switcher](https://help.obsidian.md/Plugins/Quick+switcher) and [Command palette](https://help.obsidian.md/Plugins/Command+palette). + +## CSS variables + +| Variable | Description | +| ----------------------- | ------------------------------------- | +| `--prompt-width` | Prompt width | +| `--prompt-max-width` | Prompt max width (for narrow windows) | +| `--prompt-max-height` | Prompt max height | +| `--prompt-border-width` | Prompt border width | +| `--prompt-border-color` | Prompt border color | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Slider.md b/docs/obsidian-developer/Reference/CSS variables/Components/Slider.md new file mode 100644 index 0000000000000000000000000000000000000000..fe4f17b4bba9ffd5511bf695db81c0eacec7489f --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Slider.md @@ -0,0 +1,18 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for slider controls. + +## CSS variables + +| Variable | Description | +| ----------------------------- | ------------------------------- | +| `--slider-thumb-border-width` | Slider thumb border width | +| `--slider-thumb-border-color` | Slider thumb border color | +| `--slider-thumb-height` | Slider thumb height | +| `--slider-thumb-width` | Slider thumb width | +| `--slider-thumb-y` | Slider thumb Y position | +| `--slider-thumb-radius` | Slider thumb radius | +| `--slider-track-background` | Slider track background color | +| `--slider-track-height` | Slider track height | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Tabs.md b/docs/obsidian-developer/Reference/CSS variables/Components/Tabs.md new file mode 100644 index 0000000000000000000000000000000000000000..db6b8c326468bde3361102c06f4e5d94b3ec72f3 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Tabs.md @@ -0,0 +1,43 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for tabs. + +## CSS variables + +| Variable | Description | +| ----------------------------------------- | -------------------------------------------- | +| `--tab-background-active` | Tab background color (active tab) | +| `--tab-text-color` | Tab text color | +| `--tab-text-color-active` | Tab text color (non-focused window, active) | +| `--tab-text-color-focused` | Tab text color (focused window) | +| `--tab-text-color-focused-active` | Tab text color (focused window, active) | +| `--tab-text-color-focused-highlighted` | Tab text color (focused window, highlighted) | +| `--tab-text-color-focused-active-current` | Tab text color (focused window, current tab) | +| `--tab-font-size` | Tab font size | +| `--tab-font-weight` | Tab font weight | +| `--tab-container-background` | Tab container background color | +| `--tab-divider-color` | Tab divider color | +| `--tab-outline-color` | Tab outline color | +| `--tab-outline-width` | Tab outline width | +| `--tab-curve` | Tab curve radius | +| `--tab-radius` | Tab outer radius | +| `--tab-radius-active` | Tab outer radius (active tab) | +| `--tab-width` | Tab default width | +| `--tab-max-width` | Tab maximum width | + +### Tab stacks + +Styling for stacked tabs + +| Variable | Description | +| --------------------------------- | ----------------------------- | +| `--tab-stacked-pane-width` | Stacked pane width | +| `--tab-stacked-header-width` | Stacked header width | +| `--tab-stacked-font-size` | Stacked tab font size | +| `--tab-stacked-font-weight` | Stacked tab font weight | +| `--tab-stacked-text-align` | Stacked tab text alignment | +| `--tab-stacked-text-transform` | Stacked tab text transform | +| `--tab-stacked-text-writing-mode` | Stacked tab text writing mode | +| `--tab-stacked-shadow` | Stacked tab shadow | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Text input.md b/docs/obsidian-developer/Reference/CSS variables/Components/Text input.md new file mode 100644 index 0000000000000000000000000000000000000000..c4906b12967e76ab1a1aef60117478c77a37406f --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Text input.md @@ -0,0 +1,14 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for text inputs. + +## CSS variables + +| Variable | Description | +| ---------------------- | ------------------ | +| `--input-height` | Input height | +| `--input-radius` | Input radius | +| `--input-font-weight` | Input font weight | +| `--input-border-width` | Input border width | diff --git a/docs/obsidian-developer/Reference/CSS variables/Components/Toggle.md b/docs/obsidian-developer/Reference/CSS variables/Components/Toggle.md new file mode 100644 index 0000000000000000000000000000000000000000..0331f82826ed33937abaea24d38eb990a359bd07 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Components/Toggle.md @@ -0,0 +1,21 @@ +--- +cssClass: reference +--- + +This page lists CSS variables toggles. + +## CSS variables + +| Variable | Description | +| ------------------------- | ----------------------------- | +| `--toggle-border-width` | Toggle border width | +| `--toggle-width` | Toggle width | +| `--toggle-radius` | Toggle radius | +| `--toggle-thumb-color` | Toggle thumb background color | +| `--toggle-thumb-radius` | Toggle thumb radius | +| `--toggle-thumb-height` | Toggle thumb height | +| `--toggle-thumb-width` | Toggle thumb width | +| `--toggle-s-border-width` | Small toggle border width | +| `--toggle-s-width` | Small toggle width | +| `--toggle-s-thumb-height` | Small toggle thumb height | +| `--toggle-s-thumb-width` | Small toggle thumb width | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Block.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Block.md new file mode 100644 index 0000000000000000000000000000000000000000..23ba57a21acdf4b8c081e0b2619b63b17638b653 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Block.md @@ -0,0 +1,11 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for rendered blocks in Live Preview. + +## CSS variables + +| Variable | Description | +| ---------------------------- | ------------------------------------------------------ | +| `--embed-block-shadow-hover` | Hover shadow for rendered embed blocks in Live Preview | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Blockquote.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Blockquote.md new file mode 100644 index 0000000000000000000000000000000000000000..66c8a576381811db172eb81b734124237ad489ea --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Blockquote.md @@ -0,0 +1,15 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for blockquotes. + +## CSS variables + +| Variable | Description | +| ------------------------------- | ------------------------------------------- | +| `--blockquote-background-color` | Blockquote background color | +| `--blockquote-border-thickness` | Blockquote left border thickness | +| `--blockquote-border-color` | Blockquote left border color | +| `--blockquote-font-style` | Blockquote font style (e.g. normal, italic) | +| `--blockquote-color` | Blockquote text color | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Callout.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Callout.md new file mode 100644 index 0000000000000000000000000000000000000000..1bbd47339a4ced44308032b87420c8243a9d03c7 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Callout.md @@ -0,0 +1,41 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for [Callouts](https://help.obsidian.md/Editing+and+formatting/Callouts). + +## CSS variables + +| Variable | Description | +| ------------------------------ | ----------------------------------------------------------- | +| `--callout-border-width` | Callout border width | +| `--callout-border-opacity` | Callout border opacity | +| `--callout-padding` | Callout padding | +| `--callout-radius` | Callout radius | +| `--callout-blend-mode` | Callout blend mode, allows color mixing for nested callouts | +| `--callout-title-color` | Callout title text color | +| `--callout-title-padding` | Callout title padding | +| `--callout-title-size` | Callout title font size | +| `--callout-content-padding` | Callout content padding | +| `--callout-content-background` | Callout content background color | + +### Type colors + +Callout types have unique icons and colors, and may have multiple aliases. + +| Variable | Callout type | +| --------------------- | --------------------------------- | +| `--callout-bug` | `bug` | +| `--callout-default` | `default`, `note` | +| `--callout-error` | `error`, `danger` | +| `--callout-example` | `example` | +| `--callout-fail` | `fail`, `failure`, `missing` | +| `--callout-important` | `important` | +| `--callout-info` | `info` | +| `--callout-question` | `question`, `help`, `faq` | +| `--callout-success` | `success`, `check`, `done` | +| `--callout-summary` | `summary`, `abstract`, `tldr` | +| `--callout-tip` | `tip`, `hint` | +| `--callout-todo` | `todo` | +| `--callout-warning` | `warning`, `caution`, `attention` | +| `--callout-quote` | `quote`, `cite` | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Code.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Code.md new file mode 100644 index 0000000000000000000000000000000000000000..0e702fd40df734163ab75c3ee652ff317eeb0198 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Code.md @@ -0,0 +1,32 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for code. + +## CSS variables + +| Variable | Description | +| -------------------- | --------------------- | +| `--code-background` | Code background color | +| `--code-white-space` | Code `white-space` | +| `--code-size` | Code font size | + +### Syntax highlighting + +> [!note] +> Since Obsidian uses two different libraries for syntax highlighting—one for Editing view and another for Reading view—styling may not match perfectly between the two. + +| Variable | Description | +| -------------------- | ------------------------ | +| `--code-normal` | Non-highlighted syntax | +| `--code-comment` | Comments | +| `--code-function` | Functions | +| `--code-important` | Important, regex | +| `--code-keyword` | Keywords | +| `--code-operator` | Operators | +| `--code-property` | Properties | +| `--code-punctuation` | Punctuation | +| `--code-string` | Strings | +| `--code-tag` | Tags, symbols, constants | +| `--code-value` | Values | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Embed.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Embed.md new file mode 100644 index 0000000000000000000000000000000000000000..cb689231fbf8f885391d7754119caced89866115 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Embed.md @@ -0,0 +1,19 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for [embedded files](https://help.obsidian.md/Linking+notes+and+files/Embedding+files). + +## CSS variables + +| Variable | Description | +| ---------------------------- | ------------------------------------------------------ | +| `--embed-max-height` | Embed max height | +| `--embed-canvas-max-height` | Embedded Canvas element max height | +| `--embed-background` | Embed background color | +| `--embed-border-left` | Embed left border, shorthand property | +| `--embed-border-right` | Embed right border, shorthand property | +| `--embed-border-top` | Embed top border, shorthand property | +| `--embed-border-bottom` | Embed bottom border, shorthand property | +| `--embed-padding` | Embedd padding | +| `--embed-font-style` | Embed `font-style` | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/File.md b/docs/obsidian-developer/Reference/CSS variables/Editor/File.md new file mode 100644 index 0000000000000000000000000000000000000000..18e503bcd06c67a0a0828e728b6739e1bf9cd606 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/File.md @@ -0,0 +1,17 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for open files in the editor. + +## CSS variables + +| Variable | Description | +| --------------------------- | ----------------------------------------------------- | +| `--file-line-width` | Width of a line when readable line width is turned on | +| `--file-folding-offset` | Width of the line offset for fold indicators | +| `--file-margins` | File margins | +| `--file-header-font-size` | File header font size | +| `--file-header-font-weight` | File header font weight | +| `--file-header-border` | File header `border-bottom` property | +| `--file-header-justify` | File header text alignment, uses `justify-content` | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Footnote.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Footnote.md new file mode 100644 index 0000000000000000000000000000000000000000..31940dacfb0c1b483bdb06fff6ff71b7b5125677 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Footnote.md @@ -0,0 +1,11 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for footnotes. + +## CSS variables + +| Variable | Description | +| ----------------- | ------------------ | +| `--footnote-size` | Footnote font size | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Headings.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Headings.md new file mode 100644 index 0000000000000000000000000000000000000000..922b1b48a22981507a4b5899c90044d2d5db458c --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Headings.md @@ -0,0 +1,53 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for headings. + +## CSS variables + +| Variable | Description | +| ---------------------- | -------------------------------------------- | +| `--heading-formatting` | Text color for Markdown heading depth syntax | +| `--h1-color` | H1 text color | +| `--h2-color` | H2 text color | +| `--h3-color` | H3 text color | +| `--h4-color` | H4 text color | +| `--h5-color` | H5 text color | +| `--h6-color` | H6 text color | +| `--h1-font` | H1 font family | +| `--h2-font` | H2 font family | +| `--h3-font` | H3 font family | +| `--h4-font` | H4 font family | +| `--h5-font` | H5 font family | +| `--h6-font` | H6 font family | +| `--h1-line-height` | H1 line height | +| `--h2-line-height` | H2 line height | +| `--h3-line-height` | H3 line height | +| `--h4-line-height` | H4 line height | +| `--h5-line-height` | H5 line height | +| `--h6-line-height` | H6 line height | +| `--h1-size` | H1 font size | +| `--h2-size` | H2 font size | +| `--h3-size` | H3 font size | +| `--h4-size` | H4 font size | +| `--h5-size` | H5 font size | +| `--h6-size` | H6 font size | +| `--h1-style` | H1 font style | +| `--h2-style` | H2 font style | +| `--h3-style` | H3 font style | +| `--h4-style` | H4 font style | +| `--h5-style` | H5 font style | +| `--h6-style` | H6 font style | +| `--h1-variant` | H1 font variant | +| `--h2-variant` | H2 font variant | +| `--h3-variant` | H3 font variant | +| `--h4-variant` | H4 font variant | +| `--h5-variant` | H5 font variant | +| `--h6-variant` | H6 font variant | +| `--h1-weight` | H1 font weight | +| `--h2-weight` | H2 font weight | +| `--h3-weight` | H3 font weight | +| `--h4-weight` | H4 font weight | +| `--h5-weight` | H5 font weight | +| `--h6-weight` | H6 font weight | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Horizontal rule.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Horizontal rule.md new file mode 100644 index 0000000000000000000000000000000000000000..7f466e59da964b024b2b8110837cac770a792153 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Horizontal rule.md @@ -0,0 +1,12 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for horizontal rules. + +## CSS variables + +| Variable | Description | +| ---------------- | -------------------------------- | +| `--hr-color` | Horizontal rule border color | +| `--hr-thickness` | Horizontal rule border thickness | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Inline title.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Inline title.md new file mode 100644 index 0000000000000000000000000000000000000000..a3f00beb77c8ac47674cb833733ed0cebd647953 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Inline title.md @@ -0,0 +1,20 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for inline titles. + +> [!note] +> To see inline titles, you need to enable **Settings → Appearance → Show inline title**. + +## CSS variables + +| Variable | Description | +| ---------------------------- | ------------------------- | +| `--inline-title-color` | Inline title text color | +| `--inline-title-font` | Inline title font family | +| `--inline-title-line-height` | Inline title line height | +| `--inline-title-size` | Inline title font size | +| `--inline-title-style` | Inline title font style | +| `--inline-title-variant` | Inline title font variant | +| `--inline-title-weight` | Inline title font weight | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Link.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Link.md new file mode 100644 index 0000000000000000000000000000000000000000..322c5cfb026cc2cd0d6e7ae720173d3de41f42d1 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Link.md @@ -0,0 +1,30 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for links. + +Obsidian supports three different types of links: + +- **Resolved internal links** link to an existing note. +- **Unresolved internal links** link to a non-existing note. +- **External links** link to an external URL or URI. + +## CSS variables + +| Variable | Description | +| ------------------------------------ | ----------------------------------------- | +| `--link-color` | Resolved link text color | +| `--link-color-hover` | Resolved link text color (hover) | +| `--link-decoration` | Resolved link text decoration | +| `--link-decoration-hover` | Resolved link text decoration (hover) | +| `--link-decoration-thickness` | Resolved link text decoration thickness | +| `--link-unresolved-color` | Unresolved link text color | +| `--link-unresolved-opacity` | Unresolved link opacity | +| `--link-unresolved-filter` | Unresolved link filter, e.g. `hue-rotate` | +| `--link-unresolved-decoration-style` | Unresolved link text decoration style | +| `--link-unresolved-decoration-color` | Unresolved link text decoration color | +| `--link-external-color` | External link text color | +| `--link-external-color-hover` | External link text color (hover) | +| `--link-external-decoration` | External link text decoration | +| `--link-external-decoration-hover` | External link text decoration (hover) | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/List.md b/docs/obsidian-developer/Reference/CSS variables/Editor/List.md new file mode 100644 index 0000000000000000000000000000000000000000..5f33d8170a8da95703b88e025c5eb5e77bc1ede4 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/List.md @@ -0,0 +1,21 @@ +--- +cssClass: reference +--- +This page lists CSS variables for ordered and unordered lists. + +## CSS variables + +| Variable | Description | +| ---- | ---- | +| `--list-indent` | Horizontal indentation depth for nested items | +| `--list-spacing` | Vertical spacing between list items | +| `--list-marker-align` | List marker text alignment | +| `--list-marker-color` | List marker color | +| `--list-marker-color-hover` | List marker color (hover) | +| `--list-marker-color-collapsed` | List marker color for collapsed items | +| `--list-marker-min-width` | List marker minimum width | +| `--list-bullet-border` | List bullet border | +| `--list-bullet-radius` | List bullet radius | +| `--list-bullet-size` | List bullet width/height | +| `--list-bullet-transform` | List bullet `transform` property | +| `--list-numbered-style` | `list-style-type` for numbered lists | diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Properties.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Properties.md new file mode 100644 index 0000000000000000000000000000000000000000..7afc6eaf96750342f73bfe64894c22bc2630accc --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Properties.md @@ -0,0 +1,53 @@ +--- +cssClass: reference +--- +This page lists CSS variables for [Properties](https://help.obsidian.md/Editing+and+formatting/Properties), the YAML metadata editor for frontmatter. See also [[Checkbox]], [[Text input]] and [[Multi-select]] for variables related to the input types. + +## CSS variables + +### Properties container + +These variables apply to the entire Properties container. + +| Variable | Description | +| ---------------------------- | ----------------------- | +| `--metadata-background` | Background color | +| `--metadata-display-editing` | Display in editing mode | +| `--metadata-display-reading` | Display in reading mode | +| `--metadata-max-width` | Max width | +| `--metadata-padding` | Padding | +| `--metadata-border-color` | Border color | +| `--metadata-border-radius` | Corner radius | +| `--metadata-border-width` | Border width | +| `--metadata-gap` | Gap between properties | + +### Individual properties + +These variables apply to individual properties in the list. + +| Variable | Description | +| --------------------------------------- | ----------------------------------------- | +| `--metadata-divider-color` | Color of divider lines between properties | +| `--metadata-divider-color-hover` | Color of dividers when property (hover) | +| `--metadata-divider-color-focus` | Color of dividers when property (focused) | +| `--metadata-divider-width` | Width of divider lines | +| `--metadata-property-padding` | Property adding | +| `--metadata-property-radius` | Property corner radius | +| `--metadata-property-background` | Property background color | +| `--metadata-property-background-hover` | Property background color (hover) | +| `--metadata-property-background-active` | Property background color (active) | +| `--metadata-label-background-hover` | Property label background color(hover) | +| `--metadata-label-background-active` | Property label background color (active) | +| `--metadata-label-font-size` | Property label font size | +| `--metadata-label-font-weight` | Property label font weight | +| `--metadata-sidebar-label-font-size` | Property label font size (sidebar) | +| `--metadata-label-text-color` | Property label text color | +| `--metadata-label-text-color-hover` | Property label text color (hover) | +| `--metadata-label-width` | Property label width | +| `--metadata-input-height` | Property input height | +| `--metadata-input-text-color` | Property input text color | +| `--metadata-input-font-size` | Property input font size | +| `--metadata-sidebar-input-font-size` | Property input font size (sidebar) | +| `--metadata-input-background` | Property input background color | +| `--metadata-input-background-hover` | Property input background color (hover) | +| `--metadata-input-background-active` | Property input background color (active) | \ No newline at end of file diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Table.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Table.md new file mode 100644 index 0000000000000000000000000000000000000000..920b344a2de19c1632a638fbfafde71ab9278057 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Table.md @@ -0,0 +1,43 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for tables. + +## CSS variables + +| Variable | Description | +| --------------------------------------- | ------------------------------------- | +| `--table-background` | Table background color | +| `--table-border-width` | Table border width | +| `--table-border-color` | Table border color | +| `--table-cell-vertical-alignment` | Cell vertical alignment | +| `--table-white-space` | Table `white-space` property | +| `--table-header-background` | Table header background color | +| `--table-header-background-hover` | Table header background color (hover) | +| `--table-header-border-width` | Table header border width | +| `--table-header-border-color` | Table header border color | +| `--table-header-font` | Table header font family | +| `--table-header-size` | Table header font size | +| `--table-header-weight` | Table header font weight | +| `--table-header-color` | Table header text color | +| `--table-line-height` | Line height for cell text | +| `--table-text-size` | Cell font size | +| `--table-text-color` | Cell text color | +| `--table-column-max-width` | Column maximum width | +| `--table-column-alt-background` | Alternating column background color | +| `--table-column-first-border-width` | First column left border width | +| `--table-column-last-border-width` | Last column right border width | +| `--table-row-background-hover` | Row background color (hover) | +| `--table-row-alt-background` | Alternating row background color | +| `--table-last-border-width` | Last row bottom border width | +| `--table-selection` | Selection background color | +| `--table-selection-blend-mode` | Selection blend mode | +| `--table-selection-border-color` | Selection border color | +| `--table-selection-border-width` | Selection border width | +| `--table-selection-border-radius` | Selection border radius | +| `--table-drag-handle-background` | Drag handle background color | +| `--table-drag-handle-background-active` | Drag handle background color (active) | +| `--table-drag-handle-color` | Drag handle icon color | +| `--table-drag-handle-color-active` | Drag handle icon color (active) | + diff --git a/docs/obsidian-developer/Reference/CSS variables/Editor/Tag.md b/docs/obsidian-developer/Reference/CSS variables/Editor/Tag.md new file mode 100644 index 0000000000000000000000000000000000000000..8f8f1f8bec37a1cb3d4495e06c9f662995466ba8 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Editor/Tag.md @@ -0,0 +1,24 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for tags. + +## CSS variables + +| Variable | Description | +| -------------------------- | ---------------------------- | +| `--tag-size` | Tag font size | +| `--tag-color` | Tag text color | +| `--tag-color-hover` | Tag text color (hover) | +| `--tag-decoration` | Tag text decoration | +| `--tag-decoration-hover` | Tag text decoration (hover) | +| `--tag-background` | Tag background color | +| `--tag-background-hover` | Tag background color (hover) | +| `--tag-border-color` | Tag border color | +| `--tag-border-color-hover` | Tag border color (hover) | +| `--tag-border-width` | Tag border width | +| `--tag-padding-x` | Tag left/right padding | +| `--tag-padding-y` | Tag top/down padding | +| `--tag-radius` | Tag radius | +| `--tag-weight` | Tag font weight | diff --git a/docs/obsidian-developer/Reference/CSS variables/Foundations/Borders.md b/docs/obsidian-developer/Reference/CSS variables/Foundations/Borders.md new file mode 100644 index 0000000000000000000000000000000000000000..19f71b509b68cdb58ae7da02c5d58a138462d59f --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Foundations/Borders.md @@ -0,0 +1,9 @@ +--- +cssClasses: reference +--- + +Border thicknesses applied to UI elements. + +| Variable | Default value | +| ---------------- | ------------- | +| `--border-width` | `1px` | diff --git a/docs/obsidian-developer/Reference/CSS variables/Foundations/Colors.md b/docs/obsidian-developer/Reference/CSS variables/Foundations/Colors.md new file mode 100644 index 0000000000000000000000000000000000000000..04904bb2cb635d8546b5f9007e8e58667b4a275f --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Foundations/Colors.md @@ -0,0 +1,148 @@ +--- +cssClass: reference +--- + +The Obsidian color palette defines a range of colors used in the app. + +## Base colors + +The base colors is a neutral color palette ranging from light to dark. These values should typically only be defined by themes. + +| Variable | Default value (light mode) | Default value (dark mode) | +| ------------------ | -------------------------- | ------------------------- | +| `--color-base-00` | `#ffffff` | `#1e1e1e` | +| `--color-base-05` | `#fcfcfc` | `#212121` | +| `--color-base-10` | `#fafafa` | `#242424` | +| `--color-base-20` | `#f6f6f6` | `#262626` | +| `--color-base-25` | `#e3e3e3` | `#2a2a2a` | +| `--color-base-30` | `#e0e0e0` | `#363636` | +| `--color-base-35` | `#d4d4d4` | `#3f3f3f` | +| `--color-base-40` | `#bdbdbd` | `#555555` | +| `--color-base-50` | `#ababab` | `#666666` | +| `--color-base-60` | `#707070` | `#999999` | +| `--color-base-70` | `#5a5a5a` | `#bababa` | +| `--color-base-100` | `#222222` | `#dadada` | + +## Accent color + +The accent color is used to draw attention to interactive elements, such as links and primary buttons, and can be overridden by the user under **Settings → Appearance** in the Obsidian app. + +| Variable | Default value | Description | +| ------------ | ------------- | ----------------- | +| `--accent-h` | `254` | Accent hue | +| `--accent-s` | `80%` | Accent saturation | +| `--accent-l` | `68%` | Accent lightness | + +> [!tip] +> You can use [CSS calculations](https://developer.mozilla.org/en-US/docs/Web/CSS/calc) to create a variety of shades based on the accent color. + +## Extended colors + +Extended color variables define the broader range of colors used for status messages (errors, warnings, success), callouts, syntax highlighting, graph nodes, and Canvas elements. + +Each extended color has an additional RGB variable with a `-rgb` suffix that you can use to create colors with opacity, using the `rgba` function. + +For example, the following snippet uses the default variable to set the text color, and the RGB variable to set a background color to red with 20% opacity. + +```css +color: var(--color-red); +background-color: rgba(var(--color-red-rgb), 0.2); +``` + +| Variable | Default value (light mode) | Default value (dark mode) | +| -------------------- | -------------------------- | ------------------------- | +| `--color-red` | `#e93147` | `#fb464c` | +| `--color-orange` | `#ec7500` | `#e9973f` | +| `--color-yellow` | `#e0ac00` | `#e0de71` | +| `--color-green` | `#08b94e` | `#44cf6e` | +| `--color-cyan` | `#00bfbc` | `#53dfdd` | +| `--color-blue` | `#086ddd` | `#027aff` | +| `--color-purple` | `#7852ee` | `#a882ff` | +| `--color-pink` | `#d53984` | `#fa99cd` | +| `--color-red-rgb` | `233, 49, 71` | `251, 70, 76` | +| `--color-orange-rgb` | `236, 117, 0` | `233, 151, 63` | +| `--color-yellow-rgb` | `224, 172, 0` | `224, 222, 113` | +| `--color-green-rgb` | `8, 185, 78` | `68, 207, 110` | +| `--color-cyan-rgb` | `0, 191, 188` | `83, 223, 221` | +| `--color-blue-rgb` | `8, 109, 221` | `2, 122, 255` | +| `--color-purple-rgb` | `120, 82, 238` | `168, 130, 255` | +| `--color-pink-rgb` | `213, 57, 132` | `250, 153, 205` | + +## Black and white + +Black and white colors let you create masks with opacity. + +| Variable | Default value (light mode) | Default value (dark mode) | +| ---------------- | -------------------------- | ------------------------- | +| `--mono-rgb-0` | `255, 255, 255` | `0, 0, 0` | +| `--mono-rgb-100` | `0, 0, 0` | `255, 255, 255` | + +> [!warning] +> Avoid changing the value of black and white variables. + +## Semantic colors + +Semantic colors are derived from the base color palette based on their intended use. + +#### Surface colors + +
+
Primary background +
Alt. primary background
+
+
Secondary background +
Alt. secondary background
+
+ +| Variable | Description | +| ------------------------------------ | ----------------------------- | +| `--background-primary` | Primary background | +| `--background-primary-alt` | Background for surfaces on top of primary background | +| `--background-secondary` | Secondary background | +| `--background-secondary-alt` | Background for surfaces on top of secondary background | +| `--background-modifier-hover` | Hovered elements | +| `--background-modifier-active-hover` | Active hovered elements | +| `--background-modifier-border` | Border color | +| `--background-modifier-border-hover` | Border color (hover) | +| `--background-modifier-border-focus` | Border color (focus) | +| `--background-modifier-error-rgb` | Error background, RGB value | +| `--background-modifier-error` | Error background | +| `--background-modifier-error-hover` | Error background (hover) | +| `--background-modifier-success-rgb` | Success background, RGB value | +| `--background-modifier-success` | Success background | +| `--background-modifier-message` | Messages background | +| `--background-modifier-form-field` | Form field background | + +#### Interactive colors + +| Variable | Description | +| ---------------------------- | ------------------------------------------------------- | +| `--interactive-normal` | Background for standard interactive elements | +| `--interactive-hover` | Background for standard interactive elements (hover) | +| `--interactive-accent` | Background for accented interactive elements | +| `--interactive-accent-hsl` | Background for accented interactive elements in HSL | +| `--interactive-accent-hover` | Background for accented interactive elements (hover) | + +### Text colors + +#### Text foreground colors + +| Variable | Description | +| --------------------------- | ---------------------------------------------- | +| `--text-normal` | Normal text | +| `--text-muted` | Muted text | +| `--text-faint` | Faint text | +| `--text-on-accent` | Text on accent background when accent is dark | +| `--text-on-accent-inverted` | Text on accent background when accent is light | +| `--text-success` | Success text | +| `--text-warning` | Warning text | +| `--text-error` | Error text | +| `--text-accent` | Accent text | +| `--text-accent-hover` | Accent text (hover) | + +#### Text background colors + +| Variable | Description | +| --------------------- | --------------------------- | +| `--text-selection` | Selected text background | +| `--text-highlight-bg` | Highlighted text background | diff --git a/docs/obsidian-developer/Reference/CSS variables/Foundations/Cursor.md b/docs/obsidian-developer/Reference/CSS variables/Foundations/Cursor.md new file mode 100644 index 0000000000000000000000000000000000000000..26ded12c229ae3d1ae72b72efa2669495ca09ce2 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Foundations/Cursor.md @@ -0,0 +1,10 @@ +--- +cssClass: reference +--- + +Obsidian follows operating system conventions for cursors, which means interactive elements use the arrow cursor instead of the pointer cursor. + +| Variable | Default value | Description | +| --------------- | ------------- | ------------------------------- | +| `--cursor` | `default` | Cursor for interactive elements | +| `--cursor-link` | `pointer` | Cursor for links | diff --git a/docs/obsidian-developer/Reference/CSS variables/Foundations/Icons.md b/docs/obsidian-developer/Reference/CSS variables/Foundations/Icons.md new file mode 100644 index 0000000000000000000000000000000000000000..8ae48302e815ef9bf11bc0dd737b55d068b3ac15 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Foundations/Icons.md @@ -0,0 +1,38 @@ +--- +cssClass: reference +--- + +Icons communicate messages at a glance, and draw attention to important information. + +Obsidian uses the [Lucide](https://lucide.dev/) icon library, which includes more than 800 icons. You can find all available icons on their website. + +> [!important] Custom icons +> If you want to create your own icons for Obsidian, you need to follow the [Icon Design Principles](https://lucide.dev/guide/design/icon-design-guide). You can find [templates and guides](https://github.com/lucide-icons/lucide/blob/main/CONTRIBUTING.md) for vector editors, such as Illustrator, Figma, and Inkscape. + +| Variable | Description | +| ------------------------- | ----------------------------------- | +| `--icon-size` | Shorthand for icon width and length | +| `--icon-stroke` | Shorthand for icon stroke width | +| `--icon-color` | Icon color | +| `--icon-color-hover` | Icon color (hovered) | +| `--icon-color-active` | Icon color (active) | +| `--icon-color-focused` | Icon color (focused) | +| `--icon-opacity` | Icon opacity | +| `--icon-opacity-hover` | Icon opacity (hovered) | +| `--icon-opacity-active` | Icon opacity (active) | +| `--clickable-icon-radius` | Clickable icon button radius | + +### Icon sizes + +| Variable | Default value | +| ------------------------ | ------------- | +| `--icon-xs` | `14px` | +| `--icon-s` | `16px` | +| `--icon-m` | `18px` | +| `--icon-l` | `18px` | +| `--icon-xl` | `32px` | +| `--icon-xs-stroke-width` | `2px` | +| `--icon-s-stroke-width` | `2px` | +| `--icon-m-stroke-width` | `1.75px` | +| `--icon-l-stroke-width` | `1.75px` | +| `--icon-xl-stroke-width` | `1.25px` | diff --git a/docs/obsidian-developer/Reference/CSS variables/Foundations/Layers.md b/docs/obsidian-developer/Reference/CSS variables/Foundations/Layers.md new file mode 100644 index 0000000000000000000000000000000000000000..907b1ec764cc508aee6d797e5b000b5358de3066 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Foundations/Layers.md @@ -0,0 +1,18 @@ +--- +cssClass: reference +--- + +Layers define the depth, or z-index, of an element. + +| Variable | Default value | +| ---------------------- | ------------- | +| `--layer-cover` | `5` | +| `--layer-sidedock` | `10` | +| `--layer-status-bar` | `15` | +| `--layer-popover` | `30` | +| `--layer-slides` | `45` | +| `--layer-modal` | `50` | +| `--layer-notice` | `60` | +| `--layer-menu` | `65` | +| `--layer-tooltip` | `70` | +| `--layer-dragged-item` | `80` | diff --git a/docs/obsidian-developer/Reference/CSS variables/Foundations/Radiuses.md b/docs/obsidian-developer/Reference/CSS variables/Foundations/Radiuses.md new file mode 100644 index 0000000000000000000000000000000000000000..1ff99f4312a0cfffdf19ca618ba4fc3708d9cc45 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Foundations/Radiuses.md @@ -0,0 +1,12 @@ +--- +cssClass: reference +--- + +Radiuses define the rounded corners for UI elements. + +| Variable | Default value | +| ------------- | ------------- | +| `--radius-s` | `4px` | +| `--radius-m` | `8px` | +| `--radius-l` | `12px` | +| `--radius-xl` | `16px` | diff --git a/docs/obsidian-developer/Reference/CSS variables/Foundations/Spacing.md b/docs/obsidian-developer/Reference/CSS variables/Foundations/Spacing.md new file mode 100644 index 0000000000000000000000000000000000000000..e29bc3e80453c47950ea37df3810b1bae3dc61b7 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Foundations/Spacing.md @@ -0,0 +1,37 @@ +--- +cssclasses: + - reference +aliases: + - Padding + - Margins + - Size +--- + +Obsidian uses a 4-pixel grid to structure UI elements. By using multiples of 4 for padding and margin, the grid provides convenient ratios for layouts and allows the interface to scale up and down across high and low DPI screens. + +To align with the 4-pixel grid, all elements should use the predefined `--size` CSS variables for spacing and dimensions properties. + +Each size variable contains two numbers which represent the base and the multiple. + +- `--size-4-1` represents `4px` (4x1) +- `--size-4-2` represents `8px` (4x2) +- `--size-4-4` represents `16px` (4x4) + +In addition to the 4-pixel grid, Obsidan also provides a set of variables that uses a 2-pixel grid. Use these sparingly and only when you need more fine-grained spacing. + +| Variable | Default value | +| ------------- | ------------- | +| `--size-2-1` | `2px` | +| `--size-2-2` | `4px` | +| `--size-2-3` | `6px` | +| `--size-4-1` | `4px` | +| `--size-4-2` | `8px` | +| `--size-4-3` | `12px` | +| `--size-4-4` | `16px` | +| `--size-4-5` | `20px` | +| `--size-4-6` | `24px` | +| `--size-4-8` | `32px` | +| `--size-4-9` | `36px` | +| `--size-4-12` | `48px` | +| `--size-4-16` | `64px` | +| `--size-4-18` | `72px` | diff --git a/docs/obsidian-developer/Reference/CSS variables/Foundations/Typography.md b/docs/obsidian-developer/Reference/CSS variables/Foundations/Typography.md new file mode 100644 index 0000000000000000000000000000000000000000..9afb3af586c090d16f33dc21de706b8f41096ac8 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Foundations/Typography.md @@ -0,0 +1,51 @@ +--- +cssClass: reference +--- + +## Font size + +Obsidian uses both relative and fixed font sizes depending on the context. + +- Use `--font-*` (relative) variables in the editor. +- Use `--font-ui-*` (fixed) variables for UI elements. + +| Variable | Default value | Description | +| ------------------- | ------------- | ----------- | +| `--font-text-size` | `16px` | Editor font size. Defined by the user under Appearance settings. | +| `--font-smallest` | `0.8em` | | +| `--font-smaller` | `0.875em` | | +| `--font-small` | `0.933em` | | +| `--font-ui-smaller` | `12px` | | +| `--font-ui-small` | `13px` | | +| `--font-ui-medium` | `15px` | | +| `--font-ui-larger` | `20px` | | + +## Font weight + +| Variable | Default value | +| ------------------- | ------------- | +| `--font-thin` | `100` | +| `--font-extralight` | `200` | +| `--font-light` | `300` | +| `--font-normal` | `400` | +| `--font-medium` | `500` | +| `--font-semibold` | `600` | +| `--font-bold` | `700` | +| `--font-extrabold` | `800` | +| `--font-black` | `900` | + +## Text formatting + +| Variable | Description | +| --------------- | ----------------------- | +| `--bold-weight` | Bold text font weight | +| `--bold-color` | Bold text color | +| `--italic-color` | Italic text color | + +## Line heights + +| Variable | Default value | Description | +| ---------------------- | ------------- | ---------------------------------------------------------------------- | +| `--line-height-normal` | `1.5` | Default line height | +| `--line-height-tight` | `1.3` | Used in search results, tree items, tooltips, and other smaller spaces | + diff --git a/docs/obsidian-developer/Reference/CSS variables/Plugins/Canvas.md b/docs/obsidian-developer/Reference/CSS variables/Plugins/Canvas.md new file mode 100644 index 0000000000000000000000000000000000000000..6c6f306e352b3f40bc1ae8c7c8741fe3f0ff36e8 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Plugins/Canvas.md @@ -0,0 +1,19 @@ +--- +cssClass: reference +--- + +This page lists CSS variables used by the [Canvas](https://help.obsidian.md/Plugins/Canvas) plugin. + +## CSS variables + +| Variable | Description | +| --------------------------- | ---------------------------- | +| `--canvas-background` | Canvas background color | +| `--canvas-card-label-color` | Canvas card label text color | +| `--canvas-dot-pattern` | Canvas dot pattern color | +| `--canvas-color-1` | Canvas card color 1 | +| `--canvas-color-2` | Canvas card color 2 | +| `--canvas-color-3` | Canvas card color 3 | +| `--canvas-color-4` | Canvas card color 4 | +| `--canvas-color-5` | Canvas card color 5 | +| `--canvas-color-6` | Canvas card color 6 | diff --git a/docs/obsidian-developer/Reference/CSS variables/Plugins/File explorer.md b/docs/obsidian-developer/Reference/CSS variables/Plugins/File explorer.md new file mode 100644 index 0000000000000000000000000000000000000000..84133b416950b24a233fdb64a5fad581df75bdc3 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Plugins/File explorer.md @@ -0,0 +1,13 @@ +--- +cssClass: reference +--- + +This page lists CSS variables used by the [File explorer](https://help.obsidian.md/Plugins/File+explorer) plugin. + +## CSS variables + +| Variable | Description | +| -------------------------- | ----------- | +| `--vault-name-font-size` | Font size | +| `--vault-name-font-weight` | Font weight | +| `--vault-name-color` | Text color | diff --git a/docs/obsidian-developer/Reference/CSS variables/Plugins/Graph.md b/docs/obsidian-developer/Reference/CSS variables/Plugins/Graph.md new file mode 100644 index 0000000000000000000000000000000000000000..080fc7cd06351c717099b55b4e37f2556fdfecc7 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Plugins/Graph.md @@ -0,0 +1,18 @@ +--- +cssClass: reference +--- + +This page lists CSS variables used by the [Graph view](https://help.obsidian.md/Plugins/Graph+view) plugin. + +## CSS variables + +| Variable | Description | +| ------------------------- | --------------------- | +| `--graph-controls-width` | Graph controls width | +| `--graph-text` | Node text color | +| `--graph-line` | Line color | +| `--graph-node` | Resolved node color | +| `--graph-node-unresolved` | Unresolved node color | +| `--graph-node-focused` | Focused node color | +| `--graph-node-tag` | Tag node color | +| `--graph-node-attachment` | Attachment node color | diff --git a/docs/obsidian-developer/Reference/CSS variables/Plugins/Search.md b/docs/obsidian-developer/Reference/CSS variables/Plugins/Search.md new file mode 100644 index 0000000000000000000000000000000000000000..869ebbb8a4d005436c6d9b6b08792adb25a802a1 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Plugins/Search.md @@ -0,0 +1,15 @@ +--- +cssClass: reference +--- + +This page lists CSS variables used by the [Search](https://help.obsidian.md/Plugins/Search) plugin. + +## CSS variables + +| Variable | Description | +| ----------------------------- | ---------------------------------- | +| `--search-clear-button-color` | Clear search button color | +| `--search-clear-button-size` | Clear search button size | +| `--search-icon-color` | Search magnifying glass icon color | +| `--search-icon-size` | Search icon size | +| `--search-result-background` | Search result background color | diff --git a/docs/obsidian-developer/Reference/CSS variables/Publish/Publish.md b/docs/obsidian-developer/Reference/CSS variables/Publish/Publish.md new file mode 100644 index 0000000000000000000000000000000000000000..4dbfdb0069887c0d21eeb487e8ebcb4a1104bc26 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Publish/Publish.md @@ -0,0 +1,15 @@ + +### Introduction + +Many of the [[CSS variables]] utilised in the Obsidian app can also be employed in Obsidian Publish (Publish), with corresponding selectors. However, to address to the differing requirements of Publish, the variables in this section were specifically created for Publish, and are to be inserted within the `.published-container` selector. + +See [[Build a Publish theme]] for more details. + +### Index + +- [[Site fonts]] +- [[Site header]] +- [[Site navigation]] +- [[Site components]] +- [[Site sidebars]] +- [[Site pages]] \ No newline at end of file diff --git a/docs/obsidian-developer/Reference/CSS variables/Publish/Site components.md b/docs/obsidian-developer/Reference/CSS variables/Publish/Site components.md new file mode 100644 index 0000000000000000000000000000000000000000..8f275f3feb825769108db30ee1dfc68a18896fd7 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Publish/Site components.md @@ -0,0 +1,44 @@ +--- +cssClass: reference +--- + +This page lists CSS variables used for Obsidian Publish site components. + +## CSS variables + +Publish-specific variables should be defined on the `.published-container`. + +### Component titles + +Styles for the title above components such as **Backlinks**, **Graph**, **Table of contents**, when these components are turned on in the site settings. + +| Variable | Description | +| ----------------------------- | --------------------------------- | +| `--component-title-color` | Font color | +| `--component-title-font` | Font family | +| `--component-title-size` | Font size | +| `--component-title-style` | Font style, e.g. normal or italic | +| `--component-title-transform` | Text transform, e.g. uppercase | +| `--component-title-variant` | Font variant | +| `--component-title-weight` | Font weight | + + +### Outline + +When activated in Publish settings, a table of contents is displayed in the right sidebar showing a navigable list of headings on the page. + +| Variable | Description | +| --------------------------------- | -------------------------------- | +| `--outline-heading-color` | Font color for inactive headings | +| `--outline-heading-color-hover` | Font color for hovered heading | +| `--outline-heading-color-active` | Font color for active heading | +| `--outline-heading-weight-active` | Font weight for active heading | + +### Graph + +The graph component can be turned on in Publish settings. More graph CSS variables for node and line colors are present in the inherited CSS. + +| Variable | Description | +| ---------------- | ----------------------------- | +| `--graph-height` | Height of the graph component | + diff --git a/docs/obsidian-developer/Reference/CSS variables/Publish/Site fonts.md b/docs/obsidian-developer/Reference/CSS variables/Publish/Site fonts.md new file mode 100644 index 0000000000000000000000000000000000000000..567121084476b497a19a9a238fb58207f4bf0cac --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Publish/Site fonts.md @@ -0,0 +1,28 @@ +--- +cssClass: reference +--- + +To load remote fonts we recommend using CSS with `@import` or defining your fonts with `@font-face` and an absolute URL. [Learn more.](https://css-tricks.com/snippets/css/using-font-face-in-css/) + +For example you can use [Google Fonts](https://fonts.google.com/) in your `publish.css` file. Here's how you would use the font Poppins: + +```css +@import url('https://fonts.googleapis.com/css2?family=Poppins:ital@1&display=swap'); + +.published-container { + --font-text-theme: 'Poppins'; +} +``` + +## CSS variables + +Publish-specific variables should be defined on the `.published-container`. + +| Variable | Description | +| ------------------------ | ----------------------------------------------------- | +| `--font-text-size` | Font size for page text | +| `--font-text-theme` | Font family for page text | +| `--font-monospace-theme` | Font family for code | +| `--font-interface-theme` | Font family for interface elements such as navigation | +| `--font-mermaid` | Font family for Mermaid diagrams | +| `--page-title-font` | Font family for [[Site pages\|page titles]] | diff --git a/docs/obsidian-developer/Reference/CSS variables/Publish/Site header.md b/docs/obsidian-developer/Reference/CSS variables/Publish/Site header.md new file mode 100644 index 0000000000000000000000000000000000000000..7312b7177323b3ab90e648812b7855791375b079 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Publish/Site header.md @@ -0,0 +1,30 @@ +--- +cssClass: reference +--- + +The site header contains the site logo (if added in Publish settings), the site name, and the mobile hamburger menu if navigation is turned on. + +The site header appears as a horizontal header at the top of the page on mobile devices and when navigation is turned off. When navigation is turned on in Publish settings, the site name and logo appear in the left sidebar. + +This page lists CSS variables used for Obsidian Publish site header, site logo, and site name + +## CSS variables + +Publish-specific variables should be defined on the `.published-container`. + +| Variable | Description | +| ------------------------------ | ------------------------------ | +| `--logo-width` | Logo default width | +| `--logo-height` | Logo default height | +| `--logo-max-width` | Logo max width | +| `--logo-max-height` | Logo max height | +| `--logo-radius` | Logo corner radius | +| `--header-height` | Height of the site header | +| `--site-name-color` | Site name color | +| `--site-name-color-hover` | Site name hovered color | +| `--site-name-font` | Site name font family | +| `--site-name-size` | Site name font size | +| `--site-name-weight` | Site name font weight | +| `--site-menu-icon-color` | Mobile menu icon color | +| `--site-menu-icon-color-hover` | Mobile menu hovered icon color | +| `--site-menu-icon-size` | Mobile menu icon size | diff --git a/docs/obsidian-developer/Reference/CSS variables/Publish/Site navigation.md b/docs/obsidian-developer/Reference/CSS variables/Publish/Site navigation.md new file mode 100644 index 0000000000000000000000000000000000000000..9e21e12c9e0d0f32aacb610ffc20d60c3f14e870 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Publish/Site navigation.md @@ -0,0 +1,24 @@ +--- +cssClass: reference +--- + +When activated in Publish settings, navigation is placed in the left sidebar and can be styled with the following variables. Top-level items and folders can be treated differently than nested items. + +## CSS variables + +Publish-specific variables should be defined on the `.published-container`. + +| Variable | Description | +| --------------------------------- | ------------------------------------------ | +| `--nav-collapse-icon-color` | Collapse icon color | +| `--nav-collapse-icon-color-hover` | Collapse icon color (hovered) | +| `--nav-parent-item-color` | Font color for folders and top-level items | +| `--nav-parent-item-color-active` | Font color for active top-level items | +| `--nav-parent-item-weight` | Font weight for top-level items | +| `--nav-item-color` | Font color for nested items | +| `--nav-item-color-hover` | Font color for hovered nested items | +| `--nav-item-color-active` | Font color for active nested items | +| `--nav-item-border-color` | Border color for nested items | +| `--nav-item-border-color-hover` | Border color for hovered nested items | +| `--nav-item-border-color-active` | Border color for active nested items | +| `--nav-item-weight-active` | Font weight for active nested items | diff --git a/docs/obsidian-developer/Reference/CSS variables/Publish/Site pages.md b/docs/obsidian-developer/Reference/CSS variables/Publish/Site pages.md new file mode 100644 index 0000000000000000000000000000000000000000..1f0e6dee095ed0c5b525d0da8d39328940721745 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Publish/Site pages.md @@ -0,0 +1,30 @@ +--- +cssClass: reference +--- + +This page lists CSS variables used for Obsidian Publish pages. + +## CSS variables + +Publish-specific variables should be defined on the `.published-container`. + +### Page width and padding + +| Variable | Description | +| ----------------------- | ---------------------------------------------- | +| `--page-width` | Width of a note when readable line width is on | +| `--page-padding` | Padding around a note | + +### Page title + +The note title displayed at the top of the page. This title can be hidden in the Publish site settings using the "**Hide page title**" option. + +| Variable | Description | +| -------------------------- | --------------------------------- | +| `--page-title-color` | Font color | +| `--page-title-font` | Font family, see [[Site fonts]] | +| `--page-title-line-height` | Line height | +| `--page-title-size` | Font size | +| `--page-title-style` | Font style, e.g. normal or italic | +| `--page-title-variant` | Font variant | +| `--page-title-weight` | Font weight | \ No newline at end of file diff --git a/docs/obsidian-developer/Reference/CSS variables/Publish/Site sidebars.md b/docs/obsidian-developer/Reference/CSS variables/Publish/Site sidebars.md new file mode 100644 index 0000000000000000000000000000000000000000..0579333129a204796ad1afe5e37024816ba93728 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Publish/Site sidebars.md @@ -0,0 +1,22 @@ +--- +cssClass: reference +--- + +The left sidebar is present when [[Site navigation]] is turned on. The right sidebar is present when the **Graph** and/or **Table of Contents** [[Site components]] are turned on. When these components are turned off, the following variables have no effect. + +## CSS variables + +Publish-specific variables should be defined on the `.published-container`. + +| Variable | Description | +| ------------------------------ | ---------------------------------- | +| `--sidebar-left-width` | Width of the left sidebar | +| `--sidebar-left-background` | Background color of left sidebar | +| `--sidebar-left-border-width` | Right border width of left sidebar | +| `--sidebar-left-border-color` | Right border color of left sidebar | +| `--sidebar-right-width` | Width of the right sidebar | +| `--sidebar-right-background` | Background color of right sidebar | +| `--sidebar-right-border-width` | Left border width of right sidebar | +| `--sidebar-right-border-color` | Left border color of right sidebar | + + diff --git a/docs/obsidian-developer/Reference/CSS variables/Window/Divider.md b/docs/obsidian-developer/Reference/CSS variables/Window/Divider.md new file mode 100644 index 0000000000000000000000000000000000000000..d83e2d2e95d52e91e00c62e0c5e11f4530f1982f --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Window/Divider.md @@ -0,0 +1,15 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for dividers and resize handles between sidebars, tabs, and split panes. + +## CSS variables + +| Variable | Description | +| --------------------------- | ---------------------------- | +| `--divider-color` | Divider border color | +| `--divider-color-hover` | Divider border color (hover) | +| `--divider-width` | Divider border width | +| `--divider-width-hover` | Divider border width (hover) | +| `--divider-vertical-height` | Divider vertical height | diff --git a/docs/obsidian-developer/Reference/CSS variables/Window/Ribbon.md b/docs/obsidian-developer/Reference/CSS variables/Window/Ribbon.md new file mode 100644 index 0000000000000000000000000000000000000000..bc17d89e2f663501deb48caeda8852d4de7d8207 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Window/Ribbon.md @@ -0,0 +1,14 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for the [Ribbon](https://help.obsidian.md/User+interface/Workspace/Ribbon). + +## CSS variables + +| Variable | Description | +| ------------------------------- | ------------------------------------------- | +| `--ribbon-background` | Ribbon background color | +| `--ribbon-background-collapsed` | Ribbon background color (collapsed sidebar) | +| `--ribbon-width` | Ribbon width | +| `--ribbon-padding` | Ribbon padding | diff --git a/docs/obsidian-developer/Reference/CSS variables/Window/Scrollbar.md b/docs/obsidian-developer/Reference/CSS variables/Window/Scrollbar.md new file mode 100644 index 0000000000000000000000000000000000000000..f287034c54a1b49dca44a8fedfd10585b986c1f3 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Window/Scrollbar.md @@ -0,0 +1,16 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for non-native scrollbars. + +> [!note] +> Custom scrollbars are only used on Windows and Linux. + +## CSS variables + +| Variable | Description | +| ----------------------------- | ----------------------------------------- | +| `--scrollbar-bg` | Scrollbar background color | +| `--scrollbar-thumb-bg` | Scrollbar thumb background color | +| `--scrollbar-active-thumb-bg` | Scrollbar thumb background color (active) | diff --git a/docs/obsidian-developer/Reference/CSS variables/Window/Sidebar.md b/docs/obsidian-developer/Reference/CSS variables/Window/Sidebar.md new file mode 100644 index 0000000000000000000000000000000000000000..0da4f60373d34bce016b36d826b877abdab5697c --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Window/Sidebar.md @@ -0,0 +1,12 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for the [Sidebar](https://help.obsidian.md/User+interface/Workspace/Sidebar). + +## CSS variables + +| Variable | Description | +| ------------------------------ | ------------------------------------------- | +| `--sidebar-markdown-font-size` | Font size for Markdown files in sidebars | +| `--sidebar-tab-text-display` | `display` property for tab text in sidebars | diff --git a/docs/obsidian-developer/Reference/CSS variables/Window/Status bar.md b/docs/obsidian-developer/Reference/CSS variables/Window/Status bar.md new file mode 100644 index 0000000000000000000000000000000000000000..2a1927d6858f0c5e242dcd3b004329a3f7be0779 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Window/Status bar.md @@ -0,0 +1,18 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for the [Status bar](https://help.obsidian.md/User+interface/Workspace/Status+bar). + +## CSS variables + +| Variable | Description | +| ----------------------------- | ------------------------------ | +| `--status-bar-background` | Status bar background color | +| `--status-bar-border-color` | Status bar border color | +| `--status-bar-border-width` | Status bar border width | +| `--status-bar-font-size` | Status bar font size | +| `--status-bar-text-color` | Status bar text color | +| `--status-bar-position` | Status bar `position` property | +| `--status-bar-radius` | Status bar radius | +| `--status-bar-scroll-padding` | Status bar scroll padding | diff --git a/docs/obsidian-developer/Reference/CSS variables/Window/Window frame.md b/docs/obsidian-developer/Reference/CSS variables/Window/Window frame.md new file mode 100644 index 0000000000000000000000000000000000000000..4ada4002751455632758d63bb169bb23f0641e94 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Window/Window frame.md @@ -0,0 +1,21 @@ +--- +cssClass: reference +--- + +This page lists CSS variables for the window frame, including the title bar. + +> [!note] +> To see the title bar, you need to change **Settings → Appearance → Window frame style** to **Obsidian frame**. + +## CSS variables + +| Variable | Description | +| ------------------------------- | ------------------------------------------ | +| `--titlebar-background` | Titlebar background color | +| `--titlebar-background-focused` | Titlebar background color (focused window) | +| `--titlebar-border-width` | Titlebar border width | +| `--titlebar-border-color` | Titlebar border color | +| `--titlebar-text-color` | Titlebar text color | +| `--titlebar-text-color-focused` | Titlebar text color (focused window) | +| `--titlebar-text-weight` | Titlebar font weight | +| `--header-height` | Default height for frame elements | diff --git a/docs/obsidian-developer/Reference/CSS variables/Window/Workspace.md b/docs/obsidian-developer/Reference/CSS variables/Window/Workspace.md new file mode 100644 index 0000000000000000000000000000000000000000..94062607b0717b6f32ea05f460ad8be243abcb50 --- /dev/null +++ b/docs/obsidian-developer/Reference/CSS variables/Window/Workspace.md @@ -0,0 +1,11 @@ +--- +cssClass: reference +--- + +This page lists CSS variables the workspace. + +## CSS variables + +| Variable | Description | +| ------------------------------------ | ---------------------------------- | +| `--workspace-background-translucent` | Background for translucent windows | diff --git a/docs/obsidian-developer/Reference/Manifest.md b/docs/obsidian-developer/Reference/Manifest.md new file mode 100644 index 0000000000000000000000000000000000000000..30a95c1e9cca0cc8af7d9c3b84badb36a2647c48 --- /dev/null +++ b/docs/obsidian-developer/Reference/Manifest.md @@ -0,0 +1,52 @@ +--- +cssClass: reference +--- + +This page describes the schema for the manifest, `manifest.json`. + +## Properties + +The following properties are available for both plugins and themes. + +| Property | Type | Required | Description | +| --------------- | ----------------------------------- | -------- | ------------------------------------------------------------------------------- | +| `author` | `string` | **Yes** | The author's name. | +| `minAppVersion` | `string` | **Yes** | The minimum required Obsidian version. | +| `name` | `string` | **Yes** | The display name. | +| `version` | `string` | **Yes** | The version, using [Semantic Versioning](https://semver.org/). | +| `authorUrl` | `string` | No | A URL to the author's website. | +| `fundingUrl` | `string` or [`object`](#fundingurl) | No | A URL or multiple URLs to where the users can support your project financially. | + +## Plugin-specific properties + +The following properties are only available to plugins. + +| Property | Type | Required | Description | +| --------------- | --------- | -------- | ------------------------------------------------- | +| `description` | `string` | **Yes** | A description of your plugin. | +| `id` | `string` | **Yes** | The ID of your plugin. | +| `isDesktopOnly` | `boolean` | **Yes** | Whether your plugin uses NodeJS or Electron APIs. | + +## fundingUrl + +`fundingUrl` can either be a string with a single URL, or an object with multiple URLs. + +**Single URL**: + +```json +{ + "fundingUrl": "https://buymeacoffee.com" +} +``` + +**Multiple URLs**: + +```json +{ + "fundingUrl": { + "Buy Me a Coffee": "https://buymeacoffee.com", + "GitHub Sponsor": "https://github.com/sponsors", + "Patreon": "https://www.patreon.com/" + } +} +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest.md new file mode 100644 index 0000000000000000000000000000000000000000..93244aeb9be7ac9c24b7188a37c2c44f215a277d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest.md @@ -0,0 +1,40 @@ +--- +aliases: "obsidian.AbstractInputSuggest.md" +cssclasses: hide-title +--- + + + +[`AbstractInputSuggest`](obsidian.AbstractInputSuggest.md) + +## AbstractInputSuggest class + +Attach to an element or a <div contentEditable> to add type-ahead support. + +**Signature:** + +```typescript +export abstract class AbstractInputSuggest extends PopoverSuggest +``` +**Extends:** [`PopoverSuggest`](obsidian.PopoverSuggest.md)`` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(app, textInputEl)`](obsidian.AbstractInputSuggest.(constructor).md) | | Accepts an <input> text box or a contenteditable div. | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`limit`](obsidian.AbstractInputSuggest.limit.md) | | number | Limit to the number of elements rendered at once. Set to 0 to disable. Defaults to 100. | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getValue()`](obsidian.AbstractInputSuggest.getValue.md) | | Gets the value from the input element. | +| [`onSelect(callback)`](obsidian.AbstractInputSuggest.onSelect.md) | | Registers a callback to handle when a suggestion is selected by the user. | +| [`setValue(value)`](obsidian.AbstractInputSuggest.setValue.md) | | Sets the value into the input element. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..9209f25baf02720e1c6648913b32517b04d2cb86 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/(constructor).md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.AbstractInputSuggest.(constructor).md" +cssclasses: hide-title +--- + + + +[`AbstractInputSuggest`](obsidian.AbstractInputSuggest.md) › [`(constructor)`](obsidian.AbstractInputSuggest.(constructor).md) + +## AbstractInputSuggest.(constructor) + +Accepts an `` text box or a contenteditable div. + +**Signature:** + +```typescript +constructor(app: App, textInputEl: HTMLInputElement | HTMLDivElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| app | [`App`](obsidian.App.md) | | +| textInputEl | HTMLInputElement | HTMLDivElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/getValue.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/getValue.md new file mode 100644 index 0000000000000000000000000000000000000000..2f345538c15db1d93c33a538dc85be32ab3bdad6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/getValue.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.AbstractInputSuggest.getValue.md" +cssclasses: hide-title +--- + + + +[`AbstractInputSuggest`](obsidian.AbstractInputSuggest.md) › [`getValue`](obsidian.AbstractInputSuggest.getValue.md) + +## AbstractInputSuggest.getValue() method + +Gets the value from the input element. + +**Signature:** + +```typescript +getValue(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/limit.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/limit.md new file mode 100644 index 0000000000000000000000000000000000000000..d5937f6465f2ec0809502e4741c127818adcfed6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/limit.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.AbstractInputSuggest.limit.md" +cssclasses: hide-title +--- + + + +[`AbstractInputSuggest`](obsidian.AbstractInputSuggest.md) › [`limit`](obsidian.AbstractInputSuggest.limit.md) + +## AbstractInputSuggest.limit property + +Limit to the number of elements rendered at once. Set to 0 to disable. Defaults to 100. + +**Signature:** + +```typescript +limit: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/onSelect.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/onSelect.md new file mode 100644 index 0000000000000000000000000000000000000000..746953afbb05265c156a151075980c501f04d7b8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/onSelect.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.AbstractInputSuggest.onSelect.md" +cssclasses: hide-title +--- + + + +[`AbstractInputSuggest`](obsidian.AbstractInputSuggest.md) › [`onSelect`](obsidian.AbstractInputSuggest.onSelect.md) + +## AbstractInputSuggest.onSelect() method + +Registers a callback to handle when a suggestion is selected by the user. + +**Signature:** + +```typescript +onSelect(callback: (value: T, evt: MouseEvent | KeyboardEvent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (value: T, evt: MouseEvent | KeyboardEvent) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/setValue.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/setValue.md new file mode 100644 index 0000000000000000000000000000000000000000..fd65c0823815c7af23caea6ef5d68537fcb98231 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractInputSuggest/setValue.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.AbstractInputSuggest.setValue.md" +cssclasses: hide-title +--- + + + +[`AbstractInputSuggest`](obsidian.AbstractInputSuggest.md) › [`setValue`](obsidian.AbstractInputSuggest.setValue.md) + +## AbstractInputSuggest.setValue() method + +Sets the value into the input element. + +**Signature:** + +```typescript +setValue(value: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | string | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..9e5838afad034a0d88a21a2bc7f8d565fffad168 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent.md @@ -0,0 +1,42 @@ +--- +aliases: "obsidian.AbstractTextComponent.md" +cssclasses: hide-title +--- + + + +[`AbstractTextComponent`](obsidian.AbstractTextComponent.md) + +## AbstractTextComponent class + + +**Signature:** + +```typescript +export class AbstractTextComponent extends ValueComponent +``` +**Extends:** [`ValueComponent`](obsidian.ValueComponent.md)`` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(inputEl)`](obsidian.AbstractTextComponent.(constructor).md) | | Constructs a new instance of the AbstractTextComponent class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`inputEl`](obsidian.AbstractTextComponent.inputEl.md) | | T | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getValue()`](obsidian.AbstractTextComponent.getValue.md) | | | +| [`onChange(callback)`](obsidian.AbstractTextComponent.onChange.md) | | | +| [`onChanged()`](obsidian.AbstractTextComponent.onChanged.md) | | | +| [`setDisabled(disabled)`](obsidian.AbstractTextComponent.setDisabled.md) | | | +| [`setPlaceholder(placeholder)`](obsidian.AbstractTextComponent.setPlaceholder.md) | | | +| [`setValue(value)`](obsidian.AbstractTextComponent.setValue.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..6ee1bde39edfdc9989844567cca7150169fe2d0e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.AbstractTextComponent.(constructor).md" +cssclasses: hide-title +--- + + + +[`AbstractTextComponent`](obsidian.AbstractTextComponent.md) › [`(constructor)`](obsidian.AbstractTextComponent.(constructor).md) + +## AbstractTextComponent.(constructor) + +Constructs a new instance of the `AbstractTextComponent` class + +**Signature:** + +```typescript +constructor(inputEl: T); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| inputEl | T | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/getValue.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/getValue.md new file mode 100644 index 0000000000000000000000000000000000000000..d95440e8b669b96bcf1135bef0167c1598880f1c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/getValue.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.AbstractTextComponent.getValue.md" +cssclasses: hide-title +--- + + + +[`AbstractTextComponent`](obsidian.AbstractTextComponent.md) › [`getValue`](obsidian.AbstractTextComponent.getValue.md) + +## AbstractTextComponent.getValue() method + + +**Signature:** + +```typescript +getValue(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/inputEl.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/inputEl.md new file mode 100644 index 0000000000000000000000000000000000000000..f77b127fc270c149684ed6a2756b85cd796000a6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/inputEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.AbstractTextComponent.inputEl.md" +cssclasses: hide-title +--- + + + +[`AbstractTextComponent`](obsidian.AbstractTextComponent.md) › [`inputEl`](obsidian.AbstractTextComponent.inputEl.md) + +## AbstractTextComponent.inputEl property + + +**Signature:** + +```typescript +inputEl: T; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/onChange.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/onChange.md new file mode 100644 index 0000000000000000000000000000000000000000..3047ebb3fbbe9cf895c750c5862bc0ad26599bc3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/onChange.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.AbstractTextComponent.onChange.md" +cssclasses: hide-title +--- + + + +[`AbstractTextComponent`](obsidian.AbstractTextComponent.md) › [`onChange`](obsidian.AbstractTextComponent.onChange.md) + +## AbstractTextComponent.onChange() method + + +**Signature:** + +```typescript +onChange(callback: (value: string) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (value: string) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/onChanged.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/onChanged.md new file mode 100644 index 0000000000000000000000000000000000000000..04827559fdc3c388ae8cf4d2e9e27c216970ca33 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/onChanged.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.AbstractTextComponent.onChanged.md" +cssclasses: hide-title +--- + + + +[`AbstractTextComponent`](obsidian.AbstractTextComponent.md) › [`onChanged`](obsidian.AbstractTextComponent.onChanged.md) + +## AbstractTextComponent.onChanged() method + + +**Signature:** + +```typescript +onChanged(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/setDisabled.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/setDisabled.md new file mode 100644 index 0000000000000000000000000000000000000000..a4a62bc0f5321306838cba07be3cf3cbf732b1d6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/setDisabled.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.AbstractTextComponent.setDisabled.md" +cssclasses: hide-title +--- + + + +[`AbstractTextComponent`](obsidian.AbstractTextComponent.md) › [`setDisabled`](obsidian.AbstractTextComponent.setDisabled.md) + +## AbstractTextComponent.setDisabled() method + + +**Signature:** + +```typescript +setDisabled(disabled: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| disabled | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/setPlaceholder.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/setPlaceholder.md new file mode 100644 index 0000000000000000000000000000000000000000..5b42df7008e723d3bfb45098422bddf2f621b1d2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/setPlaceholder.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.AbstractTextComponent.setPlaceholder.md" +cssclasses: hide-title +--- + + + +[`AbstractTextComponent`](obsidian.AbstractTextComponent.md) › [`setPlaceholder`](obsidian.AbstractTextComponent.setPlaceholder.md) + +## AbstractTextComponent.setPlaceholder() method + + +**Signature:** + +```typescript +setPlaceholder(placeholder: string): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| placeholder | string | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/setValue.md b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/setValue.md new file mode 100644 index 0000000000000000000000000000000000000000..71eeb44b7c87209a701dc08ae1f47ce8a02942fa --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/AbstractTextComponent/setValue.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.AbstractTextComponent.setValue.md" +cssclasses: hide-title +--- + + + +[`AbstractTextComponent`](obsidian.AbstractTextComponent.md) › [`setValue`](obsidian.AbstractTextComponent.setValue.md) + +## AbstractTextComponent.setValue() method + + +**Signature:** + +```typescript +setValue(value: string): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | string | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/App.md b/docs/obsidian-developer/Reference/TypeScript API/App.md new file mode 100644 index 0000000000000000000000000000000000000000..146b732f1bf2a032d1afb912de97fa1f7f5cbc21 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/App.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.App.md" +cssclasses: hide-title +--- + + + +[`App`](obsidian.App.md) + +## App class + + +**Signature:** + +```typescript +export class App +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`fileManager`](obsidian.App.fileManager.md) | | [`FileManager`](obsidian.FileManager.md) | | +| [`keymap`](obsidian.App.keymap.md) | | [`Keymap`](obsidian.Keymap.md) | | +| [`lastEvent`](obsidian.App.lastEvent.md) | | [`UserEvent`](obsidian.UserEvent.md) | null | The last known user interaction event, to help commands find out what modifier keys are pressed. | +| [`metadataCache`](obsidian.App.metadataCache.md) | | [`MetadataCache`](obsidian.MetadataCache.md) | | +| [`scope`](obsidian.App.scope.md) | | [`Scope`](obsidian.Scope.md) | | +| [`vault`](obsidian.App.vault.md) | | [`Vault`](obsidian.Vault.md) | | +| [`workspace`](obsidian.App.workspace.md) | | [`Workspace`](obsidian.Workspace.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/App/fileManager.md b/docs/obsidian-developer/Reference/TypeScript API/App/fileManager.md new file mode 100644 index 0000000000000000000000000000000000000000..68facedf14cd7679e7cb125659dde1e6a36e024a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/App/fileManager.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.App.fileManager.md" +cssclasses: hide-title +--- + + + +[`App`](obsidian.App.md) › [`fileManager`](obsidian.App.fileManager.md) + +## App.fileManager property + + +**Signature:** + +```typescript +fileManager: FileManager; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/App/keymap.md b/docs/obsidian-developer/Reference/TypeScript API/App/keymap.md new file mode 100644 index 0000000000000000000000000000000000000000..d8e03956fb7655ebac94f72a177e398a71e8c320 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/App/keymap.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.App.keymap.md" +cssclasses: hide-title +--- + + + +[`App`](obsidian.App.md) › [`keymap`](obsidian.App.keymap.md) + +## App.keymap property + + +**Signature:** + +```typescript +keymap: Keymap; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/App/lastEvent.md b/docs/obsidian-developer/Reference/TypeScript API/App/lastEvent.md new file mode 100644 index 0000000000000000000000000000000000000000..d51a9f99d2c55c9a4749ce563e717deda331fd8d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/App/lastEvent.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.App.lastEvent.md" +cssclasses: hide-title +--- + + + +[`App`](obsidian.App.md) › [`lastEvent`](obsidian.App.lastEvent.md) + +## App.lastEvent property + +The last known user interaction event, to help commands find out what modifier keys are pressed. + +**Signature:** + +```typescript +lastEvent: UserEvent | null; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/App/metadataCache.md b/docs/obsidian-developer/Reference/TypeScript API/App/metadataCache.md new file mode 100644 index 0000000000000000000000000000000000000000..7506a1c8c9848371ad7b1e07db6c8d184b6b612a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/App/metadataCache.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.App.metadataCache.md" +cssclasses: hide-title +--- + + + +[`App`](obsidian.App.md) › [`metadataCache`](obsidian.App.metadataCache.md) + +## App.metadataCache property + + +**Signature:** + +```typescript +metadataCache: MetadataCache; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/App/scope.md b/docs/obsidian-developer/Reference/TypeScript API/App/scope.md new file mode 100644 index 0000000000000000000000000000000000000000..2948467ced3ea74d65790caf9acf518bf48edc0f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/App/scope.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.App.scope.md" +cssclasses: hide-title +--- + + + +[`App`](obsidian.App.md) › [`scope`](obsidian.App.scope.md) + +## App.scope property + + +**Signature:** + +```typescript +scope: Scope; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/App/vault.md b/docs/obsidian-developer/Reference/TypeScript API/App/vault.md new file mode 100644 index 0000000000000000000000000000000000000000..452e369df7e72823058302a3e08096d882ee75ae --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/App/vault.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.App.vault.md" +cssclasses: hide-title +--- + + + +[`App`](obsidian.App.md) › [`vault`](obsidian.App.vault.md) + +## App.vault property + + +**Signature:** + +```typescript +vault: Vault; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/App/workspace.md b/docs/obsidian-developer/Reference/TypeScript API/App/workspace.md new file mode 100644 index 0000000000000000000000000000000000000000..0f716a3cda784c53a593993bc767e68359426bc5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/App/workspace.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.App.workspace.md" +cssclasses: hide-title +--- + + + +[`App`](obsidian.App.md) › [`workspace`](obsidian.App.workspace.md) + +## App.workspace property + + +**Signature:** + +```typescript +workspace: Workspace; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/BaseComponent.md b/docs/obsidian-developer/Reference/TypeScript API/BaseComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..a39fe709f14548230adc3a7966a0d4d530567a5d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/BaseComponent.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.BaseComponent.md" +cssclasses: hide-title +--- + + + +[`BaseComponent`](obsidian.BaseComponent.md) + +## BaseComponent class + + +**Signature:** + +```typescript +export abstract class BaseComponent +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`disabled`](obsidian.BaseComponent.disabled.md) | | boolean | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`setDisabled(disabled)`](obsidian.BaseComponent.setDisabled.md) | | | +| [`then(cb)`](obsidian.BaseComponent.then.md) | | Facilitates chaining | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/BaseComponent/disabled.md b/docs/obsidian-developer/Reference/TypeScript API/BaseComponent/disabled.md new file mode 100644 index 0000000000000000000000000000000000000000..c879bc672a28e7f36ff696acdca563999cb19b86 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/BaseComponent/disabled.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.BaseComponent.disabled.md" +cssclasses: hide-title +--- + + + +[`BaseComponent`](obsidian.BaseComponent.md) › [`disabled`](obsidian.BaseComponent.disabled.md) + +## BaseComponent.disabled property + + +**Signature:** + +```typescript +disabled: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/BaseComponent/setDisabled.md b/docs/obsidian-developer/Reference/TypeScript API/BaseComponent/setDisabled.md new file mode 100644 index 0000000000000000000000000000000000000000..6c82685b08babe395dd024c7f19747021ab33bd4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/BaseComponent/setDisabled.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.BaseComponent.setDisabled.md" +cssclasses: hide-title +--- + + + +[`BaseComponent`](obsidian.BaseComponent.md) › [`setDisabled`](obsidian.BaseComponent.setDisabled.md) + +## BaseComponent.setDisabled() method + + +**Signature:** + +```typescript +setDisabled(disabled: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| disabled | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/BaseComponent/then.md b/docs/obsidian-developer/Reference/TypeScript API/BaseComponent/then.md new file mode 100644 index 0000000000000000000000000000000000000000..9d8cd8b598098e507e4f958813211e5b757d8382 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/BaseComponent/then.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.BaseComponent.then.md" +cssclasses: hide-title +--- + + + +[`BaseComponent`](obsidian.BaseComponent.md) › [`then`](obsidian.BaseComponent.then.md) + +## BaseComponent.then() method + +Facilitates chaining + +**Signature:** + +```typescript +then(cb: (component: this) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: this) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/BlockCache.md b/docs/obsidian-developer/Reference/TypeScript API/BlockCache.md new file mode 100644 index 0000000000000000000000000000000000000000..978252b5f33c162431378e4f1fab5eae9beb0abd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/BlockCache.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.BlockCache.md" +cssclasses: hide-title +--- + + + +[`BlockCache`](obsidian.BlockCache.md) + +## BlockCache interface + + +**Signature:** + +```typescript +export interface BlockCache extends CacheItem +``` +**Extends:** [`CacheItem`](obsidian.CacheItem.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`id`](obsidian.BlockCache.id.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/BlockCache/id.md b/docs/obsidian-developer/Reference/TypeScript API/BlockCache/id.md new file mode 100644 index 0000000000000000000000000000000000000000..e75b60e1b5f915313038387baa255e371b761cc6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/BlockCache/id.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.BlockCache.id.md" +cssclasses: hide-title +--- + + + +[`BlockCache`](obsidian.BlockCache.md) › [`id`](obsidian.BlockCache.id.md) + +## BlockCache.id property + + +**Signature:** + +```typescript +id: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult.md b/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult.md new file mode 100644 index 0000000000000000000000000000000000000000..a9daa6e904ab5148080b334b42c14dbf79676659 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.BlockSubpathResult.md" +cssclasses: hide-title +--- + + + +[`BlockSubpathResult`](obsidian.BlockSubpathResult.md) + +## BlockSubpathResult interface + + +**Signature:** + +```typescript +export interface BlockSubpathResult extends SubpathResult +``` +**Extends:** [`SubpathResult`](obsidian.SubpathResult.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`block`](obsidian.BlockSubpathResult.block.md) | | [`BlockCache`](obsidian.BlockCache.md) | | +| [`list?`](obsidian.BlockSubpathResult.list.md) | | [`ListItemCache`](obsidian.ListItemCache.md) | _(Optional)_ | +| [`type`](obsidian.BlockSubpathResult.type.md) | | 'block' | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult/block.md b/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult/block.md new file mode 100644 index 0000000000000000000000000000000000000000..7cc2a6e772693181b88b685552967f11621a1224 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult/block.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.BlockSubpathResult.block.md" +cssclasses: hide-title +--- + + + +[`BlockSubpathResult`](obsidian.BlockSubpathResult.md) › [`block`](obsidian.BlockSubpathResult.block.md) + +## BlockSubpathResult.block property + + +**Signature:** + +```typescript +block: BlockCache; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult/list.md b/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult/list.md new file mode 100644 index 0000000000000000000000000000000000000000..af1b8d1fdc4cf125147d28fdc0e612d07c435579 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult/list.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.BlockSubpathResult.list.md" +cssclasses: hide-title +--- + + + +[`BlockSubpathResult`](obsidian.BlockSubpathResult.md) › [`list`](obsidian.BlockSubpathResult.list.md) + +## BlockSubpathResult.list property + + +**Signature:** + +```typescript +list?: ListItemCache; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult/type.md b/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult/type.md new file mode 100644 index 0000000000000000000000000000000000000000..510c804173f9ebe2486179c0919c5b21b0de6fc6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/BlockSubpathResult/type.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.BlockSubpathResult.type.md" +cssclasses: hide-title +--- + + + +[`BlockSubpathResult`](obsidian.BlockSubpathResult.md) › [`type`](obsidian.BlockSubpathResult.type.md) + +## BlockSubpathResult.type property + + +**Signature:** + +```typescript +type: 'block'; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent.md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..5c529358ff3a738367ec91d135bf380f06787252 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent.md @@ -0,0 +1,45 @@ +--- +aliases: "obsidian.ButtonComponent.md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) + +## ButtonComponent class + + +**Signature:** + +```typescript +export class ButtonComponent extends BaseComponent +``` +**Extends:** [`BaseComponent`](obsidian.BaseComponent.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.ButtonComponent.(constructor).md) | | Constructs a new instance of the ButtonComponent class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`buttonEl`](obsidian.ButtonComponent.buttonEl.md) | | HTMLButtonElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`onClick(callback)`](obsidian.ButtonComponent.onClick.md) | | | +| [`removeCta()`](obsidian.ButtonComponent.removeCta.md) | | | +| [`setButtonText(name)`](obsidian.ButtonComponent.setButtonText.md) | | | +| [`setClass(cls)`](obsidian.ButtonComponent.setClass.md) | | | +| [`setCta()`](obsidian.ButtonComponent.setCta.md) | | | +| [`setDisabled(disabled)`](obsidian.ButtonComponent.setDisabled.md) | | | +| [`setIcon(icon)`](obsidian.ButtonComponent.setIcon.md) | | | +| [`setTooltip(tooltip, options)`](obsidian.ButtonComponent.setTooltip.md) | | | +| [`setWarning()`](obsidian.ButtonComponent.setWarning.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..90ca387ac366593800300cafda454a3a340195b3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.ButtonComponent.(constructor).md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) › [`(constructor)`](obsidian.ButtonComponent.(constructor).md) + +## ButtonComponent.(constructor) + +Constructs a new instance of the `ButtonComponent` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/buttonEl.md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/buttonEl.md new file mode 100644 index 0000000000000000000000000000000000000000..e5f31bad67fa0b37ca44cdd9352e2815dd2c89cf --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/buttonEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ButtonComponent.buttonEl.md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) › [`buttonEl`](obsidian.ButtonComponent.buttonEl.md) + +## ButtonComponent.buttonEl property + + +**Signature:** + +```typescript +buttonEl: HTMLButtonElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/onClick.md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/onClick.md new file mode 100644 index 0000000000000000000000000000000000000000..903b330c039fae4284593081a024d90c0a136e83 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/onClick.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ButtonComponent.onClick.md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) › [`onClick`](obsidian.ButtonComponent.onClick.md) + +## ButtonComponent.onClick() method + + +**Signature:** + +```typescript +onClick(callback: (evt: MouseEvent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (evt: MouseEvent) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/removeCta.md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/removeCta.md new file mode 100644 index 0000000000000000000000000000000000000000..fac9bb94bfef0b4329cf7fc02ac05d39119c893f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/removeCta.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.ButtonComponent.removeCta.md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) › [`removeCta`](obsidian.ButtonComponent.removeCta.md) + +## ButtonComponent.removeCta() method + + +**Signature:** + +```typescript +removeCta(): this; +``` +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setButtonText.md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setButtonText.md new file mode 100644 index 0000000000000000000000000000000000000000..8d3d223d5f4b8d67f1981de295a9533432faf71a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setButtonText.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ButtonComponent.setButtonText.md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) › [`setButtonText`](obsidian.ButtonComponent.setButtonText.md) + +## ButtonComponent.setButtonText() method + + +**Signature:** + +```typescript +setButtonText(name: string): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setClass.md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setClass.md new file mode 100644 index 0000000000000000000000000000000000000000..a187c7428072174c74f4a85642cf5a6d19fbe310 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setClass.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ButtonComponent.setClass.md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) › [`setClass`](obsidian.ButtonComponent.setClass.md) + +## ButtonComponent.setClass() method + + +**Signature:** + +```typescript +setClass(cls: string): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cls | string | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setCta.md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setCta.md new file mode 100644 index 0000000000000000000000000000000000000000..5c1d7ff6d9dddb37d9f91ee76228e5ff1a453bf4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setCta.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.ButtonComponent.setCta.md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) › [`setCta`](obsidian.ButtonComponent.setCta.md) + +## ButtonComponent.setCta() method + + +**Signature:** + +```typescript +setCta(): this; +``` +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setDisabled.md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setDisabled.md new file mode 100644 index 0000000000000000000000000000000000000000..e9b7590b89cb4cfe435020dfab5b72bbb5ffbc98 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setDisabled.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ButtonComponent.setDisabled.md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) › [`setDisabled`](obsidian.ButtonComponent.setDisabled.md) + +## ButtonComponent.setDisabled() method + + +**Signature:** + +```typescript +setDisabled(disabled: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| disabled | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setIcon.md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setIcon.md new file mode 100644 index 0000000000000000000000000000000000000000..9140bf3799df5f562c596d4df3d61a1e82b055cb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setIcon.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ButtonComponent.setIcon.md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) › [`setIcon`](obsidian.ButtonComponent.setIcon.md) + +## ButtonComponent.setIcon() method + + +**Signature:** + +```typescript +setIcon(icon: IconName): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| icon | [`IconName`](obsidian.IconName.md) | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setTooltip.md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setTooltip.md new file mode 100644 index 0000000000000000000000000000000000000000..834fb7058e81d64e822a202ac3955f437f714d68 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setTooltip.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.ButtonComponent.setTooltip.md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) › [`setTooltip`](obsidian.ButtonComponent.setTooltip.md) + +## ButtonComponent.setTooltip() method + + +**Signature:** + +```typescript +setTooltip(tooltip: string, options?: TooltipOptions): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| tooltip | string | | +| options | [`TooltipOptions`](obsidian.TooltipOptions.md) | _(Optional)_ | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setWarning.md b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setWarning.md new file mode 100644 index 0000000000000000000000000000000000000000..5faff2c612d3e8e272cfeea25de7b1d57a6c1072 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ButtonComponent/setWarning.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.ButtonComponent.setWarning.md" +cssclasses: hide-title +--- + + + +[`ButtonComponent`](obsidian.ButtonComponent.md) › [`setWarning`](obsidian.ButtonComponent.setWarning.md) + +## ButtonComponent.setWarning() method + + +**Signature:** + +```typescript +setWarning(): this; +``` +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/CacheItem.md b/docs/obsidian-developer/Reference/TypeScript API/CacheItem.md new file mode 100644 index 0000000000000000000000000000000000000000..bd57b1e44d69423a539f91d7ad13d8dbae68447f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CacheItem.md @@ -0,0 +1,24 @@ +--- +aliases: "obsidian.CacheItem.md" +cssclasses: hide-title +--- + + + +[`CacheItem`](obsidian.CacheItem.md) + +## CacheItem interface + + +**Signature:** + +```typescript +export interface CacheItem +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`position`](obsidian.CacheItem.position.md) | | [`Pos`](obsidian.Pos.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/CacheItem/position.md b/docs/obsidian-developer/Reference/TypeScript API/CacheItem/position.md new file mode 100644 index 0000000000000000000000000000000000000000..9f8d45b7a36721382bfb0c0fddc8bc093bf6c18c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CacheItem/position.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.CacheItem.position.md" +cssclasses: hide-title +--- + + + +[`CacheItem`](obsidian.CacheItem.md) › [`position`](obsidian.CacheItem.position.md) + +## CacheItem.position property + + +**Signature:** + +```typescript +position: Pos; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata.md b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata.md new file mode 100644 index 0000000000000000000000000000000000000000..2d6c040b7775d2ba2d204b1abce9fde0812fa404 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.CachedMetadata.md" +cssclasses: hide-title +--- + + + +[`CachedMetadata`](obsidian.CachedMetadata.md) + +## CachedMetadata interface + + +**Signature:** + +```typescript +export interface CachedMetadata +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`blocks?`](obsidian.CachedMetadata.blocks.md) | | Record<string, [`BlockCache`](obsidian.BlockCache.md)> | _(Optional)_ | +| [`embeds?`](obsidian.CachedMetadata.embeds.md) | | [`EmbedCache`](obsidian.EmbedCache.md)[] | _(Optional)_ | +| [`frontmatter?`](obsidian.CachedMetadata.frontmatter.md) | | [`FrontMatterCache`](obsidian.FrontMatterCache.md) | _(Optional)_ | +| [`frontmatterLinks?`](obsidian.CachedMetadata.frontmatterLinks.md) | | [`FrontmatterLinkCache`](obsidian.FrontmatterLinkCache.md)[] | _(Optional)_ | +| [`frontmatterPosition?`](obsidian.CachedMetadata.frontmatterPosition.md) | | [`Pos`](obsidian.Pos.md) | _(Optional)_ | +| [`headings?`](obsidian.CachedMetadata.headings.md) | | [`HeadingCache`](obsidian.HeadingCache.md)[] | _(Optional)_ | +| [`links?`](obsidian.CachedMetadata.links.md) | | [`LinkCache`](obsidian.LinkCache.md)[] | _(Optional)_ | +| [`listItems?`](obsidian.CachedMetadata.listItems.md) | | [`ListItemCache`](obsidian.ListItemCache.md)[] | _(Optional)_ | +| [`sections?`](obsidian.CachedMetadata.sections.md) | | [`SectionCache`](obsidian.SectionCache.md)[] | _(Optional)_ Sections are root level markdown blocks, which can be used to divide the document up. | +| [`tags?`](obsidian.CachedMetadata.tags.md) | | [`TagCache`](obsidian.TagCache.md)[] | _(Optional)_ | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/blocks.md b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/blocks.md new file mode 100644 index 0000000000000000000000000000000000000000..eb3de0e1c420e4aef037c0cd58b18399b7872c51 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/blocks.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.CachedMetadata.blocks.md" +cssclasses: hide-title +--- + + + +[`CachedMetadata`](obsidian.CachedMetadata.md) › [`blocks`](obsidian.CachedMetadata.blocks.md) + +## CachedMetadata.blocks property + + +**Signature:** + +```typescript +blocks?: Record; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/embeds.md b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/embeds.md new file mode 100644 index 0000000000000000000000000000000000000000..3308af514667d372302cf4a1230c597cefe185af --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/embeds.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.CachedMetadata.embeds.md" +cssclasses: hide-title +--- + + + +[`CachedMetadata`](obsidian.CachedMetadata.md) › [`embeds`](obsidian.CachedMetadata.embeds.md) + +## CachedMetadata.embeds property + + +**Signature:** + +```typescript +embeds?: EmbedCache[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/frontmatter.md b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/frontmatter.md new file mode 100644 index 0000000000000000000000000000000000000000..58eec2d85e20543f967debbcf791de45b8789402 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/frontmatter.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.CachedMetadata.frontmatter.md" +cssclasses: hide-title +--- + + + +[`CachedMetadata`](obsidian.CachedMetadata.md) › [`frontmatter`](obsidian.CachedMetadata.frontmatter.md) + +## CachedMetadata.frontmatter property + + +**Signature:** + +```typescript +frontmatter?: FrontMatterCache; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/frontmatterLinks.md b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/frontmatterLinks.md new file mode 100644 index 0000000000000000000000000000000000000000..57aa96179192130ddc5055245b6b56163e488df5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/frontmatterLinks.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.CachedMetadata.frontmatterLinks.md" +cssclasses: hide-title +--- + + + +[`CachedMetadata`](obsidian.CachedMetadata.md) › [`frontmatterLinks`](obsidian.CachedMetadata.frontmatterLinks.md) + +## CachedMetadata.frontmatterLinks property + + +**Signature:** + +```typescript +frontmatterLinks?: FrontmatterLinkCache[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/frontmatterPosition.md b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/frontmatterPosition.md new file mode 100644 index 0000000000000000000000000000000000000000..8382c8ddce6d99fd4e165f4c5b461105d4857e35 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/frontmatterPosition.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.CachedMetadata.frontmatterPosition.md" +cssclasses: hide-title +--- + + + +[`CachedMetadata`](obsidian.CachedMetadata.md) › [`frontmatterPosition`](obsidian.CachedMetadata.frontmatterPosition.md) + +## CachedMetadata.frontmatterPosition property + + +**Signature:** + +```typescript +frontmatterPosition?: Pos; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/headings.md b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/headings.md new file mode 100644 index 0000000000000000000000000000000000000000..d8e86785351026971502b6dd422f4307aac15412 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/headings.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.CachedMetadata.headings.md" +cssclasses: hide-title +--- + + + +[`CachedMetadata`](obsidian.CachedMetadata.md) › [`headings`](obsidian.CachedMetadata.headings.md) + +## CachedMetadata.headings property + + +**Signature:** + +```typescript +headings?: HeadingCache[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/links.md b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/links.md new file mode 100644 index 0000000000000000000000000000000000000000..9a801ee67941c7d2aff37b533dd05dbf845900f5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/links.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.CachedMetadata.links.md" +cssclasses: hide-title +--- + + + +[`CachedMetadata`](obsidian.CachedMetadata.md) › [`links`](obsidian.CachedMetadata.links.md) + +## CachedMetadata.links property + + +**Signature:** + +```typescript +links?: LinkCache[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/listItems.md b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/listItems.md new file mode 100644 index 0000000000000000000000000000000000000000..e5a28e9c6be39e748da9ec8874ff9ec1175577b3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/listItems.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.CachedMetadata.listItems.md" +cssclasses: hide-title +--- + + + +[`CachedMetadata`](obsidian.CachedMetadata.md) › [`listItems`](obsidian.CachedMetadata.listItems.md) + +## CachedMetadata.listItems property + + +**Signature:** + +```typescript +listItems?: ListItemCache[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/sections.md b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/sections.md new file mode 100644 index 0000000000000000000000000000000000000000..a31e56cea0ee02109c24c51b1c4d102fd5172233 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/sections.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.CachedMetadata.sections.md" +cssclasses: hide-title +--- + + + +[`CachedMetadata`](obsidian.CachedMetadata.md) › [`sections`](obsidian.CachedMetadata.sections.md) + +## CachedMetadata.sections property + +Sections are root level markdown blocks, which can be used to divide the document up. + +**Signature:** + +```typescript +sections?: SectionCache[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/tags.md b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/tags.md new file mode 100644 index 0000000000000000000000000000000000000000..301abd73d45bb8c3e82b11ec81d2ccd8ce2c9622 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CachedMetadata/tags.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.CachedMetadata.tags.md" +cssclasses: hide-title +--- + + + +[`CachedMetadata`](obsidian.CachedMetadata.md) › [`tags`](obsidian.CachedMetadata.tags.md) + +## CachedMetadata.tags property + + +**Signature:** + +```typescript +tags?: TagCache[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/CloseableComponent.md b/docs/obsidian-developer/Reference/TypeScript API/CloseableComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..c92e77ca87761ffbca0e6464470fdd4d13aa1624 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CloseableComponent.md @@ -0,0 +1,24 @@ +--- +aliases: "obsidian.CloseableComponent.md" +cssclasses: hide-title +--- + + + +[`CloseableComponent`](obsidian.CloseableComponent.md) + +## CloseableComponent interface + + +**Signature:** + +```typescript +export interface CloseableComponent +``` + +## Methods + +| Method | Description | +| --- | --- | +| [`close()`](obsidian.CloseableComponent.close.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/CloseableComponent/close.md b/docs/obsidian-developer/Reference/TypeScript API/CloseableComponent/close.md new file mode 100644 index 0000000000000000000000000000000000000000..3f3dc61078de10f56462e2fd64c9c7757d6d273a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/CloseableComponent/close.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.CloseableComponent.close.md" +cssclasses: hide-title +--- + + + +[`CloseableComponent`](obsidian.CloseableComponent.md) › [`close`](obsidian.CloseableComponent.close.md) + +## CloseableComponent.close() method + + +**Signature:** + +```typescript +close(): any; +``` +**Returns:** + +`any` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ColorComponent.md b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..a783a5f9b8114273550ca2fe073fac9866bd142c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent.md @@ -0,0 +1,39 @@ +--- +aliases: "obsidian.ColorComponent.md" +cssclasses: hide-title +--- + + + +[`ColorComponent`](obsidian.ColorComponent.md) + +## ColorComponent class + +Color picker component. Values are by default 6-digit hash-prefixed hex strings like `#000000`. + +**Signature:** + +```typescript +export class ColorComponent extends ValueComponent +``` +**Extends:** [`ValueComponent`](obsidian.ValueComponent.md)`` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.ColorComponent.(constructor).md) | | Constructs a new instance of the ColorComponent class | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getValue()`](obsidian.ColorComponent.getValue.md) | | | +| [`getValueHsl()`](obsidian.ColorComponent.getValueHsl.md) | | | +| [`getValueRgb()`](obsidian.ColorComponent.getValueRgb.md) | | | +| [`onChange(callback)`](obsidian.ColorComponent.onChange.md) | | | +| [`setDisabled(disabled)`](obsidian.ColorComponent.setDisabled.md) | | | +| [`setValue(value)`](obsidian.ColorComponent.setValue.md) | | | +| [`setValueHsl(hsl)`](obsidian.ColorComponent.setValueHsl.md) | | | +| [`setValueRgb(rgb)`](obsidian.ColorComponent.setValueRgb.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..a355ec8ac47f83289ce2c565821249496e27bb69 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.ColorComponent.(constructor).md" +cssclasses: hide-title +--- + + + +[`ColorComponent`](obsidian.ColorComponent.md) › [`(constructor)`](obsidian.ColorComponent.(constructor).md) + +## ColorComponent.(constructor) + +Constructs a new instance of the `ColorComponent` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/getValue.md b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/getValue.md new file mode 100644 index 0000000000000000000000000000000000000000..dc0a1beba485227adefe4e81793257014d871faf --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/getValue.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.ColorComponent.getValue.md" +cssclasses: hide-title +--- + + + +[`ColorComponent`](obsidian.ColorComponent.md) › [`getValue`](obsidian.ColorComponent.getValue.md) + +## ColorComponent.getValue() method + + +**Signature:** + +```typescript +getValue(): HexString; +``` +**Returns:** + +[`HexString`](obsidian.HexString.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/getValueHsl.md b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/getValueHsl.md new file mode 100644 index 0000000000000000000000000000000000000000..ee6e81fb7b4c05a715e8b559a68fbdd816b6ad28 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/getValueHsl.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.ColorComponent.getValueHsl.md" +cssclasses: hide-title +--- + + + +[`ColorComponent`](obsidian.ColorComponent.md) › [`getValueHsl`](obsidian.ColorComponent.getValueHsl.md) + +## ColorComponent.getValueHsl() method + + +**Signature:** + +```typescript +getValueHsl(): HSL; +``` +**Returns:** + +[`HSL`](obsidian.HSL.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/getValueRgb.md b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/getValueRgb.md new file mode 100644 index 0000000000000000000000000000000000000000..485254760d5c14ec114c16e690d4ba10d9e86f98 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/getValueRgb.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.ColorComponent.getValueRgb.md" +cssclasses: hide-title +--- + + + +[`ColorComponent`](obsidian.ColorComponent.md) › [`getValueRgb`](obsidian.ColorComponent.getValueRgb.md) + +## ColorComponent.getValueRgb() method + + +**Signature:** + +```typescript +getValueRgb(): RGB; +``` +**Returns:** + +[`RGB`](obsidian.RGB.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/onChange.md b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/onChange.md new file mode 100644 index 0000000000000000000000000000000000000000..a6a88d8073fa285420a8a6b049bd46a602005c3d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/onChange.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ColorComponent.onChange.md" +cssclasses: hide-title +--- + + + +[`ColorComponent`](obsidian.ColorComponent.md) › [`onChange`](obsidian.ColorComponent.onChange.md) + +## ColorComponent.onChange() method + + +**Signature:** + +```typescript +onChange(callback: (value: string) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (value: string) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setDisabled.md b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setDisabled.md new file mode 100644 index 0000000000000000000000000000000000000000..93383f541557f61556c5674bd2ffb471f26c722b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setDisabled.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ColorComponent.setDisabled.md" +cssclasses: hide-title +--- + + + +[`ColorComponent`](obsidian.ColorComponent.md) › [`setDisabled`](obsidian.ColorComponent.setDisabled.md) + +## ColorComponent.setDisabled() method + + +**Signature:** + +```typescript +setDisabled(disabled: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| disabled | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setValue.md b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setValue.md new file mode 100644 index 0000000000000000000000000000000000000000..5034f6ae21131ddd0e312759430fa0f646bb3d55 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setValue.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ColorComponent.setValue.md" +cssclasses: hide-title +--- + + + +[`ColorComponent`](obsidian.ColorComponent.md) › [`setValue`](obsidian.ColorComponent.setValue.md) + +## ColorComponent.setValue() method + + +**Signature:** + +```typescript +setValue(value: HexString): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | [`HexString`](obsidian.HexString.md) | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setValueHsl.md b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setValueHsl.md new file mode 100644 index 0000000000000000000000000000000000000000..affa8865f60a07ec888bc0b801f8069bb1b3ca07 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setValueHsl.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ColorComponent.setValueHsl.md" +cssclasses: hide-title +--- + + + +[`ColorComponent`](obsidian.ColorComponent.md) › [`setValueHsl`](obsidian.ColorComponent.setValueHsl.md) + +## ColorComponent.setValueHsl() method + + +**Signature:** + +```typescript +setValueHsl(hsl: HSL): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| hsl | [`HSL`](obsidian.HSL.md) | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setValueRgb.md b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setValueRgb.md new file mode 100644 index 0000000000000000000000000000000000000000..f87a83e6d174f5108d1460b49372d7ffeccbf29a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ColorComponent/setValueRgb.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ColorComponent.setValueRgb.md" +cssclasses: hide-title +--- + + + +[`ColorComponent`](obsidian.ColorComponent.md) › [`setValueRgb`](obsidian.ColorComponent.setValueRgb.md) + +## ColorComponent.setValueRgb() method + + +**Signature:** + +```typescript +setValueRgb(rgb: RGB): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| rgb | [`RGB`](obsidian.RGB.md) | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Command.md b/docs/obsidian-developer/Reference/TypeScript API/Command.md new file mode 100644 index 0000000000000000000000000000000000000000..cd25c9d04a131a4e996e4ce2f7287a20dd3327f9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Command.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.Command.md" +cssclasses: hide-title +--- + + + +[`Command`](obsidian.Command.md) + +## Command interface + + +**Signature:** + +```typescript +export interface Command +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`callback?`](obsidian.Command.callback.md) | | () => any | _(Optional)_ Simple callback, triggered globally. | +| [`checkCallback?`](obsidian.Command.checkCallback.md) | | (checking: boolean) => boolean | void | _(Optional)_ Complex callback, overrides the simple callback. Used to "check" whether your command can be performed in the current circumstances. For example, if your command requires the active focused pane to be a MarkdownSourceView, then you should only return true if the condition is satisfied. Returning false or undefined causes the command to be hidden from the command palette. | +| [`editorCallback?`](obsidian.Command.editorCallback.md) | | (editor: [`Editor`](obsidian.Editor.md), ctx: [`MarkdownView`](obsidian.MarkdownView.md) | [`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md)) => any | _(Optional)_ A command callback that is only triggered when the user is in an editor. Overrides callback and checkCallback | +| [`editorCheckCallback?`](obsidian.Command.editorCheckCallback.md) | | (checking: boolean, editor: [`Editor`](obsidian.Editor.md), ctx: [`MarkdownView`](obsidian.MarkdownView.md) | [`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md)) => boolean | void | _(Optional)_ A command callback that is only triggered when the user is in an editor. Overrides editorCallback, callback and checkCallback | +| [`hotkeys?`](obsidian.Command.hotkeys.md) | | [`Hotkey`](obsidian.Hotkey.md)[] | _(Optional)_ Sets the default hotkey. It is recommended for plugins to avoid setting default hotkeys if possible, to avoid conflicting hotkeys with one that's set by the user, even though customized hotkeys have higher priority. | +| [`icon?`](obsidian.Command.icon.md) | | [`IconName`](obsidian.IconName.md) | _(Optional)_ Icon ID to be used in the toolbar. | +| [`id`](obsidian.Command.id.md) | | string | Globally unique ID to identify this command. | +| [`mobileOnly?`](obsidian.Command.mobileOnly.md) | | boolean | _(Optional)_ | +| [`name`](obsidian.Command.name.md) | | string | Human friendly name for searching. | +| [`repeatable?`](obsidian.Command.repeatable.md) | | boolean | _(Optional)_ Whether holding the hotkey should repeatedly trigger this command. Defaults to false. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Command/callback.md b/docs/obsidian-developer/Reference/TypeScript API/Command/callback.md new file mode 100644 index 0000000000000000000000000000000000000000..7e75f40340ffcdb1f8b1a90a739c6e836f5b359c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Command/callback.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Command.callback.md" +cssclasses: hide-title +--- + + + +[`Command`](obsidian.Command.md) › [`callback`](obsidian.Command.callback.md) + +## Command.callback property + +Simple callback, triggered globally. + +**Signature:** + +```typescript +callback?: () => any; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Command/checkCallback.md b/docs/obsidian-developer/Reference/TypeScript API/Command/checkCallback.md new file mode 100644 index 0000000000000000000000000000000000000000..83b5246bd0114d6a2eca0dccfcfa7bd996a6d5a7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Command/checkCallback.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Command.checkCallback.md" +cssclasses: hide-title +--- + + + +[`Command`](obsidian.Command.md) › [`checkCallback`](obsidian.Command.checkCallback.md) + +## Command.checkCallback property + +Complex callback, overrides the simple callback. Used to "check" whether your command can be performed in the current circumstances. For example, if your command requires the active focused pane to be a MarkdownSourceView, then you should only return true if the condition is satisfied. Returning false or undefined causes the command to be hidden from the command palette. + +**Signature:** + +```typescript +checkCallback?: (checking: boolean) => boolean | void; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Command/editorCallback.md b/docs/obsidian-developer/Reference/TypeScript API/Command/editorCallback.md new file mode 100644 index 0000000000000000000000000000000000000000..9c1b423974bc89918a03540b172fc6670f99531e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Command/editorCallback.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Command.editorCallback.md" +cssclasses: hide-title +--- + + + +[`Command`](obsidian.Command.md) › [`editorCallback`](obsidian.Command.editorCallback.md) + +## Command.editorCallback property + +A command callback that is only triggered when the user is in an editor. Overrides `callback` and `checkCallback` + +**Signature:** + +```typescript +editorCallback?: (editor: Editor, ctx: MarkdownView | MarkdownFileInfo) => any; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Command/editorCheckCallback.md b/docs/obsidian-developer/Reference/TypeScript API/Command/editorCheckCallback.md new file mode 100644 index 0000000000000000000000000000000000000000..da41da8134f9df467591e5a5dce59a47c9807493 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Command/editorCheckCallback.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Command.editorCheckCallback.md" +cssclasses: hide-title +--- + + + +[`Command`](obsidian.Command.md) › [`editorCheckCallback`](obsidian.Command.editorCheckCallback.md) + +## Command.editorCheckCallback property + +A command callback that is only triggered when the user is in an editor. Overrides `editorCallback`, `callback` and `checkCallback` + +**Signature:** + +```typescript +editorCheckCallback?: (checking: boolean, editor: Editor, ctx: MarkdownView | MarkdownFileInfo) => boolean | void; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Command/hotkeys.md b/docs/obsidian-developer/Reference/TypeScript API/Command/hotkeys.md new file mode 100644 index 0000000000000000000000000000000000000000..53e847ad6aaca55ac9028671fd3a27805222e8fc --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Command/hotkeys.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Command.hotkeys.md" +cssclasses: hide-title +--- + + + +[`Command`](obsidian.Command.md) › [`hotkeys`](obsidian.Command.hotkeys.md) + +## Command.hotkeys property + +Sets the default hotkey. It is recommended for plugins to avoid setting default hotkeys if possible, to avoid conflicting hotkeys with one that's set by the user, even though customized hotkeys have higher priority. + +**Signature:** + +```typescript +hotkeys?: Hotkey[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Command/icon.md b/docs/obsidian-developer/Reference/TypeScript API/Command/icon.md new file mode 100644 index 0000000000000000000000000000000000000000..b8dff34c3b237fda8a7c16cc5553cdb71640b8d7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Command/icon.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Command.icon.md" +cssclasses: hide-title +--- + + + +[`Command`](obsidian.Command.md) › [`icon`](obsidian.Command.icon.md) + +## Command.icon property + +Icon ID to be used in the toolbar. + +**Signature:** + +```typescript +icon?: IconName; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Command/id.md b/docs/obsidian-developer/Reference/TypeScript API/Command/id.md new file mode 100644 index 0000000000000000000000000000000000000000..b02e5b2cb8ecebcfea7416d243578142b9a3fb83 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Command/id.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Command.id.md" +cssclasses: hide-title +--- + + + +[`Command`](obsidian.Command.md) › [`id`](obsidian.Command.id.md) + +## Command.id property + +Globally unique ID to identify this command. + +**Signature:** + +```typescript +id: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Command/mobileOnly.md b/docs/obsidian-developer/Reference/TypeScript API/Command/mobileOnly.md new file mode 100644 index 0000000000000000000000000000000000000000..b3642381dd0751f71af6174d091b95cb4839746f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Command/mobileOnly.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Command.mobileOnly.md" +cssclasses: hide-title +--- + + + +[`Command`](obsidian.Command.md) › [`mobileOnly`](obsidian.Command.mobileOnly.md) + +## Command.mobileOnly property + + +**Signature:** + +```typescript +mobileOnly?: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Command/name.md b/docs/obsidian-developer/Reference/TypeScript API/Command/name.md new file mode 100644 index 0000000000000000000000000000000000000000..6b89a25a7b8b452a7055dc120445b90a3d2e166a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Command/name.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Command.name.md" +cssclasses: hide-title +--- + + + +[`Command`](obsidian.Command.md) › [`name`](obsidian.Command.name.md) + +## Command.name property + +Human friendly name for searching. + +**Signature:** + +```typescript +name: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Command/repeatable.md b/docs/obsidian-developer/Reference/TypeScript API/Command/repeatable.md new file mode 100644 index 0000000000000000000000000000000000000000..f9a5b0000c4316722b9e90246f15879d50e8cd9d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Command/repeatable.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Command.repeatable.md" +cssclasses: hide-title +--- + + + +[`Command`](obsidian.Command.md) › [`repeatable`](obsidian.Command.repeatable.md) + +## Command.repeatable property + +Whether holding the hotkey should repeatedly trigger this command. Defaults to false. + +**Signature:** + +```typescript +repeatable?: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component.md b/docs/obsidian-developer/Reference/TypeScript API/Component.md new file mode 100644 index 0000000000000000000000000000000000000000..4c47831ee85dd337f6763e0de7abccb538370892 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component.md @@ -0,0 +1,35 @@ +--- +aliases: "obsidian.Component.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) + +## Component class + + +**Signature:** + +```typescript +export class Component +``` + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`addChild(component)`](obsidian.Component.addChild.md) | | Adds a child component, loading it if this component is loaded | +| [`load()`](obsidian.Component.load.md) | | Load this component and its children | +| [`onload()`](obsidian.Component.onload.md) | | Override this to load your component | +| [`onunload()`](obsidian.Component.onunload.md) | | Override this to unload your component | +| [`register(cb)`](obsidian.Component.register.md) | | Registers a callback to be called when unloading | +| [`registerDomEvent(el, type, callback, options)`](obsidian.Component.registerDomEvent.md) | | Registers an DOM event to be detached when unloading | +| [`registerDomEvent(el, type, callback, options)`](obsidian.Component.registerDomEvent_1.md) | | Registers an DOM event to be detached when unloading | +| [`registerDomEvent(el, type, callback, options)`](obsidian.Component.registerDomEvent_2.md) | | Registers an DOM event to be detached when unloading | +| [`registerEvent(eventRef)`](obsidian.Component.registerEvent.md) | | Registers an event to be detached when unloading | +| [`registerInterval(id)`](obsidian.Component.registerInterval.md) | | Registers an interval (from setInterval) to be cancelled when unloading Use instead of to avoid TypeScript confusing between NodeJS vs Browser API | +| [`removeChild(component)`](obsidian.Component.removeChild.md) | | Removes a child component, unloading it | +| [`unload()`](obsidian.Component.unload.md) | | Unload this component and its children | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/addChild.md b/docs/obsidian-developer/Reference/TypeScript API/Component/addChild.md new file mode 100644 index 0000000000000000000000000000000000000000..d5c7b707fad8e9ffa5874417c93ba3f79f686f43 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/addChild.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Component.addChild.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`addChild`](obsidian.Component.addChild.md) + +## Component.addChild() method + +Adds a child component, loading it if this component is loaded + +**Signature:** + +```typescript +addChild(component: T): T; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| component | T | | + +**Returns:** + +`T` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/load.md b/docs/obsidian-developer/Reference/TypeScript API/Component/load.md new file mode 100644 index 0000000000000000000000000000000000000000..ab4c5be034ddd48d035e5e3f5f56ef4172399382 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/load.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Component.load.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`load`](obsidian.Component.load.md) + +## Component.load() method + +Load this component and its children + +**Signature:** + +```typescript +load(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/onload.md b/docs/obsidian-developer/Reference/TypeScript API/Component/onload.md new file mode 100644 index 0000000000000000000000000000000000000000..b9ebdb10895383dfd9273802820fbd102a95d093 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/onload.md @@ -0,0 +1,23 @@ +--- +aliases: "obsidian.Component.onload.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`onload`](obsidian.Component.onload.md) + +## Component.onload() method + +Override this to load your component + +**Signature:** + +```typescript +/** @virtual */ +onload(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/onunload.md b/docs/obsidian-developer/Reference/TypeScript API/Component/onunload.md new file mode 100644 index 0000000000000000000000000000000000000000..8ff9a5dd2a747560aa2182f7f2f98d94a0576bb8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/onunload.md @@ -0,0 +1,23 @@ +--- +aliases: "obsidian.Component.onunload.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`onunload`](obsidian.Component.onunload.md) + +## Component.onunload() method + +Override this to unload your component + +**Signature:** + +```typescript +/** @virtual */ +onunload(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/register.md b/docs/obsidian-developer/Reference/TypeScript API/Component/register.md new file mode 100644 index 0000000000000000000000000000000000000000..1720fc54081fdaa9be368bbe90b2e2b2ef83e37b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/register.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Component.register.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`register`](obsidian.Component.register.md) + +## Component.register() method + +Registers a callback to be called when unloading + +**Signature:** + +```typescript +register(cb: () => any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | () => any | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/registerDomEvent.md b/docs/obsidian-developer/Reference/TypeScript API/Component/registerDomEvent.md new file mode 100644 index 0000000000000000000000000000000000000000..a4d02236243ec76a92797cf3da2b393808420a0a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/registerDomEvent.md @@ -0,0 +1,32 @@ +--- +aliases: "obsidian.Component.registerDomEvent.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`registerDomEvent`](obsidian.Component.registerDomEvent.md) + +## Component.registerDomEvent() method + +Registers an DOM event to be detached when unloading + +**Signature:** + +```typescript +registerDomEvent(el: Window, type: K, callback: (this: HTMLElement, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| el | Window | | +| type | K | | +| callback | (this: HTMLElement, ev: WindowEventMap[K]) => any | | +| options | boolean | AddEventListenerOptions | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/registerDomEvent_1.md b/docs/obsidian-developer/Reference/TypeScript API/Component/registerDomEvent_1.md new file mode 100644 index 0000000000000000000000000000000000000000..f64ebdbc1dccadc1a569b328d49d8a9cb98ddfe5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/registerDomEvent_1.md @@ -0,0 +1,32 @@ +--- +aliases: "obsidian.Component.registerDomEvent_1.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`registerDomEvent`](obsidian.Component.registerDomEvent_1.md) + +## Component.registerDomEvent() method + +Registers an DOM event to be detached when unloading + +**Signature:** + +```typescript +registerDomEvent(el: Document, type: K, callback: (this: HTMLElement, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| el | Document | | +| type | K | | +| callback | (this: HTMLElement, ev: DocumentEventMap[K]) => any | | +| options | boolean | AddEventListenerOptions | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/registerDomEvent_2.md b/docs/obsidian-developer/Reference/TypeScript API/Component/registerDomEvent_2.md new file mode 100644 index 0000000000000000000000000000000000000000..16f1bd60d01a6cf4d5bc31cd4356be8fc61583f4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/registerDomEvent_2.md @@ -0,0 +1,32 @@ +--- +aliases: "obsidian.Component.registerDomEvent_2.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`registerDomEvent`](obsidian.Component.registerDomEvent_2.md) + +## Component.registerDomEvent() method + +Registers an DOM event to be detached when unloading + +**Signature:** + +```typescript +registerDomEvent(el: HTMLElement, type: K, callback: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| el | HTMLElement | | +| type | K | | +| callback | (this: HTMLElement, ev: HTMLElementEventMap[K]) => any | | +| options | boolean | AddEventListenerOptions | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/registerEvent.md b/docs/obsidian-developer/Reference/TypeScript API/Component/registerEvent.md new file mode 100644 index 0000000000000000000000000000000000000000..5ed01177e85520135f9fc5da00e5b3af9762f437 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/registerEvent.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Component.registerEvent.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`registerEvent`](obsidian.Component.registerEvent.md) + +## Component.registerEvent() method + +Registers an event to be detached when unloading + +**Signature:** + +```typescript +registerEvent(eventRef: EventRef): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| eventRef | [`EventRef`](obsidian.EventRef.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/registerInterval.md b/docs/obsidian-developer/Reference/TypeScript API/Component/registerInterval.md new file mode 100644 index 0000000000000000000000000000000000000000..aa5d3d2c9d077ff975e9756f5cd587dbfd7fe235 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/registerInterval.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Component.registerInterval.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`registerInterval`](obsidian.Component.registerInterval.md) + +## Component.registerInterval() method + +Registers an interval (from setInterval) to be cancelled when unloading Use instead of to avoid TypeScript confusing between NodeJS vs Browser API + +**Signature:** + +```typescript +registerInterval(id: number): number; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| id | number | | + +**Returns:** + +`number` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/removeChild.md b/docs/obsidian-developer/Reference/TypeScript API/Component/removeChild.md new file mode 100644 index 0000000000000000000000000000000000000000..797304c47026e70c8ad17af94fc376a9c6e00229 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/removeChild.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Component.removeChild.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`removeChild`](obsidian.Component.removeChild.md) + +## Component.removeChild() method + +Removes a child component, unloading it + +**Signature:** + +```typescript +removeChild(component: T): T; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| component | T | | + +**Returns:** + +`T` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Component/unload.md b/docs/obsidian-developer/Reference/TypeScript API/Component/unload.md new file mode 100644 index 0000000000000000000000000000000000000000..0e64666b43364e1e60ff0b5a4204ed0af6c31504 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Component/unload.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Component.unload.md" +cssclasses: hide-title +--- + + + +[`Component`](obsidian.Component.md) › [`unload`](obsidian.Component.unload.md) + +## Component.unload() method + +Unload this component and its children + +**Signature:** + +```typescript +unload(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Constructor.md b/docs/obsidian-developer/Reference/TypeScript API/Constructor.md new file mode 100644 index 0000000000000000000000000000000000000000..d3fdf0a6ed0b52e0577d53d2f35ab70f5a7568b5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Constructor.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Constructor.md" +cssclasses: hide-title +--- + + + +[`Constructor`](obsidian.Constructor.md) + +## Constructor type + + +**Signature:** + +```typescript +export type Constructor = abstract new (...args: any[]) => T; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter.md new file mode 100644 index 0000000000000000000000000000000000000000..90fc1588e0a614fb1534a1e4864306e4ff3c5b97 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter.md @@ -0,0 +1,42 @@ +--- +aliases: "obsidian.DataAdapter.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) + +## DataAdapter interface + +Work directly with files and folders inside a vault. If possible prefer using the [Vault](obsidian.Vault.md) API over this. + +**Signature:** + +```typescript +export interface DataAdapter +``` + +## Methods + +| Method | Description | +| --- | --- | +| [`append(normalizedPath, data, options)`](obsidian.DataAdapter.append.md) | Add text to the end of a plaintext file. | +| [`copy(normalizedPath, normalizedNewPath)`](obsidian.DataAdapter.copy.md) | Create a copy of a file. This will fail if there is already a file at normalizedNewPath. | +| [`exists(normalizedPath, sensitive)`](obsidian.DataAdapter.exists.md) | Check if something exists at the given path. | +| [`getName()`](obsidian.DataAdapter.getName.md) | | +| [`getResourcePath(normalizedPath)`](obsidian.DataAdapter.getResourcePath.md) | Returns an URI for the browser engine to use, for example to embed an image. | +| [`list(normalizedPath)`](obsidian.DataAdapter.list.md) | Retrieve a list of all files and folders inside the given folder, non-recursive. | +| [`mkdir(normalizedPath)`](obsidian.DataAdapter.mkdir.md) | Create a directory. | +| [`process(normalizedPath, fn, options)`](obsidian.DataAdapter.process.md) | Atomically read, modify, and save the contents of a plaintext file. | +| [`read(normalizedPath)`](obsidian.DataAdapter.read.md) | | +| [`readBinary(normalizedPath)`](obsidian.DataAdapter.readBinary.md) | | +| [`remove(normalizedPath)`](obsidian.DataAdapter.remove.md) | Delete a file. | +| [`rename(normalizedPath, normalizedNewPath)`](obsidian.DataAdapter.rename.md) | Rename a file or folder. | +| [`rmdir(normalizedPath, recursive)`](obsidian.DataAdapter.rmdir.md) | Remove a directory. | +| [`stat(normalizedPath)`](obsidian.DataAdapter.stat.md) | Retrieve metadata about the given file/folder. | +| [`trashLocal(normalizedPath)`](obsidian.DataAdapter.trashLocal.md) | Move to local trash. Files will be moved into the .trash folder at the root of the vault. | +| [`trashSystem(normalizedPath)`](obsidian.DataAdapter.trashSystem.md) | Try moving to system trash. | +| [`write(normalizedPath, data, options)`](obsidian.DataAdapter.write.md) | Write to a plaintext file. If the file exists its content will be overwritten, otherwise the file will be created. | +| [`writeBinary(normalizedPath, data, options)`](obsidian.DataAdapter.writeBinary.md) | Write to a binary file. If the file exists its content will be overwritten, otherwise the file will be created. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/append.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/append.md new file mode 100644 index 0000000000000000000000000000000000000000..c747eb7120ae5afa1c566bd0fc3a8cdd8f06a77d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/append.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.DataAdapter.append.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`append`](obsidian.DataAdapter.append.md) + +## DataAdapter.append() method + +Add text to the end of a plaintext file. + +**Signature:** + +```typescript +append(normalizedPath: string, data: string, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | +| data | string | the text to append. | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ (Optional) | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/copy.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/copy.md new file mode 100644 index 0000000000000000000000000000000000000000..c1b939e7cb75b05b594cb11e9194b8a51302ff01 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/copy.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.DataAdapter.copy.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`copy`](obsidian.DataAdapter.copy.md) + +## DataAdapter.copy() method + +Create a copy of a file. This will fail if there is already a file at `normalizedNewPath`. + +**Signature:** + +```typescript +copy(normalizedPath: string, normalizedNewPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | +| normalizedNewPath | string | path to file, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/exists.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/exists.md new file mode 100644 index 0000000000000000000000000000000000000000..3f83b6e844535b07fc9ddba0ea097b736a677095 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/exists.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.DataAdapter.exists.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`exists`](obsidian.DataAdapter.exists.md) + +## DataAdapter.exists() method + +Check if something exists at the given path. + +**Signature:** + +```typescript +exists(normalizedPath: string, sensitive?: boolean): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file/folder, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | +| sensitive | boolean | _(Optional)_ Some file systems/operating systems are case-insensitive, set to true to force a case-sensitivity check. | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/getName.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/getName.md new file mode 100644 index 0000000000000000000000000000000000000000..2894bc402506a0305592308cc74f10f6c7ee47e6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/getName.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.DataAdapter.getName.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`getName`](obsidian.DataAdapter.getName.md) + +## DataAdapter.getName() method + + +**Signature:** + +```typescript +getName(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/getResourcePath.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/getResourcePath.md new file mode 100644 index 0000000000000000000000000000000000000000..e44080d55b236b710a1be829a61efcdb76f01ab4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/getResourcePath.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.DataAdapter.getResourcePath.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`getResourcePath`](obsidian.DataAdapter.getResourcePath.md) + +## DataAdapter.getResourcePath() method + +Returns an URI for the browser engine to use, for example to embed an image. + +**Signature:** + +```typescript +getResourcePath(normalizedPath: string): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file/folder, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/list.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/list.md new file mode 100644 index 0000000000000000000000000000000000000000..f56c031ce37935be4e8d24f6d23d508480d2d4a5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/list.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.DataAdapter.list.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`list`](obsidian.DataAdapter.list.md) + +## DataAdapter.list() method + +Retrieve a list of all files and folders inside the given folder, non-recursive. + +**Signature:** + +```typescript +list(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to folder, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | + +**Returns:** + +`Promise``<`[`ListedFiles`](obsidian.ListedFiles.md)`>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/mkdir.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/mkdir.md new file mode 100644 index 0000000000000000000000000000000000000000..2900482b421a3a2bf0f82f894b1d952e726c521f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/mkdir.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.DataAdapter.mkdir.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`mkdir`](obsidian.DataAdapter.mkdir.md) + +## DataAdapter.mkdir() method + +Create a directory. + +**Signature:** + +```typescript +mkdir(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to use for new folder, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/process.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/process.md new file mode 100644 index 0000000000000000000000000000000000000000..9579689dfcea4fe26d42f12e4197e359dfcb15e0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/process.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.DataAdapter.process.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`process`](obsidian.DataAdapter.process.md) + +## DataAdapter.process() method + +Atomically read, modify, and save the contents of a plaintext file. + +**Signature:** + +```typescript +process(normalizedPath: string, fn: (data: string) => string, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file/folder, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | +| fn | (data: string) => string | a callback function which returns the new content of the file synchronously. | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ write options. | + +**Returns:** + +`Promise``` + +string - the text value of the file that was written. + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/read.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/read.md new file mode 100644 index 0000000000000000000000000000000000000000..0b064c1bd29b14804b6230e3a14682991dc44d7a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/read.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.DataAdapter.read.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`read`](obsidian.DataAdapter.read.md) + +## DataAdapter.read() method + +**Signature:** + +```typescript +read(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/readBinary.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/readBinary.md new file mode 100644 index 0000000000000000000000000000000000000000..f31f63cafd3af54a62c97b97e9095a7698b89a43 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/readBinary.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.DataAdapter.readBinary.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`readBinary`](obsidian.DataAdapter.readBinary.md) + +## DataAdapter.readBinary() method + +**Signature:** + +```typescript +readBinary(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | + +**Returns:** + +`Promise``<``ArrayBuffer``>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/remove.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/remove.md new file mode 100644 index 0000000000000000000000000000000000000000..7dea7d3d0e5f79073d0c8aa709d73b7b1d747ed1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/remove.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.DataAdapter.remove.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`remove`](obsidian.DataAdapter.remove.md) + +## DataAdapter.remove() method + +Delete a file. + +**Signature:** + +```typescript +remove(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/rename.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/rename.md new file mode 100644 index 0000000000000000000000000000000000000000..e5792a5a3892ede99bf4a340c39d7d85764ecf72 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/rename.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.DataAdapter.rename.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`rename`](obsidian.DataAdapter.rename.md) + +## DataAdapter.rename() method + +Rename a file or folder. + +**Signature:** + +```typescript +rename(normalizedPath: string, normalizedNewPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | current path to file/folder, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | +| normalizedNewPath | string | new path to file/folder, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/rmdir.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/rmdir.md new file mode 100644 index 0000000000000000000000000000000000000000..93746892e3bf05ea437006055a4786ec18d71d2e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/rmdir.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.DataAdapter.rmdir.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`rmdir`](obsidian.DataAdapter.rmdir.md) + +## DataAdapter.rmdir() method + +Remove a directory. + +**Signature:** + +```typescript +rmdir(normalizedPath: string, recursive: boolean): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to folder, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | +| recursive | boolean | If true, delete folders under this folder recursively, if `false´ the folder needs to be empty. | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/stat.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/stat.md new file mode 100644 index 0000000000000000000000000000000000000000..73aefcbd3eaca1689edb330a2bb82e6cec6a8d76 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/stat.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.DataAdapter.stat.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`stat`](obsidian.DataAdapter.stat.md) + +## DataAdapter.stat() method + +Retrieve metadata about the given file/folder. + +**Signature:** + +```typescript +stat(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file/folder, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | + +**Returns:** + +`Promise``<`[`Stat`](obsidian.Stat.md)` | null>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/trashLocal.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/trashLocal.md new file mode 100644 index 0000000000000000000000000000000000000000..130cbe89bd8c9d5823874e3b6f8061d6350c2731 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/trashLocal.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.DataAdapter.trashLocal.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`trashLocal`](obsidian.DataAdapter.trashLocal.md) + +## DataAdapter.trashLocal() method + +Move to local trash. Files will be moved into the `.trash` folder at the root of the vault. + +**Signature:** + +```typescript +trashLocal(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file/folder, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/trashSystem.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/trashSystem.md new file mode 100644 index 0000000000000000000000000000000000000000..8b81ebd051b3ef8da563484d42e4a4355c00f5b0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/trashSystem.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.DataAdapter.trashSystem.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`trashSystem`](obsidian.DataAdapter.trashSystem.md) + +## DataAdapter.trashSystem() method + +Try moving to system trash. + +**Signature:** + +```typescript +trashSystem(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file/folder, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | + +**Returns:** + +`Promise``` + +Returns true if succeeded. This can fail due to system trash being disabled. + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/write.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/write.md new file mode 100644 index 0000000000000000000000000000000000000000..f665d354b3989ab9e8bbdec4ff14e9252131a555 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/write.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.DataAdapter.write.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`write`](obsidian.DataAdapter.write.md) + +## DataAdapter.write() method + +Write to a plaintext file. If the file exists its content will be overwritten, otherwise the file will be created. + +**Signature:** + +```typescript +write(normalizedPath: string, data: string, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | +| data | string | new file content | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ (Optional) | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/writeBinary.md b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/writeBinary.md new file mode 100644 index 0000000000000000000000000000000000000000..2beb1b0406d28c70ae9a4905f93922299e6453cf --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataAdapter/writeBinary.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.DataAdapter.writeBinary.md" +cssclasses: hide-title +--- + + + +[`DataAdapter`](obsidian.DataAdapter.md) › [`writeBinary`](obsidian.DataAdapter.writeBinary.md) + +## DataAdapter.writeBinary() method + +Write to a binary file. If the file exists its content will be overwritten, otherwise the file will be created. + +**Signature:** + +```typescript +writeBinary(normalizedPath: string, data: ArrayBuffer, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | path to file, use [normalizePath()](obsidian.normalizePath.md) to normalize beforehand. | +| data | ArrayBuffer | the new file content | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ (Optional) | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataWriteOptions.md b/docs/obsidian-developer/Reference/TypeScript API/DataWriteOptions.md new file mode 100644 index 0000000000000000000000000000000000000000..a04423cd22fabbca1cb4a28c1a6de4a3a2e0dd83 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataWriteOptions.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.DataWriteOptions.md" +cssclasses: hide-title +--- + + + +[`DataWriteOptions`](obsidian.DataWriteOptions.md) + +## DataWriteOptions interface + + +**Signature:** + +```typescript +export interface DataWriteOptions +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`ctime?`](obsidian.DataWriteOptions.ctime.md) | | number | _(Optional)_ Time of creation, represented as a unix timestamp, in milliseconds. Omit this if you want to keep the default behaviour. | +| [`mtime?`](obsidian.DataWriteOptions.mtime.md) | | number | _(Optional)_ Time of last modification, represented as a unix timestamp, in milliseconds. Omit this if you want to keep the default behaviour. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataWriteOptions/ctime.md b/docs/obsidian-developer/Reference/TypeScript API/DataWriteOptions/ctime.md new file mode 100644 index 0000000000000000000000000000000000000000..883d2b29f7ad025a12a09ed2181b620f62ac158a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataWriteOptions/ctime.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.DataWriteOptions.ctime.md" +cssclasses: hide-title +--- + + + +[`DataWriteOptions`](obsidian.DataWriteOptions.md) › [`ctime`](obsidian.DataWriteOptions.ctime.md) + +## DataWriteOptions.ctime property + +Time of creation, represented as a unix timestamp, in milliseconds. Omit this if you want to keep the default behaviour. + +**Signature:** + +```typescript +ctime?: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/DataWriteOptions/mtime.md b/docs/obsidian-developer/Reference/TypeScript API/DataWriteOptions/mtime.md new file mode 100644 index 0000000000000000000000000000000000000000..a6f8b2492b4585c6ee4f782d928e6314d39126eb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DataWriteOptions/mtime.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.DataWriteOptions.mtime.md" +cssclasses: hide-title +--- + + + +[`DataWriteOptions`](obsidian.DataWriteOptions.md) › [`mtime`](obsidian.DataWriteOptions.mtime.md) + +## DataWriteOptions.mtime property + +Time of last modification, represented as a unix timestamp, in milliseconds. Omit this if you want to keep the default behaviour. + +**Signature:** + +```typescript +mtime?: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Debouncer.md b/docs/obsidian-developer/Reference/TypeScript API/Debouncer.md new file mode 100644 index 0000000000000000000000000000000000000000..674832cc35d930a3a9f722e6a928dd8236b8c5eb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Debouncer.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.Debouncer.md" +cssclasses: hide-title +--- + + + +[`Debouncer`](obsidian.Debouncer.md) + +## Debouncer interface + + +**Signature:** + +```typescript +export interface Debouncer +``` + +## Methods + +| Method | Description | +| --- | --- | +| [`cancel()`](obsidian.Debouncer.cancel.md) | | +| [`run()`](obsidian.Debouncer.run.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Debouncer/cancel.md b/docs/obsidian-developer/Reference/TypeScript API/Debouncer/cancel.md new file mode 100644 index 0000000000000000000000000000000000000000..6ad8628ebf47854645fc66b34212e3dbad9edd9e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Debouncer/cancel.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Debouncer.cancel.md" +cssclasses: hide-title +--- + + + +[`Debouncer`](obsidian.Debouncer.md) › [`cancel`](obsidian.Debouncer.cancel.md) + +## Debouncer.cancel() method + + +**Signature:** + +```typescript +cancel(): this; +``` +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Debouncer/run.md b/docs/obsidian-developer/Reference/TypeScript API/Debouncer/run.md new file mode 100644 index 0000000000000000000000000000000000000000..649ce41be996bb8e843232a3eeae8614f81da1c1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Debouncer/run.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Debouncer.run.md" +cssclasses: hide-title +--- + + + +[`Debouncer`](obsidian.Debouncer.md) › [`run`](obsidian.Debouncer.run.md) + +## Debouncer.run() method + + +**Signature:** + +```typescript +run(): V | void; +``` +**Returns:** + +`V | void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent.md b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..bb75ba6876340013a7dec2c8bb761cebc562849e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent.md @@ -0,0 +1,42 @@ +--- +aliases: "obsidian.DropdownComponent.md" +cssclasses: hide-title +--- + + + +[`DropdownComponent`](obsidian.DropdownComponent.md) + +## DropdownComponent class + + +**Signature:** + +```typescript +export class DropdownComponent extends ValueComponent +``` +**Extends:** [`ValueComponent`](obsidian.ValueComponent.md)`` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.DropdownComponent.(constructor).md) | | Constructs a new instance of the DropdownComponent class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`selectEl`](obsidian.DropdownComponent.selectEl.md) | | HTMLSelectElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`addOption(value, display)`](obsidian.DropdownComponent.addOption.md) | | | +| [`addOptions(options)`](obsidian.DropdownComponent.addOptions.md) | | | +| [`getValue()`](obsidian.DropdownComponent.getValue.md) | | | +| [`onChange(callback)`](obsidian.DropdownComponent.onChange.md) | | | +| [`setDisabled(disabled)`](obsidian.DropdownComponent.setDisabled.md) | | | +| [`setValue(value)`](obsidian.DropdownComponent.setValue.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..ddba9951f7fff7e5d7249891559d08d6ccd865bd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.DropdownComponent.(constructor).md" +cssclasses: hide-title +--- + + + +[`DropdownComponent`](obsidian.DropdownComponent.md) › [`(constructor)`](obsidian.DropdownComponent.(constructor).md) + +## DropdownComponent.(constructor) + +Constructs a new instance of the `DropdownComponent` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/addOption.md b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/addOption.md new file mode 100644 index 0000000000000000000000000000000000000000..efdea72c305277e8b877f22aa99695aebc2c1f95 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/addOption.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.DropdownComponent.addOption.md" +cssclasses: hide-title +--- + + + +[`DropdownComponent`](obsidian.DropdownComponent.md) › [`addOption`](obsidian.DropdownComponent.addOption.md) + +## DropdownComponent.addOption() method + + +**Signature:** + +```typescript +addOption(value: string, display: string): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | string | | +| display | string | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/addOptions.md b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/addOptions.md new file mode 100644 index 0000000000000000000000000000000000000000..ee4f7287a821ab73aec9a6c8832576b3346001b5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/addOptions.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.DropdownComponent.addOptions.md" +cssclasses: hide-title +--- + + + +[`DropdownComponent`](obsidian.DropdownComponent.md) › [`addOptions`](obsidian.DropdownComponent.addOptions.md) + +## DropdownComponent.addOptions() method + + +**Signature:** + +```typescript +addOptions(options: Record): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| options | Record<string, string> | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/getValue.md b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/getValue.md new file mode 100644 index 0000000000000000000000000000000000000000..6fe45d5ea71ec2e6d8765108690725d950ca2cde --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/getValue.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.DropdownComponent.getValue.md" +cssclasses: hide-title +--- + + + +[`DropdownComponent`](obsidian.DropdownComponent.md) › [`getValue`](obsidian.DropdownComponent.getValue.md) + +## DropdownComponent.getValue() method + + +**Signature:** + +```typescript +getValue(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/onChange.md b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/onChange.md new file mode 100644 index 0000000000000000000000000000000000000000..a780cf75b6e06aee937f36f35223a3de11d82065 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/onChange.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.DropdownComponent.onChange.md" +cssclasses: hide-title +--- + + + +[`DropdownComponent`](obsidian.DropdownComponent.md) › [`onChange`](obsidian.DropdownComponent.onChange.md) + +## DropdownComponent.onChange() method + + +**Signature:** + +```typescript +onChange(callback: (value: string) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (value: string) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/selectEl.md b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/selectEl.md new file mode 100644 index 0000000000000000000000000000000000000000..5e338e5e4449b65ab501cf334a7c4b8c710de7b7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/selectEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.DropdownComponent.selectEl.md" +cssclasses: hide-title +--- + + + +[`DropdownComponent`](obsidian.DropdownComponent.md) › [`selectEl`](obsidian.DropdownComponent.selectEl.md) + +## DropdownComponent.selectEl property + + +**Signature:** + +```typescript +selectEl: HTMLSelectElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/setDisabled.md b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/setDisabled.md new file mode 100644 index 0000000000000000000000000000000000000000..a4bedb2518227b05dc23c9617e22a1523a82f3a3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/setDisabled.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.DropdownComponent.setDisabled.md" +cssclasses: hide-title +--- + + + +[`DropdownComponent`](obsidian.DropdownComponent.md) › [`setDisabled`](obsidian.DropdownComponent.setDisabled.md) + +## DropdownComponent.setDisabled() method + + +**Signature:** + +```typescript +setDisabled(disabled: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| disabled | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/setValue.md b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/setValue.md new file mode 100644 index 0000000000000000000000000000000000000000..aca10894e47175bdc8cef80bc2f141c0f39e6054 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/DropdownComponent/setValue.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.DropdownComponent.setValue.md" +cssclasses: hide-title +--- + + + +[`DropdownComponent`](obsidian.DropdownComponent.md) › [`setValue`](obsidian.DropdownComponent.setValue.md) + +## DropdownComponent.setValue() method + + +**Signature:** + +```typescript +setValue(value: string): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | string | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditableFileView.md b/docs/obsidian-developer/Reference/TypeScript API/EditableFileView.md new file mode 100644 index 0000000000000000000000000000000000000000..16d4c23b9a411d6eccfd44a131d03807951dc41b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditableFileView.md @@ -0,0 +1,19 @@ +--- +aliases: "obsidian.EditableFileView.md" +cssclasses: hide-title +--- + + + +[`EditableFileView`](obsidian.EditableFileView.md) + +## EditableFileView class + + +**Signature:** + +```typescript +export abstract class EditableFileView extends FileView +``` +**Extends:** [`FileView`](obsidian.FileView.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor.md b/docs/obsidian-developer/Reference/TypeScript API/Editor.md new file mode 100644 index 0000000000000000000000000000000000000000..20e8ae7144c8e5eb673536df6153e834ef1ee19b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor.md @@ -0,0 +1,56 @@ +--- +aliases: "obsidian.Editor.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) + +## Editor class + +A common interface that bridges the gap between CodeMirror 5 and CodeMirror 6. + +**Signature:** + +```typescript +export abstract class Editor +``` + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`blur()`](obsidian.Editor.blur.md) | abstract | | +| [`exec(command)`](obsidian.Editor.exec.md) | abstract | | +| [`focus()`](obsidian.Editor.focus.md) | abstract | | +| [`getCursor(string)`](obsidian.Editor.getCursor.md) | abstract | | +| [`getDoc()`](obsidian.Editor.getDoc.md) | | | +| [`getLine(line)`](obsidian.Editor.getLine.md) | abstract | Get the text at line (0-indexed) | +| [`getRange(from, to)`](obsidian.Editor.getRange.md) | abstract | | +| [`getScrollInfo()`](obsidian.Editor.getScrollInfo.md) | abstract | | +| [`getSelection()`](obsidian.Editor.getSelection.md) | abstract | | +| [`getValue()`](obsidian.Editor.getValue.md) | abstract | | +| [`hasFocus()`](obsidian.Editor.hasFocus.md) | abstract | | +| [`lastLine()`](obsidian.Editor.lastLine.md) | abstract | | +| [`lineCount()`](obsidian.Editor.lineCount.md) | abstract | Gets the number of lines in the document | +| [`listSelections()`](obsidian.Editor.listSelections.md) | abstract | | +| [`offsetToPos(offset)`](obsidian.Editor.offsetToPos.md) | abstract | | +| [`posToOffset(pos)`](obsidian.Editor.posToOffset.md) | abstract | | +| [`processLines(read, write, ignoreEmpty)`](obsidian.Editor.processLines.md) | | | +| [`redo()`](obsidian.Editor.redo.md) | abstract | | +| [`refresh()`](obsidian.Editor.refresh.md) | abstract | | +| [`replaceRange(replacement, from, to, origin)`](obsidian.Editor.replaceRange.md) | abstract | | +| [`replaceSelection(replacement, origin)`](obsidian.Editor.replaceSelection.md) | abstract | | +| [`scrollIntoView(range, center)`](obsidian.Editor.scrollIntoView.md) | abstract | | +| [`scrollTo(x, y)`](obsidian.Editor.scrollTo.md) | abstract | | +| [`setCursor(pos, ch)`](obsidian.Editor.setCursor.md) | | | +| [`setLine(n, text)`](obsidian.Editor.setLine.md) | | | +| [`setSelection(anchor, head)`](obsidian.Editor.setSelection.md) | abstract | | +| [`setSelections(ranges, main)`](obsidian.Editor.setSelections.md) | abstract | | +| [`setValue(content)`](obsidian.Editor.setValue.md) | abstract | | +| [`somethingSelected()`](obsidian.Editor.somethingSelected.md) | | | +| [`transaction(tx, origin)`](obsidian.Editor.transaction.md) | abstract | | +| [`undo()`](obsidian.Editor.undo.md) | abstract | | +| [`wordAt(pos)`](obsidian.Editor.wordAt.md) | abstract | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/blur.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/blur.md new file mode 100644 index 0000000000000000000000000000000000000000..dd6d91c8a8aa37764e05d05f5669719f57898899 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/blur.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.blur.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`blur`](obsidian.Editor.blur.md) + +## Editor.blur() method + + +**Signature:** + +```typescript +abstract blur(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/exec.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/exec.md new file mode 100644 index 0000000000000000000000000000000000000000..3c2dc0ed713190c2bec874718d75c2090d6919fa --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/exec.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Editor.exec.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`exec`](obsidian.Editor.exec.md) + +## Editor.exec() method + + +**Signature:** + +```typescript +abstract exec(command: EditorCommandName): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| command | [`EditorCommandName`](obsidian.EditorCommandName.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/focus.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/focus.md new file mode 100644 index 0000000000000000000000000000000000000000..55f5c5061e795afb63563c491da603246866627e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/focus.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.focus.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`focus`](obsidian.Editor.focus.md) + +## Editor.focus() method + + +**Signature:** + +```typescript +abstract focus(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/getCursor.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/getCursor.md new file mode 100644 index 0000000000000000000000000000000000000000..d0afbf467ea2ff50b3fc3d787734afbab7ab48f9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/getCursor.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Editor.getCursor.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`getCursor`](obsidian.Editor.getCursor.md) + +## Editor.getCursor() method + + +**Signature:** + +```typescript +abstract getCursor(string?: 'from' | 'to' | 'head' | 'anchor'): EditorPosition; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| string | 'from' | 'to' | 'head' | 'anchor' | _(Optional)_ | + +**Returns:** + +[`EditorPosition`](obsidian.EditorPosition.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/getDoc.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/getDoc.md new file mode 100644 index 0000000000000000000000000000000000000000..6e6ab2b63e49c3267df81fc4f389ed5cddc16d06 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/getDoc.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.getDoc.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`getDoc`](obsidian.Editor.getDoc.md) + +## Editor.getDoc() method + + +**Signature:** + +```typescript +getDoc(): this; +``` +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/getLine.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/getLine.md new file mode 100644 index 0000000000000000000000000000000000000000..b328d404fd13fd2561cfb74567638a191e2ca332 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/getLine.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Editor.getLine.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`getLine`](obsidian.Editor.getLine.md) + +## Editor.getLine() method + +Get the text at line (0-indexed) + +**Signature:** + +```typescript +abstract getLine(line: number): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| line | number | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/getRange.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/getRange.md new file mode 100644 index 0000000000000000000000000000000000000000..4b050dd035e2158224def792a748db5dce7dafa0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/getRange.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Editor.getRange.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`getRange`](obsidian.Editor.getRange.md) + +## Editor.getRange() method + + +**Signature:** + +```typescript +abstract getRange(from: EditorPosition, to: EditorPosition): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| from | [`EditorPosition`](obsidian.EditorPosition.md) | | +| to | [`EditorPosition`](obsidian.EditorPosition.md) | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/getScrollInfo.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/getScrollInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..ecde942faf9be6cd252ea57db061002f7ee2f9e8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/getScrollInfo.md @@ -0,0 +1,24 @@ +--- +aliases: "obsidian.Editor.getScrollInfo.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`getScrollInfo`](obsidian.Editor.getScrollInfo.md) + +## Editor.getScrollInfo() method + + +**Signature:** + +```typescript +abstract getScrollInfo(): { + top: number; + left: number; + }; +``` +**Returns:** + +`{ top: number; left: number; }` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/getSelection.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/getSelection.md new file mode 100644 index 0000000000000000000000000000000000000000..e3d16c2b26ef5b99f55c66cea3c18c48e9c46858 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/getSelection.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.getSelection.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`getSelection`](obsidian.Editor.getSelection.md) + +## Editor.getSelection() method + + +**Signature:** + +```typescript +abstract getSelection(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/getValue.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/getValue.md new file mode 100644 index 0000000000000000000000000000000000000000..f85dc21017586eecdf9cf2c4f114b20c36b02773 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/getValue.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.getValue.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`getValue`](obsidian.Editor.getValue.md) + +## Editor.getValue() method + + +**Signature:** + +```typescript +abstract getValue(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/hasFocus.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/hasFocus.md new file mode 100644 index 0000000000000000000000000000000000000000..d9e53d8cd297ada537c51084bd34d15c58efb6a3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/hasFocus.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.hasFocus.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`hasFocus`](obsidian.Editor.hasFocus.md) + +## Editor.hasFocus() method + + +**Signature:** + +```typescript +abstract hasFocus(): boolean; +``` +**Returns:** + +`boolean` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/lastLine.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/lastLine.md new file mode 100644 index 0000000000000000000000000000000000000000..9fc7688bcb8bf6b7d4310c1fdf47686e652876d0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/lastLine.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.lastLine.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`lastLine`](obsidian.Editor.lastLine.md) + +## Editor.lastLine() method + + +**Signature:** + +```typescript +abstract lastLine(): number; +``` +**Returns:** + +`number` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/lineCount.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/lineCount.md new file mode 100644 index 0000000000000000000000000000000000000000..40f1ae3a2fb2bc1499611a869450909c1b9b47ed --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/lineCount.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Editor.lineCount.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`lineCount`](obsidian.Editor.lineCount.md) + +## Editor.lineCount() method + +Gets the number of lines in the document + +**Signature:** + +```typescript +abstract lineCount(): number; +``` +**Returns:** + +`number` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/listSelections.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/listSelections.md new file mode 100644 index 0000000000000000000000000000000000000000..9ada2447c82c5aaba6047fe89b8efe25807296fa --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/listSelections.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.listSelections.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`listSelections`](obsidian.Editor.listSelections.md) + +## Editor.listSelections() method + + +**Signature:** + +```typescript +abstract listSelections(): EditorSelection[]; +``` +**Returns:** + +[`EditorSelection`](obsidian.EditorSelection.md)`[]` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/offsetToPos.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/offsetToPos.md new file mode 100644 index 0000000000000000000000000000000000000000..1e7cfa7438fb1e0dc488542d5cf323bda69f3462 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/offsetToPos.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Editor.offsetToPos.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`offsetToPos`](obsidian.Editor.offsetToPos.md) + +## Editor.offsetToPos() method + + +**Signature:** + +```typescript +abstract offsetToPos(offset: number): EditorPosition; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| offset | number | | + +**Returns:** + +[`EditorPosition`](obsidian.EditorPosition.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/posToOffset.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/posToOffset.md new file mode 100644 index 0000000000000000000000000000000000000000..5d1e93b071b28781298f369e95989615f1c15fc2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/posToOffset.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Editor.posToOffset.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`posToOffset`](obsidian.Editor.posToOffset.md) + +## Editor.posToOffset() method + + +**Signature:** + +```typescript +abstract posToOffset(pos: EditorPosition): number; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| pos | [`EditorPosition`](obsidian.EditorPosition.md) | | + +**Returns:** + +`number` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/processLines.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/processLines.md new file mode 100644 index 0000000000000000000000000000000000000000..4532a3ddc358554e1f9ce517a732d3e81ba01617 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/processLines.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Editor.processLines.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`processLines`](obsidian.Editor.processLines.md) + +## Editor.processLines() method + + +**Signature:** + +```typescript +processLines(read: (line: number, lineText: string) => T | null, write: (line: number, lineText: string, value: T | null) => EditorChange | void, ignoreEmpty?: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| read | (line: number, lineText: string) => T | null | | +| write | (line: number, lineText: string, value: T | null) => [`EditorChange`](obsidian.EditorChange.md) | void | | +| ignoreEmpty | boolean | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/redo.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/redo.md new file mode 100644 index 0000000000000000000000000000000000000000..a39997a25fcd79e81a4e8de6aa34bab4edfa22e2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/redo.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.redo.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`redo`](obsidian.Editor.redo.md) + +## Editor.redo() method + + +**Signature:** + +```typescript +abstract redo(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/refresh.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/refresh.md new file mode 100644 index 0000000000000000000000000000000000000000..3539d0e522475fcb863a439939160b84de6a3766 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/refresh.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.refresh.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`refresh`](obsidian.Editor.refresh.md) + +## Editor.refresh() method + + +**Signature:** + +```typescript +abstract refresh(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/replaceRange.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/replaceRange.md new file mode 100644 index 0000000000000000000000000000000000000000..bd18337e6c4d2bf480b8443eb8f13825f910bd88 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/replaceRange.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Editor.replaceRange.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`replaceRange`](obsidian.Editor.replaceRange.md) + +## Editor.replaceRange() method + + +**Signature:** + +```typescript +abstract replaceRange(replacement: string, from: EditorPosition, to?: EditorPosition, origin?: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| replacement | string | | +| from | [`EditorPosition`](obsidian.EditorPosition.md) | | +| to | [`EditorPosition`](obsidian.EditorPosition.md) | _(Optional)_ | +| origin | string | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/replaceSelection.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/replaceSelection.md new file mode 100644 index 0000000000000000000000000000000000000000..d9f457daa71ce6cf381c48e14ca0186beb9d5dbd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/replaceSelection.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Editor.replaceSelection.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`replaceSelection`](obsidian.Editor.replaceSelection.md) + +## Editor.replaceSelection() method + + +**Signature:** + +```typescript +abstract replaceSelection(replacement: string, origin?: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| replacement | string | | +| origin | string | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/scrollIntoView.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/scrollIntoView.md new file mode 100644 index 0000000000000000000000000000000000000000..da36e08b4ba070777d96c10a3bc125911ca8dca4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/scrollIntoView.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Editor.scrollIntoView.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`scrollIntoView`](obsidian.Editor.scrollIntoView.md) + +## Editor.scrollIntoView() method + + +**Signature:** + +```typescript +abstract scrollIntoView(range: EditorRange, center?: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| range | [`EditorRange`](obsidian.EditorRange.md) | | +| center | boolean | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/scrollTo.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/scrollTo.md new file mode 100644 index 0000000000000000000000000000000000000000..ec8340b5a756e275eb95ed14e4dc32da9acfcedc --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/scrollTo.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Editor.scrollTo.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`scrollTo`](obsidian.Editor.scrollTo.md) + +## Editor.scrollTo() method + + +**Signature:** + +```typescript +abstract scrollTo(x?: number | null, y?: number | null): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| x | number | null | _(Optional)_ | +| y | number | null | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/setCursor.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/setCursor.md new file mode 100644 index 0000000000000000000000000000000000000000..89d761e5e4192f440dac5336ec2c277aedd17ad4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/setCursor.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Editor.setCursor.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`setCursor`](obsidian.Editor.setCursor.md) + +## Editor.setCursor() method + + +**Signature:** + +```typescript +setCursor(pos: EditorPosition | number, ch?: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| pos | [`EditorPosition`](obsidian.EditorPosition.md) | number | | +| ch | number | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/setLine.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/setLine.md new file mode 100644 index 0000000000000000000000000000000000000000..47f45da715c6c55938566a19447d751d915e9851 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/setLine.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Editor.setLine.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`setLine`](obsidian.Editor.setLine.md) + +## Editor.setLine() method + + +**Signature:** + +```typescript +setLine(n: number, text: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| n | number | | +| text | string | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/setSelection.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/setSelection.md new file mode 100644 index 0000000000000000000000000000000000000000..3a106de294f11d182b188f367466d9fe4d88f4c3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/setSelection.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Editor.setSelection.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`setSelection`](obsidian.Editor.setSelection.md) + +## Editor.setSelection() method + + +**Signature:** + +```typescript +abstract setSelection(anchor: EditorPosition, head?: EditorPosition): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| anchor | [`EditorPosition`](obsidian.EditorPosition.md) | | +| head | [`EditorPosition`](obsidian.EditorPosition.md) | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/setSelections.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/setSelections.md new file mode 100644 index 0000000000000000000000000000000000000000..a38620f28f46bf642d8b35084b8cd41a9b3034dd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/setSelections.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Editor.setSelections.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`setSelections`](obsidian.Editor.setSelections.md) + +## Editor.setSelections() method + + +**Signature:** + +```typescript +abstract setSelections(ranges: EditorSelectionOrCaret[], main?: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| ranges | [`EditorSelectionOrCaret`](obsidian.EditorSelectionOrCaret.md)[] | | +| main | number | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/setValue.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/setValue.md new file mode 100644 index 0000000000000000000000000000000000000000..12ad57d0cf69fa68db247aeddbcd0e1c5b4cd74f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/setValue.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Editor.setValue.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`setValue`](obsidian.Editor.setValue.md) + +## Editor.setValue() method + + +**Signature:** + +```typescript +abstract setValue(content: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| content | string | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/somethingSelected.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/somethingSelected.md new file mode 100644 index 0000000000000000000000000000000000000000..f4fa25ee64525ecb5894f6dd4a5294401c7193e3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/somethingSelected.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.somethingSelected.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`somethingSelected`](obsidian.Editor.somethingSelected.md) + +## Editor.somethingSelected() method + + +**Signature:** + +```typescript +somethingSelected(): boolean; +``` +**Returns:** + +`boolean` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/transaction.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/transaction.md new file mode 100644 index 0000000000000000000000000000000000000000..b92fb5dd5cb2521e17a1554bc58911016243bcd7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/transaction.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Editor.transaction.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`transaction`](obsidian.Editor.transaction.md) + +## Editor.transaction() method + + +**Signature:** + +```typescript +abstract transaction(tx: EditorTransaction, origin?: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| tx | [`EditorTransaction`](obsidian.EditorTransaction.md) | | +| origin | string | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/undo.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/undo.md new file mode 100644 index 0000000000000000000000000000000000000000..cf4038faf2e7c74da239adc8fc325ccb18670b86 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/undo.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Editor.undo.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`undo`](obsidian.Editor.undo.md) + +## Editor.undo() method + + +**Signature:** + +```typescript +abstract undo(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Editor/wordAt.md b/docs/obsidian-developer/Reference/TypeScript API/Editor/wordAt.md new file mode 100644 index 0000000000000000000000000000000000000000..fae0e57063cf95704ca8427c7f83dfe54f3f84d0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Editor/wordAt.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Editor.wordAt.md" +cssclasses: hide-title +--- + + + +[`Editor`](obsidian.Editor.md) › [`wordAt`](obsidian.Editor.wordAt.md) + +## Editor.wordAt() method + + +**Signature:** + +```typescript +abstract wordAt(pos: EditorPosition): EditorRange | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| pos | [`EditorPosition`](obsidian.EditorPosition.md) | | + +**Returns:** + +[`EditorRange`](obsidian.EditorRange.md)` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorChange.md b/docs/obsidian-developer/Reference/TypeScript API/EditorChange.md new file mode 100644 index 0000000000000000000000000000000000000000..0a72b7d527e848402bde20317e02c900ddeeffc8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorChange.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.EditorChange.md" +cssclasses: hide-title +--- + + + +[`EditorChange`](obsidian.EditorChange.md) + +## EditorChange interface + + +**Signature:** + +```typescript +export interface EditorChange extends EditorRangeOrCaret +``` +**Extends:** [`EditorRangeOrCaret`](obsidian.EditorRangeOrCaret.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`text`](obsidian.EditorChange.text.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorChange/text.md b/docs/obsidian-developer/Reference/TypeScript API/EditorChange/text.md new file mode 100644 index 0000000000000000000000000000000000000000..026c07db59ceb29bd9f0dfdcf38174f7cf59cc40 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorChange/text.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorChange.text.md" +cssclasses: hide-title +--- + + + +[`EditorChange`](obsidian.EditorChange.md) › [`text`](obsidian.EditorChange.text.md) + +## EditorChange.text property + + +**Signature:** + +```typescript +text: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorCommandName.md b/docs/obsidian-developer/Reference/TypeScript API/EditorCommandName.md new file mode 100644 index 0000000000000000000000000000000000000000..7b477feb61303a38ee6ff0eb5e39c591476d374f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorCommandName.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorCommandName.md" +cssclasses: hide-title +--- + + + +[`EditorCommandName`](obsidian.EditorCommandName.md) + +## EditorCommandName type + + +**Signature:** + +```typescript +export type EditorCommandName = 'goUp' | 'goDown' | 'goLeft' | 'goRight' | 'goStart' | 'goEnd' | 'goWordLeft' | 'goWordRight' | 'indentMore' | 'indentLess' | 'newlineAndIndent' | 'swapLineUp' | 'swapLineDown' | 'deleteLine' | 'toggleFold' | 'foldAll' | 'unfoldAll'; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorPosition.md b/docs/obsidian-developer/Reference/TypeScript API/EditorPosition.md new file mode 100644 index 0000000000000000000000000000000000000000..01ccfa18609e91b05ed29fd25ffaffbe1b0c3a16 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorPosition.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.EditorPosition.md" +cssclasses: hide-title +--- + + + +[`EditorPosition`](obsidian.EditorPosition.md) + +## EditorPosition interface + + +**Signature:** + +```typescript +export interface EditorPosition +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`ch`](obsidian.EditorPosition.ch.md) | | number | | +| [`line`](obsidian.EditorPosition.line.md) | | number | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorPosition/ch.md b/docs/obsidian-developer/Reference/TypeScript API/EditorPosition/ch.md new file mode 100644 index 0000000000000000000000000000000000000000..ae6135d7210a65ce2ac9b0df3d4b077e670d59d4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorPosition/ch.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorPosition.ch.md" +cssclasses: hide-title +--- + + + +[`EditorPosition`](obsidian.EditorPosition.md) › [`ch`](obsidian.EditorPosition.ch.md) + +## EditorPosition.ch property + + +**Signature:** + +```typescript +ch: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorPosition/line.md b/docs/obsidian-developer/Reference/TypeScript API/EditorPosition/line.md new file mode 100644 index 0000000000000000000000000000000000000000..8e3297c0511a0d457c6c2a88ff6fa0c9263852bf --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorPosition/line.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorPosition.line.md" +cssclasses: hide-title +--- + + + +[`EditorPosition`](obsidian.EditorPosition.md) › [`line`](obsidian.EditorPosition.line.md) + +## EditorPosition.line property + + +**Signature:** + +```typescript +line: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorRange.md b/docs/obsidian-developer/Reference/TypeScript API/EditorRange.md new file mode 100644 index 0000000000000000000000000000000000000000..756be388e29e7ada2b5d7eeefc8bee8acca7cc5f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorRange.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.EditorRange.md" +cssclasses: hide-title +--- + + + +[`EditorRange`](obsidian.EditorRange.md) + +## EditorRange interface + + +**Signature:** + +```typescript +export interface EditorRange +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`from`](obsidian.EditorRange.from.md) | | [`EditorPosition`](obsidian.EditorPosition.md) | | +| [`to`](obsidian.EditorRange.to.md) | | [`EditorPosition`](obsidian.EditorPosition.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorRange/from.md b/docs/obsidian-developer/Reference/TypeScript API/EditorRange/from.md new file mode 100644 index 0000000000000000000000000000000000000000..1c3e2bc38bce1d0c6a313fe3e3c2ea105e6af973 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorRange/from.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorRange.from.md" +cssclasses: hide-title +--- + + + +[`EditorRange`](obsidian.EditorRange.md) › [`from`](obsidian.EditorRange.from.md) + +## EditorRange.from property + + +**Signature:** + +```typescript +from: EditorPosition; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorRange/to.md b/docs/obsidian-developer/Reference/TypeScript API/EditorRange/to.md new file mode 100644 index 0000000000000000000000000000000000000000..04d428c9cae7ca55ee75445660a3dbb16fd81c0e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorRange/to.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorRange.to.md" +cssclasses: hide-title +--- + + + +[`EditorRange`](obsidian.EditorRange.md) › [`to`](obsidian.EditorRange.to.md) + +## EditorRange.to property + + +**Signature:** + +```typescript +to: EditorPosition; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorRangeOrCaret.md b/docs/obsidian-developer/Reference/TypeScript API/EditorRangeOrCaret.md new file mode 100644 index 0000000000000000000000000000000000000000..8432bb584701e8e18cbfe20ace81257d97b2a2fb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorRangeOrCaret.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.EditorRangeOrCaret.md" +cssclasses: hide-title +--- + + + +[`EditorRangeOrCaret`](obsidian.EditorRangeOrCaret.md) + +## EditorRangeOrCaret interface + + +**Signature:** + +```typescript +export interface EditorRangeOrCaret +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`from`](obsidian.EditorRangeOrCaret.from.md) | | [`EditorPosition`](obsidian.EditorPosition.md) | | +| [`to?`](obsidian.EditorRangeOrCaret.to.md) | | [`EditorPosition`](obsidian.EditorPosition.md) | _(Optional)_ | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorRangeOrCaret/from.md b/docs/obsidian-developer/Reference/TypeScript API/EditorRangeOrCaret/from.md new file mode 100644 index 0000000000000000000000000000000000000000..58b565bedd2a230e484ac9aacd9f3c84a6466579 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorRangeOrCaret/from.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorRangeOrCaret.from.md" +cssclasses: hide-title +--- + + + +[`EditorRangeOrCaret`](obsidian.EditorRangeOrCaret.md) › [`from`](obsidian.EditorRangeOrCaret.from.md) + +## EditorRangeOrCaret.from property + + +**Signature:** + +```typescript +from: EditorPosition; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorRangeOrCaret/to.md b/docs/obsidian-developer/Reference/TypeScript API/EditorRangeOrCaret/to.md new file mode 100644 index 0000000000000000000000000000000000000000..b245d604bec2b93480cbfc2641059002ad2cc16d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorRangeOrCaret/to.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorRangeOrCaret.to.md" +cssclasses: hide-title +--- + + + +[`EditorRangeOrCaret`](obsidian.EditorRangeOrCaret.md) › [`to`](obsidian.EditorRangeOrCaret.to.md) + +## EditorRangeOrCaret.to property + + +**Signature:** + +```typescript +to?: EditorPosition; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo.md b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..caf94d8803060264241a5fbb4ebaea86e1ad80d5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.EditorScrollInfo.md" +cssclasses: hide-title +--- + + + +[`EditorScrollInfo`](obsidian.EditorScrollInfo.md) + +## EditorScrollInfo interface + + +**Signature:** + +```typescript +export interface EditorScrollInfo +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`clientHeight`](obsidian.EditorScrollInfo.clientHeight.md) | | number | | +| [`clientWidth`](obsidian.EditorScrollInfo.clientWidth.md) | | number | | +| [`height`](obsidian.EditorScrollInfo.height.md) | | number | | +| [`left`](obsidian.EditorScrollInfo.left.md) | | number | | +| [`top`](obsidian.EditorScrollInfo.top.md) | | number | | +| [`width`](obsidian.EditorScrollInfo.width.md) | | number | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/clientHeight.md b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/clientHeight.md new file mode 100644 index 0000000000000000000000000000000000000000..559301369b1c40db663c997d3202ec4eefe7cf38 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/clientHeight.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorScrollInfo.clientHeight.md" +cssclasses: hide-title +--- + + + +[`EditorScrollInfo`](obsidian.EditorScrollInfo.md) › [`clientHeight`](obsidian.EditorScrollInfo.clientHeight.md) + +## EditorScrollInfo.clientHeight property + + +**Signature:** + +```typescript +clientHeight: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/clientWidth.md b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/clientWidth.md new file mode 100644 index 0000000000000000000000000000000000000000..b9ae7bd4208e04813dc606ffcef40ef0086ccb97 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/clientWidth.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorScrollInfo.clientWidth.md" +cssclasses: hide-title +--- + + + +[`EditorScrollInfo`](obsidian.EditorScrollInfo.md) › [`clientWidth`](obsidian.EditorScrollInfo.clientWidth.md) + +## EditorScrollInfo.clientWidth property + + +**Signature:** + +```typescript +clientWidth: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/height.md b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/height.md new file mode 100644 index 0000000000000000000000000000000000000000..a0a46f61f44aa0954139cfba96d5d7961f1db166 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/height.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorScrollInfo.height.md" +cssclasses: hide-title +--- + + + +[`EditorScrollInfo`](obsidian.EditorScrollInfo.md) › [`height`](obsidian.EditorScrollInfo.height.md) + +## EditorScrollInfo.height property + + +**Signature:** + +```typescript +height: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/left.md b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/left.md new file mode 100644 index 0000000000000000000000000000000000000000..5aee60995c7acf9f6aa24313a05ea230b80268f0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/left.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorScrollInfo.left.md" +cssclasses: hide-title +--- + + + +[`EditorScrollInfo`](obsidian.EditorScrollInfo.md) › [`left`](obsidian.EditorScrollInfo.left.md) + +## EditorScrollInfo.left property + + +**Signature:** + +```typescript +left: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/top.md b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/top.md new file mode 100644 index 0000000000000000000000000000000000000000..afb8ac08d33562c77cf2a3a2ed379b163e2e5353 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/top.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorScrollInfo.top.md" +cssclasses: hide-title +--- + + + +[`EditorScrollInfo`](obsidian.EditorScrollInfo.md) › [`top`](obsidian.EditorScrollInfo.top.md) + +## EditorScrollInfo.top property + + +**Signature:** + +```typescript +top: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/width.md b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/width.md new file mode 100644 index 0000000000000000000000000000000000000000..d3eda0bc508cb84f065cb5f445bea657291f757d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorScrollInfo/width.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorScrollInfo.width.md" +cssclasses: hide-title +--- + + + +[`EditorScrollInfo`](obsidian.EditorScrollInfo.md) › [`width`](obsidian.EditorScrollInfo.width.md) + +## EditorScrollInfo.width property + + +**Signature:** + +```typescript +width: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSelection.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSelection.md new file mode 100644 index 0000000000000000000000000000000000000000..2f5b788c2256033cbcd0a936d90c805ea1e9322d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSelection.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.EditorSelection.md" +cssclasses: hide-title +--- + + + +[`EditorSelection`](obsidian.EditorSelection.md) + +## EditorSelection interface + + +**Signature:** + +```typescript +export interface EditorSelection +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`anchor`](obsidian.EditorSelection.anchor.md) | | [`EditorPosition`](obsidian.EditorPosition.md) | | +| [`head`](obsidian.EditorSelection.head.md) | | [`EditorPosition`](obsidian.EditorPosition.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSelection/anchor.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSelection/anchor.md new file mode 100644 index 0000000000000000000000000000000000000000..40df5ce19ab4c660732d7c395d4d041ba8a49143 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSelection/anchor.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorSelection.anchor.md" +cssclasses: hide-title +--- + + + +[`EditorSelection`](obsidian.EditorSelection.md) › [`anchor`](obsidian.EditorSelection.anchor.md) + +## EditorSelection.anchor property + + +**Signature:** + +```typescript +anchor: EditorPosition; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSelection/head.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSelection/head.md new file mode 100644 index 0000000000000000000000000000000000000000..37fa47e73d3cf47b75de1dc18595e3250ebb9186 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSelection/head.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorSelection.head.md" +cssclasses: hide-title +--- + + + +[`EditorSelection`](obsidian.EditorSelection.md) › [`head`](obsidian.EditorSelection.head.md) + +## EditorSelection.head property + + +**Signature:** + +```typescript +head: EditorPosition; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSelectionOrCaret.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSelectionOrCaret.md new file mode 100644 index 0000000000000000000000000000000000000000..6b72cd264f3cb168e5e1e4e8c605fb563a235a39 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSelectionOrCaret.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.EditorSelectionOrCaret.md" +cssclasses: hide-title +--- + + + +[`EditorSelectionOrCaret`](obsidian.EditorSelectionOrCaret.md) + +## EditorSelectionOrCaret interface + + +**Signature:** + +```typescript +export interface EditorSelectionOrCaret +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`anchor`](obsidian.EditorSelectionOrCaret.anchor.md) | | [`EditorPosition`](obsidian.EditorPosition.md) | | +| [`head?`](obsidian.EditorSelectionOrCaret.head.md) | | [`EditorPosition`](obsidian.EditorPosition.md) | _(Optional)_ | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSelectionOrCaret/anchor.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSelectionOrCaret/anchor.md new file mode 100644 index 0000000000000000000000000000000000000000..a279595797ba708df592008fdf9cf4bc2b437ed3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSelectionOrCaret/anchor.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorSelectionOrCaret.anchor.md" +cssclasses: hide-title +--- + + + +[`EditorSelectionOrCaret`](obsidian.EditorSelectionOrCaret.md) › [`anchor`](obsidian.EditorSelectionOrCaret.anchor.md) + +## EditorSelectionOrCaret.anchor property + + +**Signature:** + +```typescript +anchor: EditorPosition; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSelectionOrCaret/head.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSelectionOrCaret/head.md new file mode 100644 index 0000000000000000000000000000000000000000..f657d5f6df1529d5542ab233f27b59aaf8b8c67b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSelectionOrCaret/head.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorSelectionOrCaret.head.md" +cssclasses: hide-title +--- + + + +[`EditorSelectionOrCaret`](obsidian.EditorSelectionOrCaret.md) › [`head`](obsidian.EditorSelectionOrCaret.head.md) + +## EditorSelectionOrCaret.head property + + +**Signature:** + +```typescript +head?: EditorPosition; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest.md new file mode 100644 index 0000000000000000000000000000000000000000..c816ff0ef6c18cc982140caaff8c69025712290b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest.md @@ -0,0 +1,40 @@ +--- +aliases: "obsidian.EditorSuggest.md" +cssclasses: hide-title +--- + + + +[`EditorSuggest`](obsidian.EditorSuggest.md) + +## EditorSuggest class + + +**Signature:** + +```typescript +export abstract class EditorSuggest extends PopoverSuggest +``` +**Extends:** [`PopoverSuggest`](obsidian.PopoverSuggest.md)`` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(app)`](obsidian.EditorSuggest.(constructor).md) | | Constructs a new instance of the EditorSuggest class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`context`](obsidian.EditorSuggest.context.md) | | [`EditorSuggestContext`](obsidian.EditorSuggestContext.md) | null | Current suggestion context, containing the result of onTrigger. This will be null any time the EditorSuggest is not supposed to run. | +| [`limit`](obsidian.EditorSuggest.limit.md) | | number | Override this to use a different limit for suggestion items | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getSuggestions(context)`](obsidian.EditorSuggest.getSuggestions.md) | abstract | Generate suggestion items based on this context. Can be async, but preferably sync. When generating async suggestions, you should pass the context along. | +| [`onTrigger(cursor, editor, file)`](obsidian.EditorSuggest.onTrigger.md) | abstract |

Based on the editor line and cursor position, determine if this EditorSuggest should be triggered at this moment. Typically, you would run a regular expression on the current line text before the cursor. Return null to indicate that this editor suggest is not supposed to be triggered.

Please be mindful of performance when implementing this function, as it will be triggered very often (on each keypress). Keep it simple, and return null as early as possible if you determine that it is not the right time.

| +| [`setInstructions(instructions)`](obsidian.EditorSuggest.setInstructions.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..e102d7c57f41933ebabd3022989e08048ce26400 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.EditorSuggest.(constructor).md" +cssclasses: hide-title +--- + + + +[`EditorSuggest`](obsidian.EditorSuggest.md) › [`(constructor)`](obsidian.EditorSuggest.(constructor).md) + +## EditorSuggest.(constructor) + +Constructs a new instance of the `EditorSuggest` class + +**Signature:** + +```typescript +constructor(app: App); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| app | [`App`](obsidian.App.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/context.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/context.md new file mode 100644 index 0000000000000000000000000000000000000000..d735442b28ee9f89c304dfc804bf367a95f45bb6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/context.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.EditorSuggest.context.md" +cssclasses: hide-title +--- + + + +[`EditorSuggest`](obsidian.EditorSuggest.md) › [`context`](obsidian.EditorSuggest.context.md) + +## EditorSuggest.context property + +Current suggestion context, containing the result of `onTrigger`. This will be null any time the EditorSuggest is not supposed to run. + +**Signature:** + +```typescript +context: EditorSuggestContext | null; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/getSuggestions.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/getSuggestions.md new file mode 100644 index 0000000000000000000000000000000000000000..940d9af214896acdfbe79451048f5adff8db97ce --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/getSuggestions.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.EditorSuggest.getSuggestions.md" +cssclasses: hide-title +--- + + + +[`EditorSuggest`](obsidian.EditorSuggest.md) › [`getSuggestions`](obsidian.EditorSuggest.getSuggestions.md) + +## EditorSuggest.getSuggestions() method + +Generate suggestion items based on this context. Can be async, but preferably sync. When generating async suggestions, you should pass the context along. + +**Signature:** + +```typescript +abstract getSuggestions(context: EditorSuggestContext): T[] | Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| context | [`EditorSuggestContext`](obsidian.EditorSuggestContext.md) | | + +**Returns:** + +`T[] | ``Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/limit.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/limit.md new file mode 100644 index 0000000000000000000000000000000000000000..203a1cf6c4f2454e6a768d5afc841ffd9df24106 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/limit.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.EditorSuggest.limit.md" +cssclasses: hide-title +--- + + + +[`EditorSuggest`](obsidian.EditorSuggest.md) › [`limit`](obsidian.EditorSuggest.limit.md) + +## EditorSuggest.limit property + +Override this to use a different limit for suggestion items + +**Signature:** + +```typescript +limit: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/onTrigger.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/onTrigger.md new file mode 100644 index 0000000000000000000000000000000000000000..f5af370ccf157f73cff2873193223f0b150a9211 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/onTrigger.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.EditorSuggest.onTrigger.md" +cssclasses: hide-title +--- + + + +[`EditorSuggest`](obsidian.EditorSuggest.md) › [`onTrigger`](obsidian.EditorSuggest.onTrigger.md) + +## EditorSuggest.onTrigger() method + +Based on the editor line and cursor position, determine if this EditorSuggest should be triggered at this moment. Typically, you would run a regular expression on the current line text before the cursor. Return null to indicate that this editor suggest is not supposed to be triggered. + +Please be mindful of performance when implementing this function, as it will be triggered very often (on each keypress). Keep it simple, and return null as early as possible if you determine that it is not the right time. + +**Signature:** + +```typescript +abstract onTrigger(cursor: EditorPosition, editor: Editor, file: TFile | null): EditorSuggestTriggerInfo | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cursor | [`EditorPosition`](obsidian.EditorPosition.md) | | +| editor | [`Editor`](obsidian.Editor.md) | | +| file | [`TFile`](obsidian.TFile.md) | null | | + +**Returns:** + +[`EditorSuggestTriggerInfo`](obsidian.EditorSuggestTriggerInfo.md)` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/setInstructions.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/setInstructions.md new file mode 100644 index 0000000000000000000000000000000000000000..1754b93ffa9124fb32f261439f8522d757f4cfeb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggest/setInstructions.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.EditorSuggest.setInstructions.md" +cssclasses: hide-title +--- + + + +[`EditorSuggest`](obsidian.EditorSuggest.md) › [`setInstructions`](obsidian.EditorSuggest.setInstructions.md) + +## EditorSuggest.setInstructions() method + + +**Signature:** + +```typescript +setInstructions(instructions: Instruction[]): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| instructions | [`Instruction`](obsidian.Instruction.md)[] | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestContext.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestContext.md new file mode 100644 index 0000000000000000000000000000000000000000..3bb546aaa01e3192e0adb82ce30ba8223d7fab76 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestContext.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.EditorSuggestContext.md" +cssclasses: hide-title +--- + + + +[`EditorSuggestContext`](obsidian.EditorSuggestContext.md) + +## EditorSuggestContext interface + + +**Signature:** + +```typescript +export interface EditorSuggestContext extends EditorSuggestTriggerInfo +``` +**Extends:** [`EditorSuggestTriggerInfo`](obsidian.EditorSuggestTriggerInfo.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`editor`](obsidian.EditorSuggestContext.editor.md) | | [`Editor`](obsidian.Editor.md) | | +| [`file`](obsidian.EditorSuggestContext.file.md) | | [`TFile`](obsidian.TFile.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestContext/editor.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestContext/editor.md new file mode 100644 index 0000000000000000000000000000000000000000..11ea69bde4ae4c101b98d43519c45206d12a57eb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestContext/editor.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorSuggestContext.editor.md" +cssclasses: hide-title +--- + + + +[`EditorSuggestContext`](obsidian.EditorSuggestContext.md) › [`editor`](obsidian.EditorSuggestContext.editor.md) + +## EditorSuggestContext.editor property + + +**Signature:** + +```typescript +editor: Editor; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestContext/file.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestContext/file.md new file mode 100644 index 0000000000000000000000000000000000000000..e92332d2e4ce96fa30bd4f056c0c6d210ea48f85 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestContext/file.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorSuggestContext.file.md" +cssclasses: hide-title +--- + + + +[`EditorSuggestContext`](obsidian.EditorSuggestContext.md) › [`file`](obsidian.EditorSuggestContext.file.md) + +## EditorSuggestContext.file property + + +**Signature:** + +```typescript +file: TFile; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..ae689cfe062dc9facb33da294d0e50d444b15117 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.EditorSuggestTriggerInfo.md" +cssclasses: hide-title +--- + + + +[`EditorSuggestTriggerInfo`](obsidian.EditorSuggestTriggerInfo.md) + +## EditorSuggestTriggerInfo interface + + +**Signature:** + +```typescript +export interface EditorSuggestTriggerInfo +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`end`](obsidian.EditorSuggestTriggerInfo.end.md) | | [`EditorPosition`](obsidian.EditorPosition.md) | The end position of the triggering text. This is used to position the popover. | +| [`query`](obsidian.EditorSuggestTriggerInfo.query.md) | | string | They query string (usually the text between start and end) that will be used to generate the suggestion content. | +| [`start`](obsidian.EditorSuggestTriggerInfo.start.md) | | [`EditorPosition`](obsidian.EditorPosition.md) | The start position of the triggering text. This is used to position the popover. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo/end.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo/end.md new file mode 100644 index 0000000000000000000000000000000000000000..faf1b697adfa2b83b410551265322417fd3b3495 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo/end.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.EditorSuggestTriggerInfo.end.md" +cssclasses: hide-title +--- + + + +[`EditorSuggestTriggerInfo`](obsidian.EditorSuggestTriggerInfo.md) › [`end`](obsidian.EditorSuggestTriggerInfo.end.md) + +## EditorSuggestTriggerInfo.end property + +The end position of the triggering text. This is used to position the popover. + +**Signature:** + +```typescript +end: EditorPosition; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo/query.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo/query.md new file mode 100644 index 0000000000000000000000000000000000000000..28ffb415d8993c46e1cfb754a4b447800b0aa77d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo/query.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.EditorSuggestTriggerInfo.query.md" +cssclasses: hide-title +--- + + + +[`EditorSuggestTriggerInfo`](obsidian.EditorSuggestTriggerInfo.md) › [`query`](obsidian.EditorSuggestTriggerInfo.query.md) + +## EditorSuggestTriggerInfo.query property + +They query string (usually the text between start and end) that will be used to generate the suggestion content. + +**Signature:** + +```typescript +query: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo/start.md b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo/start.md new file mode 100644 index 0000000000000000000000000000000000000000..e9b83b6274dc0323db080f658dab26205b0ccd7c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorSuggestTriggerInfo/start.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.EditorSuggestTriggerInfo.start.md" +cssclasses: hide-title +--- + + + +[`EditorSuggestTriggerInfo`](obsidian.EditorSuggestTriggerInfo.md) › [`start`](obsidian.EditorSuggestTriggerInfo.start.md) + +## EditorSuggestTriggerInfo.start property + +The start position of the triggering text. This is used to position the popover. + +**Signature:** + +```typescript +start: EditorPosition; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction.md b/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction.md new file mode 100644 index 0000000000000000000000000000000000000000..f2e88d1b1f437484d3814ca26d9235c78a15f91d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.EditorTransaction.md" +cssclasses: hide-title +--- + + + +[`EditorTransaction`](obsidian.EditorTransaction.md) + +## EditorTransaction interface + + +**Signature:** + +```typescript +export interface EditorTransaction +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`changes?`](obsidian.EditorTransaction.changes.md) | | [`EditorChange`](obsidian.EditorChange.md)[] | _(Optional)_ | +| [`replaceSelection?`](obsidian.EditorTransaction.replaceSelection.md) | | string | _(Optional)_ | +| [`selection?`](obsidian.EditorTransaction.selection.md) | | [`EditorRangeOrCaret`](obsidian.EditorRangeOrCaret.md) | _(Optional)_ | +| [`selections?`](obsidian.EditorTransaction.selections.md) | | [`EditorRangeOrCaret`](obsidian.EditorRangeOrCaret.md)[] | _(Optional)_ Multiple selections, overrides selection. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/changes.md b/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/changes.md new file mode 100644 index 0000000000000000000000000000000000000000..60f92c79e871948ce1840eb6e17cb4d790e4c520 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/changes.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorTransaction.changes.md" +cssclasses: hide-title +--- + + + +[`EditorTransaction`](obsidian.EditorTransaction.md) › [`changes`](obsidian.EditorTransaction.changes.md) + +## EditorTransaction.changes property + + +**Signature:** + +```typescript +changes?: EditorChange[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/replaceSelection.md b/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/replaceSelection.md new file mode 100644 index 0000000000000000000000000000000000000000..545c89b42941f7bc23ab8966a0526816d8f8d304 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/replaceSelection.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorTransaction.replaceSelection.md" +cssclasses: hide-title +--- + + + +[`EditorTransaction`](obsidian.EditorTransaction.md) › [`replaceSelection`](obsidian.EditorTransaction.replaceSelection.md) + +## EditorTransaction.replaceSelection property + + +**Signature:** + +```typescript +replaceSelection?: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/selection.md b/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/selection.md new file mode 100644 index 0000000000000000000000000000000000000000..11f15badd5f9c9ca8a1afdeec8643b3faaf917b4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/selection.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EditorTransaction.selection.md" +cssclasses: hide-title +--- + + + +[`EditorTransaction`](obsidian.EditorTransaction.md) › [`selection`](obsidian.EditorTransaction.selection.md) + +## EditorTransaction.selection property + + +**Signature:** + +```typescript +selection?: EditorRangeOrCaret; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/selections.md b/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/selections.md new file mode 100644 index 0000000000000000000000000000000000000000..dc3ade0b4e484cd324f9ec6997cfba9955c125f5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EditorTransaction/selections.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.EditorTransaction.selections.md" +cssclasses: hide-title +--- + + + +[`EditorTransaction`](obsidian.EditorTransaction.md) › [`selections`](obsidian.EditorTransaction.selections.md) + +## EditorTransaction.selections property + +Multiple selections, overrides `selection`. + +**Signature:** + +```typescript +selections?: EditorRangeOrCaret[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/EmbedCache.md b/docs/obsidian-developer/Reference/TypeScript API/EmbedCache.md new file mode 100644 index 0000000000000000000000000000000000000000..132fcffe55a6de3122ff59d7afbc58b6a0ef5b8d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EmbedCache.md @@ -0,0 +1,19 @@ +--- +aliases: "obsidian.EmbedCache.md" +cssclasses: hide-title +--- + + + +[`EmbedCache`](obsidian.EmbedCache.md) + +## EmbedCache interface + + +**Signature:** + +```typescript +export interface EmbedCache extends ReferenceCache +``` +**Extends:** [`ReferenceCache`](obsidian.ReferenceCache.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/EventRef.md b/docs/obsidian-developer/Reference/TypeScript API/EventRef.md new file mode 100644 index 0000000000000000000000000000000000000000..b953cf96507540c432c2bf3d77f844e778eb4897 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/EventRef.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.EventRef.md" +cssclasses: hide-title +--- + + + +[`EventRef`](obsidian.EventRef.md) + +## EventRef interface + + +**Signature:** + +```typescript +export interface EventRef +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Events.md b/docs/obsidian-developer/Reference/TypeScript API/Events.md new file mode 100644 index 0000000000000000000000000000000000000000..a199befb0917dce1c32e81b7fe16358420fa2e94 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Events.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Events.md" +cssclasses: hide-title +--- + + + +[`Events`](obsidian.Events.md) + +## Events class + + +**Signature:** + +```typescript +export class Events +``` + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`off(name, callback)`](obsidian.Events.off.md) | | | +| [`offref(ref)`](obsidian.Events.offref.md) | | | +| [`on(name, callback, ctx)`](obsidian.Events.on.md) | | | +| [`trigger(name, data)`](obsidian.Events.trigger.md) | | | +| [`tryTrigger(evt, args)`](obsidian.Events.tryTrigger.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Events/off.md b/docs/obsidian-developer/Reference/TypeScript API/Events/off.md new file mode 100644 index 0000000000000000000000000000000000000000..28f448780f18dfd968d5928d5e6bc5358f1b53b2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Events/off.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Events.off.md" +cssclasses: hide-title +--- + + + +[`Events`](obsidian.Events.md) › [`off`](obsidian.Events.off.md) + +## Events.off() method + + +**Signature:** + +```typescript +off(name: string, callback: (...data: any) => any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | +| callback | (...data: any) => any | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Events/offref.md b/docs/obsidian-developer/Reference/TypeScript API/Events/offref.md new file mode 100644 index 0000000000000000000000000000000000000000..d8dab6d44930c10b68fea3a661683bdf6b90278a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Events/offref.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Events.offref.md" +cssclasses: hide-title +--- + + + +[`Events`](obsidian.Events.md) › [`offref`](obsidian.Events.offref.md) + +## Events.offref() method + + +**Signature:** + +```typescript +offref(ref: EventRef): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| ref | [`EventRef`](obsidian.EventRef.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Events/on.md b/docs/obsidian-developer/Reference/TypeScript API/Events/on.md new file mode 100644 index 0000000000000000000000000000000000000000..e0a153acbe0017bd1500d26977b2d6b083ca3273 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Events/on.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Events.on.md" +cssclasses: hide-title +--- + + + +[`Events`](obsidian.Events.md) › [`on`](obsidian.Events.on.md) + +## Events.on() method + + +**Signature:** + +```typescript +on(name: string, callback: (...data: any) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | +| callback | (...data: any) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Events/trigger.md b/docs/obsidian-developer/Reference/TypeScript API/Events/trigger.md new file mode 100644 index 0000000000000000000000000000000000000000..35f58f3a64c9de2786e401b08a3bbec861156ce8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Events/trigger.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Events.trigger.md" +cssclasses: hide-title +--- + + + +[`Events`](obsidian.Events.md) › [`trigger`](obsidian.Events.trigger.md) + +## Events.trigger() method + + +**Signature:** + +```typescript +trigger(name: string, ...data: any[]): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | +| data | any[] | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Events/tryTrigger.md b/docs/obsidian-developer/Reference/TypeScript API/Events/tryTrigger.md new file mode 100644 index 0000000000000000000000000000000000000000..3dd1e1f09056447a08a544ede4a02ee505582bf8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Events/tryTrigger.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Events.tryTrigger.md" +cssclasses: hide-title +--- + + + +[`Events`](obsidian.Events.md) › [`tryTrigger`](obsidian.Events.tryTrigger.md) + +## Events.tryTrigger() method + + +**Signature:** + +```typescript +tryTrigger(evt: EventRef, args: any[]): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| evt | [`EventRef`](obsidian.EventRef.md) | | +| args | any[] | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent.md b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..8c006d448c9106496db871a6f3d4f395c6b6fc7d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent.md @@ -0,0 +1,40 @@ +--- +aliases: "obsidian.ExtraButtonComponent.md" +cssclasses: hide-title +--- + + + +[`ExtraButtonComponent`](obsidian.ExtraButtonComponent.md) + +## ExtraButtonComponent class + + +**Signature:** + +```typescript +export class ExtraButtonComponent extends BaseComponent +``` +**Extends:** [`BaseComponent`](obsidian.BaseComponent.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.ExtraButtonComponent.(constructor).md) | | Constructs a new instance of the ExtraButtonComponent class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`extraSettingsEl`](obsidian.ExtraButtonComponent.extraSettingsEl.md) | | HTMLElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`onClick(callback)`](obsidian.ExtraButtonComponent.onClick.md) | | | +| [`setDisabled(disabled)`](obsidian.ExtraButtonComponent.setDisabled.md) | | | +| [`setIcon(icon)`](obsidian.ExtraButtonComponent.setIcon.md) | | | +| [`setTooltip(tooltip, options)`](obsidian.ExtraButtonComponent.setTooltip.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..225303e27b9f71db87791d83bfeec331e80774bd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.ExtraButtonComponent.(constructor).md" +cssclasses: hide-title +--- + + + +[`ExtraButtonComponent`](obsidian.ExtraButtonComponent.md) › [`(constructor)`](obsidian.ExtraButtonComponent.(constructor).md) + +## ExtraButtonComponent.(constructor) + +Constructs a new instance of the `ExtraButtonComponent` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/extraSettingsEl.md b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/extraSettingsEl.md new file mode 100644 index 0000000000000000000000000000000000000000..dd4b845f76940f70155299b851288ca03fef1807 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/extraSettingsEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ExtraButtonComponent.extraSettingsEl.md" +cssclasses: hide-title +--- + + + +[`ExtraButtonComponent`](obsidian.ExtraButtonComponent.md) › [`extraSettingsEl`](obsidian.ExtraButtonComponent.extraSettingsEl.md) + +## ExtraButtonComponent.extraSettingsEl property + + +**Signature:** + +```typescript +extraSettingsEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/onClick.md b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/onClick.md new file mode 100644 index 0000000000000000000000000000000000000000..7d1246ea66177a403b8ced3e6e958de9af9ec49a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/onClick.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ExtraButtonComponent.onClick.md" +cssclasses: hide-title +--- + + + +[`ExtraButtonComponent`](obsidian.ExtraButtonComponent.md) › [`onClick`](obsidian.ExtraButtonComponent.onClick.md) + +## ExtraButtonComponent.onClick() method + + +**Signature:** + +```typescript +onClick(callback: () => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | () => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/setDisabled.md b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/setDisabled.md new file mode 100644 index 0000000000000000000000000000000000000000..3b3c028cfe525056416fbbd4b55cbd13434462e6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/setDisabled.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ExtraButtonComponent.setDisabled.md" +cssclasses: hide-title +--- + + + +[`ExtraButtonComponent`](obsidian.ExtraButtonComponent.md) › [`setDisabled`](obsidian.ExtraButtonComponent.setDisabled.md) + +## ExtraButtonComponent.setDisabled() method + + +**Signature:** + +```typescript +setDisabled(disabled: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| disabled | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/setIcon.md b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/setIcon.md new file mode 100644 index 0000000000000000000000000000000000000000..2a6c3cad27533f64bb747cadaeecab06d59e5ad2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/setIcon.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.ExtraButtonComponent.setIcon.md" +cssclasses: hide-title +--- + + + +[`ExtraButtonComponent`](obsidian.ExtraButtonComponent.md) › [`setIcon`](obsidian.ExtraButtonComponent.setIcon.md) + +## ExtraButtonComponent.setIcon() method + +**Signature:** + +```typescript +setIcon(icon: IconName): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| icon | [`IconName`](obsidian.IconName.md) | ID of the icon, can use any icon loaded with [addIcon()](obsidian.addIcon.md) or from the inbuilt library. | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/setTooltip.md b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/setTooltip.md new file mode 100644 index 0000000000000000000000000000000000000000..8cf62d65f8bfa07f4f2dbdbfe9b0f99827813d6d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ExtraButtonComponent/setTooltip.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.ExtraButtonComponent.setTooltip.md" +cssclasses: hide-title +--- + + + +[`ExtraButtonComponent`](obsidian.ExtraButtonComponent.md) › [`setTooltip`](obsidian.ExtraButtonComponent.setTooltip.md) + +## ExtraButtonComponent.setTooltip() method + + +**Signature:** + +```typescript +setTooltip(tooltip: string, options?: TooltipOptions): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| tooltip | string | | +| options | [`TooltipOptions`](obsidian.TooltipOptions.md) | _(Optional)_ | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileManager.md b/docs/obsidian-developer/Reference/TypeScript API/FileManager.md new file mode 100644 index 0000000000000000000000000000000000000000..eb979b7988a7105bf960930a4af00d8164de5e5d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileManager.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileManager.md" +cssclasses: hide-title +--- + + + +[`FileManager`](obsidian.FileManager.md) + +## FileManager class + +Manage the creation, deletion and renaming of files from the UI. + +**Signature:** + +```typescript +export class FileManager +``` + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`generateMarkdownLink(file, sourcePath, subpath, alias)`](obsidian.FileManager.generateMarkdownLink.md) | | Generate a markdown link based on the user's preferences. | +| [`getNewFileParent(sourcePath, newFilePath)`](obsidian.FileManager.getNewFileParent.md) | | Gets the folder that new files should be saved to, given the user's preferences. | +| [`processFrontMatter(file, fn, options)`](obsidian.FileManager.processFrontMatter.md) | |

Atomically read, modify, and save the frontmatter of a note. The frontmatter is passed in as a JS object, and should be mutated directly to achieve the desired result.

Remember to handle errors thrown by this method.

| +| [`renameFile(file, newPath)`](obsidian.FileManager.renameFile.md) | | Rename or move a file safely, and update all links to it depending on the user's preferences. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileManager/generateMarkdownLink.md b/docs/obsidian-developer/Reference/TypeScript API/FileManager/generateMarkdownLink.md new file mode 100644 index 0000000000000000000000000000000000000000..446af6aa135a0a173a7fc3d318d2f8b2ed38b31f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileManager/generateMarkdownLink.md @@ -0,0 +1,32 @@ +--- +aliases: "obsidian.FileManager.generateMarkdownLink.md" +cssclasses: hide-title +--- + + + +[`FileManager`](obsidian.FileManager.md) › [`generateMarkdownLink`](obsidian.FileManager.generateMarkdownLink.md) + +## FileManager.generateMarkdownLink() method + +Generate a markdown link based on the user's preferences. + +**Signature:** + +```typescript +generateMarkdownLink(file: TFile, sourcePath: string, subpath?: string, alias?: string): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | the file to link to. | +| sourcePath | string | where the link is stored in, used to compute relative links. | +| subpath | string | _(Optional)_ A subpath, starting with #, used for linking to headings or blocks. | +| alias | string | _(Optional)_ The display text if it's to be different than the file name. Pass empty string to use file name. | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileManager/getNewFileParent.md b/docs/obsidian-developer/Reference/TypeScript API/FileManager/getNewFileParent.md new file mode 100644 index 0000000000000000000000000000000000000000..3556f9e4e68158c82efb64d07c4b33e453357269 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileManager/getNewFileParent.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.FileManager.getNewFileParent.md" +cssclasses: hide-title +--- + + + +[`FileManager`](obsidian.FileManager.md) › [`getNewFileParent`](obsidian.FileManager.getNewFileParent.md) + +## FileManager.getNewFileParent() method + +Gets the folder that new files should be saved to, given the user's preferences. + +**Signature:** + +```typescript +getNewFileParent(sourcePath: string, newFilePath?: string): TFolder; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| sourcePath | string | The path to the current open/focused file, used when the user wants new files to be created "in the same folder". Use an empty string if there is no active file. | +| newFilePath | string | _(Optional)_ The path to the file that will be newly created, used to infer what settings to use based on the path's extension. | + +**Returns:** + +[`TFolder`](obsidian.TFolder.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileManager/processFrontMatter.md b/docs/obsidian-developer/Reference/TypeScript API/FileManager/processFrontMatter.md new file mode 100644 index 0000000000000000000000000000000000000000..be87dec2c36d61bae97e1e490a26ec7b3c6ae42d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileManager/processFrontMatter.md @@ -0,0 +1,39 @@ +--- +aliases: "obsidian.FileManager.processFrontMatter.md" +cssclasses: hide-title +--- + + + +[`FileManager`](obsidian.FileManager.md) › [`processFrontMatter`](obsidian.FileManager.processFrontMatter.md) + +## FileManager.processFrontMatter() method + +Atomically read, modify, and save the frontmatter of a note. The frontmatter is passed in as a JS object, and should be mutated directly to achieve the desired result. + +Remember to handle errors thrown by this method. + +**Signature:** + +```typescript +processFrontMatter(file: TFile, fn: (frontmatter: any) => void, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | the file to be modified. Must be a markdown file. | +| fn | (frontmatter: any) => void | a callback function which mutates the frontMatter object synchronously. | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ write options. | + +**Returns:** + +`Promise``` + +## Exceptions + +YAMLParseError if the YAML parsing fails + +any errors that your callback function throws + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileManager/renameFile.md b/docs/obsidian-developer/Reference/TypeScript API/FileManager/renameFile.md new file mode 100644 index 0000000000000000000000000000000000000000..65d99c0e4833c43f594eff8e7a44a5066326c382 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileManager/renameFile.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.FileManager.renameFile.md" +cssclasses: hide-title +--- + + + +[`FileManager`](obsidian.FileManager.md) › [`renameFile`](obsidian.FileManager.renameFile.md) + +## FileManager.renameFile() method + +Rename or move a file safely, and update all links to it depending on the user's preferences. + +**Signature:** + +```typescript +renameFile(file: TAbstractFile, newPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TAbstractFile`](obsidian.TAbstractFile.md) | the file to rename | +| newPath | string | the new path for the file | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileStats.md b/docs/obsidian-developer/Reference/TypeScript API/FileStats.md new file mode 100644 index 0000000000000000000000000000000000000000..c156142c7e4c838f80288285e5bd78b71d7389f5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileStats.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.FileStats.md" +cssclasses: hide-title +--- + + + +[`FileStats`](obsidian.FileStats.md) + +## FileStats interface + + +**Signature:** + +```typescript +export interface FileStats +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`ctime`](obsidian.FileStats.ctime.md) | | number | Time of creation, represented as a unix timestamp, in milliseconds. | +| [`mtime`](obsidian.FileStats.mtime.md) | | number | Time of last modification, represented as a unix timestamp, in milliseconds. | +| [`size`](obsidian.FileStats.size.md) | | number | Size on disk, as bytes. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileStats/ctime.md b/docs/obsidian-developer/Reference/TypeScript API/FileStats/ctime.md new file mode 100644 index 0000000000000000000000000000000000000000..ed2c03e6555da3a25b8b9199a84dd448728663af --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileStats/ctime.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.FileStats.ctime.md" +cssclasses: hide-title +--- + + + +[`FileStats`](obsidian.FileStats.md) › [`ctime`](obsidian.FileStats.ctime.md) + +## FileStats.ctime property + +Time of creation, represented as a unix timestamp, in milliseconds. + +**Signature:** + +```typescript +ctime: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileStats/mtime.md b/docs/obsidian-developer/Reference/TypeScript API/FileStats/mtime.md new file mode 100644 index 0000000000000000000000000000000000000000..e50301432f53f9d8e4d29e10b21ae509fe980a69 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileStats/mtime.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.FileStats.mtime.md" +cssclasses: hide-title +--- + + + +[`FileStats`](obsidian.FileStats.md) › [`mtime`](obsidian.FileStats.mtime.md) + +## FileStats.mtime property + +Time of last modification, represented as a unix timestamp, in milliseconds. + +**Signature:** + +```typescript +mtime: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileStats/size.md b/docs/obsidian-developer/Reference/TypeScript API/FileStats/size.md new file mode 100644 index 0000000000000000000000000000000000000000..7ed3a06ff49a1764c9be72bdf97c447be1debdf9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileStats/size.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.FileStats.size.md" +cssclasses: hide-title +--- + + + +[`FileStats`](obsidian.FileStats.md) › [`size`](obsidian.FileStats.size.md) + +## FileStats.size property + +Size on disk, as bytes. + +**Signature:** + +```typescript +size: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter.md new file mode 100644 index 0000000000000000000000000000000000000000..9f318dd637ee23dcca330497afbaf764f6b11872 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter.md @@ -0,0 +1,47 @@ +--- +aliases: "obsidian.FileSystemAdapter.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) + +## FileSystemAdapter class + + +**Signature:** + +```typescript +export class FileSystemAdapter implements DataAdapter +``` +**Implements:** [`DataAdapter`](obsidian.DataAdapter.md) + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`append(normalizedPath, data, options)`](obsidian.FileSystemAdapter.append.md) | | | +| [`copy(normalizedPath, normalizedNewPath)`](obsidian.FileSystemAdapter.copy.md) | | | +| [`exists(normalizedPath, sensitive)`](obsidian.FileSystemAdapter.exists.md) | | | +| [`getBasePath()`](obsidian.FileSystemAdapter.getBasePath.md) | | | +| [`getFilePath(normalizedPath)`](obsidian.FileSystemAdapter.getFilePath.md) | | Returns the file:// path of this file | +| [`getFullPath(normalizedPath)`](obsidian.FileSystemAdapter.getFullPath.md) | | | +| [`getName()`](obsidian.FileSystemAdapter.getName.md) | | | +| [`getResourcePath(normalizedPath)`](obsidian.FileSystemAdapter.getResourcePath.md) | | | +| [`list(normalizedPath)`](obsidian.FileSystemAdapter.list.md) | | | +| [`mkdir(normalizedPath)`](obsidian.FileSystemAdapter.mkdir.md) | | | +| [`mkdir(path)`](obsidian.FileSystemAdapter.mkdir.md) | static | | +| [`process(normalizedPath, fn, options)`](obsidian.FileSystemAdapter.process.md) | | | +| [`read(normalizedPath)`](obsidian.FileSystemAdapter.read.md) | | | +| [`readBinary(normalizedPath)`](obsidian.FileSystemAdapter.readBinary.md) | | | +| [`readLocalFile(path)`](obsidian.FileSystemAdapter.readLocalFile.md) | static | | +| [`remove(normalizedPath)`](obsidian.FileSystemAdapter.remove.md) | | | +| [`rename(normalizedPath, normalizedNewPath)`](obsidian.FileSystemAdapter.rename.md) | | | +| [`rmdir(normalizedPath, recursive)`](obsidian.FileSystemAdapter.rmdir.md) | | | +| [`stat(normalizedPath)`](obsidian.FileSystemAdapter.stat.md) | | | +| [`trashLocal(normalizedPath)`](obsidian.FileSystemAdapter.trashLocal.md) | | | +| [`trashSystem(normalizedPath)`](obsidian.FileSystemAdapter.trashSystem.md) | | | +| [`write(normalizedPath, data, options)`](obsidian.FileSystemAdapter.write.md) | | | +| [`writeBinary(normalizedPath, data, options)`](obsidian.FileSystemAdapter.writeBinary.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/append.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/append.md new file mode 100644 index 0000000000000000000000000000000000000000..1c0b951316f7a30662741cb69159f47aefce5bd4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/append.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.FileSystemAdapter.append.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`append`](obsidian.FileSystemAdapter.append.md) + +## FileSystemAdapter.append() method + + +**Signature:** + +```typescript +append(normalizedPath: string, data: string, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | +| data | string | | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/copy.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/copy.md new file mode 100644 index 0000000000000000000000000000000000000000..13310d9a0b3a64ed65326a2ea514fca707164743 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/copy.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.FileSystemAdapter.copy.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`copy`](obsidian.FileSystemAdapter.copy.md) + +## FileSystemAdapter.copy() method + + +**Signature:** + +```typescript +copy(normalizedPath: string, normalizedNewPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | +| normalizedNewPath | string | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/exists.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/exists.md new file mode 100644 index 0000000000000000000000000000000000000000..d7e205e47980c2fd6f2b492625f8469ca0738fc3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/exists.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.FileSystemAdapter.exists.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`exists`](obsidian.FileSystemAdapter.exists.md) + +## FileSystemAdapter.exists() method + + +**Signature:** + +```typescript +exists(normalizedPath: string, sensitive?: boolean): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | +| sensitive | boolean | _(Optional)_ | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getBasePath.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getBasePath.md new file mode 100644 index 0000000000000000000000000000000000000000..36567754dda91205e320ae2ef47c6ab744eb8831 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getBasePath.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.FileSystemAdapter.getBasePath.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`getBasePath`](obsidian.FileSystemAdapter.getBasePath.md) + +## FileSystemAdapter.getBasePath() method + + +**Signature:** + +```typescript +getBasePath(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getFilePath.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getFilePath.md new file mode 100644 index 0000000000000000000000000000000000000000..1ae5d0f036f8cc04d4120b1eb44a004057cf10c7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getFilePath.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.FileSystemAdapter.getFilePath.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`getFilePath`](obsidian.FileSystemAdapter.getFilePath.md) + +## FileSystemAdapter.getFilePath() method + +Returns the file:// path of this file + +**Signature:** + +```typescript +getFilePath(normalizedPath: string): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getFullPath.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getFullPath.md new file mode 100644 index 0000000000000000000000000000000000000000..c7c79b9de858ca26107791d32db6214831f6d347 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getFullPath.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileSystemAdapter.getFullPath.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`getFullPath`](obsidian.FileSystemAdapter.getFullPath.md) + +## FileSystemAdapter.getFullPath() method + + +**Signature:** + +```typescript +getFullPath(normalizedPath: string): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getName.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getName.md new file mode 100644 index 0000000000000000000000000000000000000000..b126a5ba1243d3539011f6f7b59ced6fc7c0fd38 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getName.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.FileSystemAdapter.getName.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`getName`](obsidian.FileSystemAdapter.getName.md) + +## FileSystemAdapter.getName() method + + +**Signature:** + +```typescript +getName(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getResourcePath.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getResourcePath.md new file mode 100644 index 0000000000000000000000000000000000000000..17e45f8592d7bb01a22ede88d2714e86e23aaabe --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/getResourcePath.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileSystemAdapter.getResourcePath.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`getResourcePath`](obsidian.FileSystemAdapter.getResourcePath.md) + +## FileSystemAdapter.getResourcePath() method + + +**Signature:** + +```typescript +getResourcePath(normalizedPath: string): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/list.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/list.md new file mode 100644 index 0000000000000000000000000000000000000000..48780959e8c3a86d161597f59c11ad52a9d625f8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/list.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileSystemAdapter.list.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`list`](obsidian.FileSystemAdapter.list.md) + +## FileSystemAdapter.list() method + + +**Signature:** + +```typescript +list(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | + +**Returns:** + +`Promise``<`[`ListedFiles`](obsidian.ListedFiles.md)`>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/mkdir.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/mkdir.md new file mode 100644 index 0000000000000000000000000000000000000000..170c1248a212671a99bc2728097db9331ede8a21 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/mkdir.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileSystemAdapter.mkdir.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`mkdir`](obsidian.FileSystemAdapter.mkdir.md) + +## FileSystemAdapter.mkdir() method + + +**Signature:** + +```typescript +static mkdir(path: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| path | string | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/process.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/process.md new file mode 100644 index 0000000000000000000000000000000000000000..ca56ef6df74a18c8342b647276f0947d749ef168 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/process.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.FileSystemAdapter.process.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`process`](obsidian.FileSystemAdapter.process.md) + +## FileSystemAdapter.process() method + + +**Signature:** + +```typescript +process(normalizedPath: string, fn: (data: string) => string, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | +| fn | (data: string) => string | | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/read.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/read.md new file mode 100644 index 0000000000000000000000000000000000000000..738fdff8d5850eb0ca8745fbea6dec37c5d8f0ef --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/read.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileSystemAdapter.read.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`read`](obsidian.FileSystemAdapter.read.md) + +## FileSystemAdapter.read() method + + +**Signature:** + +```typescript +read(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/readBinary.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/readBinary.md new file mode 100644 index 0000000000000000000000000000000000000000..96ba2aaf57e2753ab0901747ba1f7bf6a4568abb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/readBinary.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileSystemAdapter.readBinary.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`readBinary`](obsidian.FileSystemAdapter.readBinary.md) + +## FileSystemAdapter.readBinary() method + + +**Signature:** + +```typescript +readBinary(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | + +**Returns:** + +`Promise``<``ArrayBuffer``>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/readLocalFile.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/readLocalFile.md new file mode 100644 index 0000000000000000000000000000000000000000..734cecc0b6455166bd1cae891dcc70302fcb36eb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/readLocalFile.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileSystemAdapter.readLocalFile.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`readLocalFile`](obsidian.FileSystemAdapter.readLocalFile.md) + +## FileSystemAdapter.readLocalFile() method + + +**Signature:** + +```typescript +static readLocalFile(path: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| path | string | | + +**Returns:** + +`Promise``<``ArrayBuffer``>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/remove.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/remove.md new file mode 100644 index 0000000000000000000000000000000000000000..593c9eb506d12c603c6fb9bab6334c9f0ae26f83 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/remove.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileSystemAdapter.remove.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`remove`](obsidian.FileSystemAdapter.remove.md) + +## FileSystemAdapter.remove() method + + +**Signature:** + +```typescript +remove(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/rename.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/rename.md new file mode 100644 index 0000000000000000000000000000000000000000..60d095a85df018b64dfe5697c2df1ae04fb42e24 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/rename.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.FileSystemAdapter.rename.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`rename`](obsidian.FileSystemAdapter.rename.md) + +## FileSystemAdapter.rename() method + + +**Signature:** + +```typescript +rename(normalizedPath: string, normalizedNewPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | +| normalizedNewPath | string | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/rmdir.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/rmdir.md new file mode 100644 index 0000000000000000000000000000000000000000..a80469d3bf233152e88ca19283736614fc5f3e25 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/rmdir.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.FileSystemAdapter.rmdir.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`rmdir`](obsidian.FileSystemAdapter.rmdir.md) + +## FileSystemAdapter.rmdir() method + + +**Signature:** + +```typescript +rmdir(normalizedPath: string, recursive: boolean): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | +| recursive | boolean | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/stat.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/stat.md new file mode 100644 index 0000000000000000000000000000000000000000..15fb76a003914fa161843495d86effc2d1a50759 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/stat.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileSystemAdapter.stat.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`stat`](obsidian.FileSystemAdapter.stat.md) + +## FileSystemAdapter.stat() method + + +**Signature:** + +```typescript +stat(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | + +**Returns:** + +`Promise``<`[`Stat`](obsidian.Stat.md)` | null>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/trashLocal.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/trashLocal.md new file mode 100644 index 0000000000000000000000000000000000000000..873381eafc9f041379979d71ce4dee726ccff5f5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/trashLocal.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileSystemAdapter.trashLocal.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`trashLocal`](obsidian.FileSystemAdapter.trashLocal.md) + +## FileSystemAdapter.trashLocal() method + + +**Signature:** + +```typescript +trashLocal(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/trashSystem.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/trashSystem.md new file mode 100644 index 0000000000000000000000000000000000000000..1b22504da8c95a6c58e83baefc9ef9b7d96632b4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/trashSystem.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileSystemAdapter.trashSystem.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`trashSystem`](obsidian.FileSystemAdapter.trashSystem.md) + +## FileSystemAdapter.trashSystem() method + + +**Signature:** + +```typescript +trashSystem(normalizedPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/write.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/write.md new file mode 100644 index 0000000000000000000000000000000000000000..292cbe2417f647572e4a24894b04f7f61233b025 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/write.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.FileSystemAdapter.write.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`write`](obsidian.FileSystemAdapter.write.md) + +## FileSystemAdapter.write() method + + +**Signature:** + +```typescript +write(normalizedPath: string, data: string, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | +| data | string | | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/writeBinary.md b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/writeBinary.md new file mode 100644 index 0000000000000000000000000000000000000000..aabb517e5006d948ffa3d694c79a1b2ba4c2f375 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileSystemAdapter/writeBinary.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.FileSystemAdapter.writeBinary.md" +cssclasses: hide-title +--- + + + +[`FileSystemAdapter`](obsidian.FileSystemAdapter.md) › [`writeBinary`](obsidian.FileSystemAdapter.writeBinary.md) + +## FileSystemAdapter.writeBinary() method + + +**Signature:** + +```typescript +writeBinary(normalizedPath: string, data: ArrayBuffer, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| normalizedPath | string | | +| data | ArrayBuffer | | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView.md b/docs/obsidian-developer/Reference/TypeScript API/FileView.md new file mode 100644 index 0000000000000000000000000000000000000000..870f4e8d6396931ef11bc382a9253142a2e03ec0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView.md @@ -0,0 +1,46 @@ +--- +aliases: "obsidian.FileView.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) + +## FileView class + + +**Signature:** + +```typescript +export abstract class FileView extends ItemView +``` +**Extends:** [`ItemView`](obsidian.ItemView.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(leaf)`](obsidian.FileView.(constructor).md) | | Constructs a new instance of the FileView class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`allowNoFile`](obsidian.FileView.allowNoFile.md) | | boolean | | +| [`file`](obsidian.FileView.file.md) | | [`TFile`](obsidian.TFile.md) | null | | +| [`navigation`](obsidian.FileView.navigation.md) | | boolean | File views can be navigated by default. | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`canAcceptExtension(extension)`](obsidian.FileView.canAcceptExtension.md) | | | +| [`getDisplayText()`](obsidian.FileView.getDisplayText.md) | | | +| [`getState()`](obsidian.FileView.getState.md) | | | +| [`onload()`](obsidian.FileView.onload.md) | | | +| [`onLoadFile(file)`](obsidian.FileView.onLoadFile.md) | | | +| [`onRename(file)`](obsidian.FileView.onRename.md) | | | +| [`onUnloadFile(file)`](obsidian.FileView.onUnloadFile.md) | | | +| [`setState(state, result)`](obsidian.FileView.setState.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/FileView/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..3e544bff6dc78bb5f38d8f39d05b574706e27323 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.FileView.(constructor).md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`(constructor)`](obsidian.FileView.(constructor).md) + +## FileView.(constructor) + +Constructs a new instance of the `FileView` class + +**Signature:** + +```typescript +constructor(leaf: WorkspaceLeaf); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/allowNoFile.md b/docs/obsidian-developer/Reference/TypeScript API/FileView/allowNoFile.md new file mode 100644 index 0000000000000000000000000000000000000000..2d97ba1397bea4dfe3838b2b759b4a1587c50184 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/allowNoFile.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.FileView.allowNoFile.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`allowNoFile`](obsidian.FileView.allowNoFile.md) + +## FileView.allowNoFile property + + +**Signature:** + +```typescript +allowNoFile: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/canAcceptExtension.md b/docs/obsidian-developer/Reference/TypeScript API/FileView/canAcceptExtension.md new file mode 100644 index 0000000000000000000000000000000000000000..edf2e2caeea1f9c59f8c2e45625f17578c49054e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/canAcceptExtension.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileView.canAcceptExtension.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`canAcceptExtension`](obsidian.FileView.canAcceptExtension.md) + +## FileView.canAcceptExtension() method + + +**Signature:** + +```typescript +canAcceptExtension(extension: string): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| extension | string | | + +**Returns:** + +`boolean` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/file.md b/docs/obsidian-developer/Reference/TypeScript API/FileView/file.md new file mode 100644 index 0000000000000000000000000000000000000000..28b9f555eec7c587b4657448e3e8bd442cddb6b1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/file.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.FileView.file.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`file`](obsidian.FileView.file.md) + +## FileView.file property + + +**Signature:** + +```typescript +file: TFile | null; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/getDisplayText.md b/docs/obsidian-developer/Reference/TypeScript API/FileView/getDisplayText.md new file mode 100644 index 0000000000000000000000000000000000000000..a10a4547c6e1c26acc7105375e8e296a0ad3bbfd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/getDisplayText.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.FileView.getDisplayText.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`getDisplayText`](obsidian.FileView.getDisplayText.md) + +## FileView.getDisplayText() method + + +**Signature:** + +```typescript +getDisplayText(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/getState.md b/docs/obsidian-developer/Reference/TypeScript API/FileView/getState.md new file mode 100644 index 0000000000000000000000000000000000000000..c6cfc8ce320dcab16b1dec9cbd5656bd626d43a4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/getState.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.FileView.getState.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`getState`](obsidian.FileView.getState.md) + +## FileView.getState() method + + +**Signature:** + +```typescript +getState(): any; +``` +**Returns:** + +`any` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/navigation.md b/docs/obsidian-developer/Reference/TypeScript API/FileView/navigation.md new file mode 100644 index 0000000000000000000000000000000000000000..475853b8277e3ff32a820b4452e4f39cedabbde7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/navigation.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.FileView.navigation.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`navigation`](obsidian.FileView.navigation.md) + +## FileView.navigation property + +File views can be navigated by default. + +**Signature:** + +```typescript +navigation: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/onLoadFile.md b/docs/obsidian-developer/Reference/TypeScript API/FileView/onLoadFile.md new file mode 100644 index 0000000000000000000000000000000000000000..3bd4e483d42d8dc9987c5e0fd62f4934030a5127 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/onLoadFile.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileView.onLoadFile.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`onLoadFile`](obsidian.FileView.onLoadFile.md) + +## FileView.onLoadFile() method + + +**Signature:** + +```typescript +onLoadFile(file: TFile): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/onRename.md b/docs/obsidian-developer/Reference/TypeScript API/FileView/onRename.md new file mode 100644 index 0000000000000000000000000000000000000000..8788b15fca234ec372d161c6cd8edb04cd8131ee --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/onRename.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileView.onRename.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`onRename`](obsidian.FileView.onRename.md) + +## FileView.onRename() method + + +**Signature:** + +```typescript +onRename(file: TFile): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/onUnloadFile.md b/docs/obsidian-developer/Reference/TypeScript API/FileView/onUnloadFile.md new file mode 100644 index 0000000000000000000000000000000000000000..86a5a8b20d7157c6364474766ecd91192100d86a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/onUnloadFile.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FileView.onUnloadFile.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`onUnloadFile`](obsidian.FileView.onUnloadFile.md) + +## FileView.onUnloadFile() method + + +**Signature:** + +```typescript +onUnloadFile(file: TFile): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/onload.md b/docs/obsidian-developer/Reference/TypeScript API/FileView/onload.md new file mode 100644 index 0000000000000000000000000000000000000000..9b68c3d2b0e58e6d35c7f9010c2b26ed6776dc1f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/onload.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.FileView.onload.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`onload`](obsidian.FileView.onload.md) + +## FileView.onload() method + + +**Signature:** + +```typescript +onload(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FileView/setState.md b/docs/obsidian-developer/Reference/TypeScript API/FileView/setState.md new file mode 100644 index 0000000000000000000000000000000000000000..768f110acc6fc6a6fe535440295eec4b95ed62e6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FileView/setState.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.FileView.setState.md" +cssclasses: hide-title +--- + + + +[`FileView`](obsidian.FileView.md) › [`setState`](obsidian.FileView.setState.md) + +## FileView.setState() method + + +**Signature:** + +```typescript +setState(state: any, result: ViewStateResult): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| state | any | | +| result | [`ViewStateResult`](obsidian.ViewStateResult.md) | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FrontMatterCache.md b/docs/obsidian-developer/Reference/TypeScript API/FrontMatterCache.md new file mode 100644 index 0000000000000000000000000000000000000000..fd64bcf3813f72eed4ec2ef847818ee81e981f4e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FrontMatterCache.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.FrontMatterCache.md" +cssclasses: hide-title +--- + + + +[`FrontMatterCache`](obsidian.FrontMatterCache.md) + +## FrontMatterCache interface + + +**Signature:** + +```typescript +export interface FrontMatterCache +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/FrontmatterLinkCache.md b/docs/obsidian-developer/Reference/TypeScript API/FrontmatterLinkCache.md new file mode 100644 index 0000000000000000000000000000000000000000..066ccf1de99d90b1267c71a33dfef3a8701b371f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FrontmatterLinkCache.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.FrontmatterLinkCache.md" +cssclasses: hide-title +--- + + + +[`FrontmatterLinkCache`](obsidian.FrontmatterLinkCache.md) + +## FrontmatterLinkCache interface + + +**Signature:** + +```typescript +export interface FrontmatterLinkCache extends Reference +``` +**Extends:** [`Reference`](obsidian.Reference.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`key`](obsidian.FrontmatterLinkCache.key.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FrontmatterLinkCache/key.md b/docs/obsidian-developer/Reference/TypeScript API/FrontmatterLinkCache/key.md new file mode 100644 index 0000000000000000000000000000000000000000..b2bceff8b617f1e7f3203742dc5dd06753ebe52f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FrontmatterLinkCache/key.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.FrontmatterLinkCache.key.md" +cssclasses: hide-title +--- + + + +[`FrontmatterLinkCache`](obsidian.FrontmatterLinkCache.md) › [`key`](obsidian.FrontmatterLinkCache.key.md) + +## FrontmatterLinkCache.key property + + +**Signature:** + +```typescript +key: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/FuzzyMatch.md b/docs/obsidian-developer/Reference/TypeScript API/FuzzyMatch.md new file mode 100644 index 0000000000000000000000000000000000000000..564654a191d616b13d8818033957f2696f601223 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FuzzyMatch.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.FuzzyMatch.md" +cssclasses: hide-title +--- + + + +[`FuzzyMatch`](obsidian.FuzzyMatch.md) + +## FuzzyMatch interface + + +**Signature:** + +```typescript +export interface FuzzyMatch +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`item`](obsidian.FuzzyMatch.item.md) | | T | | +| [`match`](obsidian.FuzzyMatch.match.md) | | [`SearchResult`](obsidian.SearchResult.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FuzzyMatch/item.md b/docs/obsidian-developer/Reference/TypeScript API/FuzzyMatch/item.md new file mode 100644 index 0000000000000000000000000000000000000000..3c97af40d27c27589a9642a7b4b547da84c35598 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FuzzyMatch/item.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.FuzzyMatch.item.md" +cssclasses: hide-title +--- + + + +[`FuzzyMatch`](obsidian.FuzzyMatch.md) › [`item`](obsidian.FuzzyMatch.item.md) + +## FuzzyMatch.item property + + +**Signature:** + +```typescript +item: T; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/FuzzyMatch/match.md b/docs/obsidian-developer/Reference/TypeScript API/FuzzyMatch/match.md new file mode 100644 index 0000000000000000000000000000000000000000..0a0b256ebaa90077d15f443a319cfebe1d2526cc --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FuzzyMatch/match.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.FuzzyMatch.match.md" +cssclasses: hide-title +--- + + + +[`FuzzyMatch`](obsidian.FuzzyMatch.md) › [`match`](obsidian.FuzzyMatch.match.md) + +## FuzzyMatch.match property + + +**Signature:** + +```typescript +match: SearchResult; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal.md b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal.md new file mode 100644 index 0000000000000000000000000000000000000000..fc29f859815561fd93a2966f2571e573077b85c2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.FuzzySuggestModal.md" +cssclasses: hide-title +--- + + + +[`FuzzySuggestModal`](obsidian.FuzzySuggestModal.md) + +## FuzzySuggestModal class + + +**Signature:** + +```typescript +export abstract class FuzzySuggestModal extends SuggestModal> +``` +**Extends:** [`SuggestModal`](obsidian.SuggestModal.md)`<`[`FuzzyMatch`](obsidian.FuzzyMatch.md)`>` + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getItems()`](obsidian.FuzzySuggestModal.getItems.md) | abstract | | +| [`getItemText(item)`](obsidian.FuzzySuggestModal.getItemText.md) | abstract | | +| [`getSuggestions(query)`](obsidian.FuzzySuggestModal.getSuggestions.md) | | | +| [`onChooseItem(item, evt)`](obsidian.FuzzySuggestModal.onChooseItem.md) | abstract | | +| [`onChooseSuggestion(item, evt)`](obsidian.FuzzySuggestModal.onChooseSuggestion.md) | | | +| [`renderSuggestion(item, el)`](obsidian.FuzzySuggestModal.renderSuggestion.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/getItemText.md b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/getItemText.md new file mode 100644 index 0000000000000000000000000000000000000000..36c1be5236fb1f5933a8e102c00dce918d8f137d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/getItemText.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FuzzySuggestModal.getItemText.md" +cssclasses: hide-title +--- + + + +[`FuzzySuggestModal`](obsidian.FuzzySuggestModal.md) › [`getItemText`](obsidian.FuzzySuggestModal.getItemText.md) + +## FuzzySuggestModal.getItemText() method + + +**Signature:** + +```typescript +abstract getItemText(item: T): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| item | T | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/getItems.md b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/getItems.md new file mode 100644 index 0000000000000000000000000000000000000000..53c14f94c34afb31eaa2e85a60aa67ac4969a13b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/getItems.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.FuzzySuggestModal.getItems.md" +cssclasses: hide-title +--- + + + +[`FuzzySuggestModal`](obsidian.FuzzySuggestModal.md) › [`getItems`](obsidian.FuzzySuggestModal.getItems.md) + +## FuzzySuggestModal.getItems() method + + +**Signature:** + +```typescript +abstract getItems(): T[]; +``` +**Returns:** + +`T[]` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/getSuggestions.md b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/getSuggestions.md new file mode 100644 index 0000000000000000000000000000000000000000..c243fae9b2a04542fcc25ad23d62bf7aaf88b8a9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/getSuggestions.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.FuzzySuggestModal.getSuggestions.md" +cssclasses: hide-title +--- + + + +[`FuzzySuggestModal`](obsidian.FuzzySuggestModal.md) › [`getSuggestions`](obsidian.FuzzySuggestModal.getSuggestions.md) + +## FuzzySuggestModal.getSuggestions() method + + +**Signature:** + +```typescript +getSuggestions(query: string): FuzzyMatch[]; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| query | string | | + +**Returns:** + +[`FuzzyMatch`](obsidian.FuzzyMatch.md)`[]` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/onChooseItem.md b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/onChooseItem.md new file mode 100644 index 0000000000000000000000000000000000000000..a577928325dee8faaf6f6ea45994f7937bc9431a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/onChooseItem.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.FuzzySuggestModal.onChooseItem.md" +cssclasses: hide-title +--- + + + +[`FuzzySuggestModal`](obsidian.FuzzySuggestModal.md) › [`onChooseItem`](obsidian.FuzzySuggestModal.onChooseItem.md) + +## FuzzySuggestModal.onChooseItem() method + + +**Signature:** + +```typescript +abstract onChooseItem(item: T, evt: MouseEvent | KeyboardEvent): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| item | T | | +| evt | MouseEvent | KeyboardEvent | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/onChooseSuggestion.md b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/onChooseSuggestion.md new file mode 100644 index 0000000000000000000000000000000000000000..e534dfa443a637d360884c0669c451af54bb9227 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/onChooseSuggestion.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.FuzzySuggestModal.onChooseSuggestion.md" +cssclasses: hide-title +--- + + + +[`FuzzySuggestModal`](obsidian.FuzzySuggestModal.md) › [`onChooseSuggestion`](obsidian.FuzzySuggestModal.onChooseSuggestion.md) + +## FuzzySuggestModal.onChooseSuggestion() method + + +**Signature:** + +```typescript +onChooseSuggestion(item: FuzzyMatch, evt: MouseEvent | KeyboardEvent): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| item | [`FuzzyMatch`](obsidian.FuzzyMatch.md)<T> | | +| evt | MouseEvent | KeyboardEvent | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/renderSuggestion.md b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/renderSuggestion.md new file mode 100644 index 0000000000000000000000000000000000000000..bc60a4a73a347c42d37aa1a60b22cbeb63b5bf9b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/FuzzySuggestModal/renderSuggestion.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.FuzzySuggestModal.renderSuggestion.md" +cssclasses: hide-title +--- + + + +[`FuzzySuggestModal`](obsidian.FuzzySuggestModal.md) › [`renderSuggestion`](obsidian.FuzzySuggestModal.renderSuggestion.md) + +## FuzzySuggestModal.renderSuggestion() method + + +**Signature:** + +```typescript +renderSuggestion(item: FuzzyMatch, el: HTMLElement): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| item | [`FuzzyMatch`](obsidian.FuzzyMatch.md)<T> | | +| el | HTMLElement | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/HSL.md b/docs/obsidian-developer/Reference/TypeScript API/HSL.md new file mode 100644 index 0000000000000000000000000000000000000000..1c19a5794034d06ef1200aeb3c6b31ddd12bb71a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HSL.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.HSL.md" +cssclasses: hide-title +--- + + + +[`HSL`](obsidian.HSL.md) + +## HSL interface + + +**Signature:** + +```typescript +export interface HSL +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`h`](obsidian.HSL.h.md) | | number | Hue integer value between 0 and 360 | +| [`l`](obsidian.HSL.l.md) | | number | Lightness integer value between 0 and 100 | +| [`s`](obsidian.HSL.s.md) | | number | Saturation integer value between 0 and 100 | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/HSL/h.md b/docs/obsidian-developer/Reference/TypeScript API/HSL/h.md new file mode 100644 index 0000000000000000000000000000000000000000..fce1b4a1bb5ee3ba66ba819945df4710afeb8e27 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HSL/h.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.HSL.h.md" +cssclasses: hide-title +--- + + + +[`HSL`](obsidian.HSL.md) › [`h`](obsidian.HSL.h.md) + +## HSL.h property + +Hue integer value between 0 and 360 + +**Signature:** + +```typescript +h: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HSL/l.md b/docs/obsidian-developer/Reference/TypeScript API/HSL/l.md new file mode 100644 index 0000000000000000000000000000000000000000..bf6dfb989c30bdd8a1b9f94bf8d4d5738429509a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HSL/l.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.HSL.l.md" +cssclasses: hide-title +--- + + + +[`HSL`](obsidian.HSL.md) › [`l`](obsidian.HSL.l.md) + +## HSL.l property + +Lightness integer value between 0 and 100 + +**Signature:** + +```typescript +l: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HSL/s.md b/docs/obsidian-developer/Reference/TypeScript API/HSL/s.md new file mode 100644 index 0000000000000000000000000000000000000000..59ff39a19fa398bfb0b8e0e6c0b4eca5b70b9bdd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HSL/s.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.HSL.s.md" +cssclasses: hide-title +--- + + + +[`HSL`](obsidian.HSL.md) › [`s`](obsidian.HSL.s.md) + +## HSL.s property + +Saturation integer value between 0 and 100 + +**Signature:** + +```typescript +s: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HeadingCache.md b/docs/obsidian-developer/Reference/TypeScript API/HeadingCache.md new file mode 100644 index 0000000000000000000000000000000000000000..82d0aaa8dce9c3d1e2cc95c038d9af1e62950de7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HeadingCache.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.HeadingCache.md" +cssclasses: hide-title +--- + + + +[`HeadingCache`](obsidian.HeadingCache.md) + +## HeadingCache interface + + +**Signature:** + +```typescript +export interface HeadingCache extends CacheItem +``` +**Extends:** [`CacheItem`](obsidian.CacheItem.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`heading`](obsidian.HeadingCache.heading.md) | | string | | +| [`level`](obsidian.HeadingCache.level.md) | | number | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/HeadingCache/heading.md b/docs/obsidian-developer/Reference/TypeScript API/HeadingCache/heading.md new file mode 100644 index 0000000000000000000000000000000000000000..cdfb254f6384b8dccda5c99d289b9d4ea841a794 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HeadingCache/heading.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.HeadingCache.heading.md" +cssclasses: hide-title +--- + + + +[`HeadingCache`](obsidian.HeadingCache.md) › [`heading`](obsidian.HeadingCache.heading.md) + +## HeadingCache.heading property + + +**Signature:** + +```typescript +heading: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HeadingCache/level.md b/docs/obsidian-developer/Reference/TypeScript API/HeadingCache/level.md new file mode 100644 index 0000000000000000000000000000000000000000..6758a3fb8d2653007833aff65b0b5d4bc64b20be --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HeadingCache/level.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.HeadingCache.level.md" +cssclasses: hide-title +--- + + + +[`HeadingCache`](obsidian.HeadingCache.md) › [`level`](obsidian.HeadingCache.level.md) + +## HeadingCache.level property + + +**Signature:** + +```typescript +level: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult.md b/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult.md new file mode 100644 index 0000000000000000000000000000000000000000..1eb113e01a8f0cd05c5acef1234f687e639c11f9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.HeadingSubpathResult.md" +cssclasses: hide-title +--- + + + +[`HeadingSubpathResult`](obsidian.HeadingSubpathResult.md) + +## HeadingSubpathResult interface + + +**Signature:** + +```typescript +export interface HeadingSubpathResult extends SubpathResult +``` +**Extends:** [`SubpathResult`](obsidian.SubpathResult.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`current`](obsidian.HeadingSubpathResult.current.md) | | [`HeadingCache`](obsidian.HeadingCache.md) | | +| [`next`](obsidian.HeadingSubpathResult.next.md) | | [`HeadingCache`](obsidian.HeadingCache.md) | | +| [`type`](obsidian.HeadingSubpathResult.type.md) | | 'heading' | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult/current.md b/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult/current.md new file mode 100644 index 0000000000000000000000000000000000000000..62fbae4584b2f583ba476dfd2bf5162a13029c6c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult/current.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.HeadingSubpathResult.current.md" +cssclasses: hide-title +--- + + + +[`HeadingSubpathResult`](obsidian.HeadingSubpathResult.md) › [`current`](obsidian.HeadingSubpathResult.current.md) + +## HeadingSubpathResult.current property + + +**Signature:** + +```typescript +current: HeadingCache; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult/next.md b/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult/next.md new file mode 100644 index 0000000000000000000000000000000000000000..61ec94a430a899fa34dfe9a1e256a2aca534f86f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult/next.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.HeadingSubpathResult.next.md" +cssclasses: hide-title +--- + + + +[`HeadingSubpathResult`](obsidian.HeadingSubpathResult.md) › [`next`](obsidian.HeadingSubpathResult.next.md) + +## HeadingSubpathResult.next property + + +**Signature:** + +```typescript +next: HeadingCache; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult/type.md b/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult/type.md new file mode 100644 index 0000000000000000000000000000000000000000..2be8685d79600691f61487339283f62a1e0e93af --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HeadingSubpathResult/type.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.HeadingSubpathResult.type.md" +cssclasses: hide-title +--- + + + +[`HeadingSubpathResult`](obsidian.HeadingSubpathResult.md) › [`type`](obsidian.HeadingSubpathResult.type.md) + +## HeadingSubpathResult.type property + + +**Signature:** + +```typescript +type: 'heading'; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HexString.md b/docs/obsidian-developer/Reference/TypeScript API/HexString.md new file mode 100644 index 0000000000000000000000000000000000000000..8aba1791b48179cf8c9719d08aba9b53d00f1fd2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HexString.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.HexString.md" +cssclasses: hide-title +--- + + + +[`HexString`](obsidian.HexString.md) + +## HexString type + +Hex strings are 6-digit hash-prefixed rgb strings in lowercase form. Example: \#ffffff + +**Signature:** + +```typescript +export type HexString = string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Hotkey.md b/docs/obsidian-developer/Reference/TypeScript API/Hotkey.md new file mode 100644 index 0000000000000000000000000000000000000000..e037fd376addafc492f85a7e0323076384f9a2ea --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Hotkey.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.Hotkey.md" +cssclasses: hide-title +--- + + + +[`Hotkey`](obsidian.Hotkey.md) + +## Hotkey interface + + +**Signature:** + +```typescript +export interface Hotkey +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`key`](obsidian.Hotkey.key.md) | | string | | +| [`modifiers`](obsidian.Hotkey.modifiers.md) | | [`Modifier`](obsidian.Modifier.md)[] | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Hotkey/key.md b/docs/obsidian-developer/Reference/TypeScript API/Hotkey/key.md new file mode 100644 index 0000000000000000000000000000000000000000..e70c3c7986e18a357760b65752c04d694cd7d1ba --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Hotkey/key.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Hotkey.key.md" +cssclasses: hide-title +--- + + + +[`Hotkey`](obsidian.Hotkey.md) › [`key`](obsidian.Hotkey.key.md) + +## Hotkey.key property + + +**Signature:** + +```typescript +key: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Hotkey/modifiers.md b/docs/obsidian-developer/Reference/TypeScript API/Hotkey/modifiers.md new file mode 100644 index 0000000000000000000000000000000000000000..cf54bb7b1b6bd05607a8b0c6bd7f0680f1e1a4b6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Hotkey/modifiers.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Hotkey.modifiers.md" +cssclasses: hide-title +--- + + + +[`Hotkey`](obsidian.Hotkey.md) › [`modifiers`](obsidian.Hotkey.modifiers.md) + +## Hotkey.modifiers property + + +**Signature:** + +```typescript +modifiers: Modifier[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HoverLinkSource.md b/docs/obsidian-developer/Reference/TypeScript API/HoverLinkSource.md new file mode 100644 index 0000000000000000000000000000000000000000..3e8a4eb59983a531ff466f38216da6b280ff95d3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HoverLinkSource.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.HoverLinkSource.md" +cssclasses: hide-title +--- + + + +[`HoverLinkSource`](obsidian.HoverLinkSource.md) + +## HoverLinkSource interface + + +**Signature:** + +```typescript +export interface HoverLinkSource +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`defaultMod`](obsidian.HoverLinkSource.defaultMod.md) | | boolean | Whether or not the hover-link event requires the 'Mod' key to be pressed to trigger. | +| [`display`](obsidian.HoverLinkSource.display.md) | | string | The string that will be displayed in the 'Page preview' plugin settings. It should match your plugin's display name. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/HoverLinkSource/defaultMod.md b/docs/obsidian-developer/Reference/TypeScript API/HoverLinkSource/defaultMod.md new file mode 100644 index 0000000000000000000000000000000000000000..c01324b7809f15ec1b347ead8eee87beec830648 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HoverLinkSource/defaultMod.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.HoverLinkSource.defaultMod.md" +cssclasses: hide-title +--- + + + +[`HoverLinkSource`](obsidian.HoverLinkSource.md) › [`defaultMod`](obsidian.HoverLinkSource.defaultMod.md) + +## HoverLinkSource.defaultMod property + +Whether or not the `hover-link` event requires the 'Mod' key to be pressed to trigger. + +**Signature:** + +```typescript +defaultMod: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HoverLinkSource/display.md b/docs/obsidian-developer/Reference/TypeScript API/HoverLinkSource/display.md new file mode 100644 index 0000000000000000000000000000000000000000..0cc90b3eda0c3ba6732b52aa2d1ba086c52dfd78 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HoverLinkSource/display.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.HoverLinkSource.display.md" +cssclasses: hide-title +--- + + + +[`HoverLinkSource`](obsidian.HoverLinkSource.md) › [`display`](obsidian.HoverLinkSource.display.md) + +## HoverLinkSource.display property + +The string that will be displayed in the 'Page preview' plugin settings. It should match your plugin's display name. + +**Signature:** + +```typescript +display: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HoverParent.md b/docs/obsidian-developer/Reference/TypeScript API/HoverParent.md new file mode 100644 index 0000000000000000000000000000000000000000..7c289e15dc7479630cb98a3744ee1da0d771f589 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HoverParent.md @@ -0,0 +1,24 @@ +--- +aliases: "obsidian.HoverParent.md" +cssclasses: hide-title +--- + + + +[`HoverParent`](obsidian.HoverParent.md) + +## HoverParent interface + + +**Signature:** + +```typescript +export interface HoverParent +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`hoverPopover`](obsidian.HoverParent.hoverPopover.md) | | [`HoverPopover`](obsidian.HoverPopover.md) | null | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/HoverParent/hoverPopover.md b/docs/obsidian-developer/Reference/TypeScript API/HoverParent/hoverPopover.md new file mode 100644 index 0000000000000000000000000000000000000000..b9272c99d1b8e169ebdb2698ba5e48cde46ff66c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HoverParent/hoverPopover.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.HoverParent.hoverPopover.md" +cssclasses: hide-title +--- + + + +[`HoverParent`](obsidian.HoverParent.md) › [`hoverPopover`](obsidian.HoverParent.hoverPopover.md) + +## HoverParent.hoverPopover property + + +**Signature:** + +```typescript +hoverPopover: HoverPopover | null; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HoverPopover.md b/docs/obsidian-developer/Reference/TypeScript API/HoverPopover.md new file mode 100644 index 0000000000000000000000000000000000000000..5c1a07f9ac584b7ba573c61984e250a8dc64041a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HoverPopover.md @@ -0,0 +1,32 @@ +--- +aliases: "obsidian.HoverPopover.md" +cssclasses: hide-title +--- + + + +[`HoverPopover`](obsidian.HoverPopover.md) + +## HoverPopover class + + +**Signature:** + +```typescript +export class HoverPopover extends Component +``` +**Extends:** [`Component`](obsidian.Component.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(parent, targetEl, waitTime)`](obsidian.HoverPopover.(constructor).md) | | Constructs a new instance of the HoverPopover class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`hoverEl`](obsidian.HoverPopover.hoverEl.md) | | HTMLElement | | +| [`state`](obsidian.HoverPopover.state.md) | | [`PopoverState`](obsidian.PopoverState.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/HoverPopover/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/HoverPopover/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..7f4db197a5d159b5eaf9095ea678853763312368 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HoverPopover/(constructor).md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.HoverPopover.(constructor).md" +cssclasses: hide-title +--- + + + +[`HoverPopover`](obsidian.HoverPopover.md) › [`(constructor)`](obsidian.HoverPopover.(constructor).md) + +## HoverPopover.(constructor) + +Constructs a new instance of the `HoverPopover` class + +**Signature:** + +```typescript +constructor(parent: HoverParent, targetEl: HTMLElement | null, waitTime?: number); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| parent | [`HoverParent`](obsidian.HoverParent.md) | | +| targetEl | HTMLElement | null | | +| waitTime | number | _(Optional)_ | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/HoverPopover/hoverEl.md b/docs/obsidian-developer/Reference/TypeScript API/HoverPopover/hoverEl.md new file mode 100644 index 0000000000000000000000000000000000000000..656cbf2d579f9a7530d43a7b99ab572c8b5792a1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HoverPopover/hoverEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.HoverPopover.hoverEl.md" +cssclasses: hide-title +--- + + + +[`HoverPopover`](obsidian.HoverPopover.md) › [`hoverEl`](obsidian.HoverPopover.hoverEl.md) + +## HoverPopover.hoverEl property + + +**Signature:** + +```typescript +hoverEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/HoverPopover/state.md b/docs/obsidian-developer/Reference/TypeScript API/HoverPopover/state.md new file mode 100644 index 0000000000000000000000000000000000000000..2f107bdfb3b33ff7472885d763557b3ffa214a3f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/HoverPopover/state.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.HoverPopover.state.md" +cssclasses: hide-title +--- + + + +[`HoverPopover`](obsidian.HoverPopover.md) › [`state`](obsidian.HoverPopover.state.md) + +## HoverPopover.state property + + +**Signature:** + +```typescript +state: PopoverState; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ISuggestOwner.md b/docs/obsidian-developer/Reference/TypeScript API/ISuggestOwner.md new file mode 100644 index 0000000000000000000000000000000000000000..1695ec6c930e2b1c543553c0d54a98ee928292e9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ISuggestOwner.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.ISuggestOwner.md" +cssclasses: hide-title +--- + + + +[`ISuggestOwner`](obsidian.ISuggestOwner.md) + +## ISuggestOwner interface + + +**Signature:** + +```typescript +export interface ISuggestOwner +``` + +## Methods + +| Method | Description | +| --- | --- | +| [`renderSuggestion(value, el)`](obsidian.ISuggestOwner.renderSuggestion.md) | Render the suggestion item into DOM. | +| [`selectSuggestion(value, evt)`](obsidian.ISuggestOwner.selectSuggestion.md) | Called when the user makes a selection. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ISuggestOwner/renderSuggestion.md b/docs/obsidian-developer/Reference/TypeScript API/ISuggestOwner/renderSuggestion.md new file mode 100644 index 0000000000000000000000000000000000000000..dfe56cf8a3b68fdf759f12c059dc5e6de9b469fd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ISuggestOwner/renderSuggestion.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.ISuggestOwner.renderSuggestion.md" +cssclasses: hide-title +--- + + + +[`ISuggestOwner`](obsidian.ISuggestOwner.md) › [`renderSuggestion`](obsidian.ISuggestOwner.renderSuggestion.md) + +## ISuggestOwner.renderSuggestion() method + +Render the suggestion item into DOM. + +**Signature:** + +```typescript +renderSuggestion(value: T, el: HTMLElement): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | T | | +| el | HTMLElement | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ISuggestOwner/selectSuggestion.md b/docs/obsidian-developer/Reference/TypeScript API/ISuggestOwner/selectSuggestion.md new file mode 100644 index 0000000000000000000000000000000000000000..25c29584b7239b45139fd37058ff53a3cb092185 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ISuggestOwner/selectSuggestion.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.ISuggestOwner.selectSuggestion.md" +cssclasses: hide-title +--- + + + +[`ISuggestOwner`](obsidian.ISuggestOwner.md) › [`selectSuggestion`](obsidian.ISuggestOwner.selectSuggestion.md) + +## ISuggestOwner.selectSuggestion() method + +Called when the user makes a selection. + +**Signature:** + +```typescript +selectSuggestion(value: T, evt: MouseEvent | KeyboardEvent): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | T | | +| evt | MouseEvent | KeyboardEvent | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/IconName.md b/docs/obsidian-developer/Reference/TypeScript API/IconName.md new file mode 100644 index 0000000000000000000000000000000000000000..c1f8ff07909fb93ab08c05b5efddf1dfca32cd1d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/IconName.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.IconName.md" +cssclasses: hide-title +--- + + + +[`IconName`](obsidian.IconName.md) + +## IconName type + + +**Signature:** + +```typescript +export type IconName = string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Instruction.md b/docs/obsidian-developer/Reference/TypeScript API/Instruction.md new file mode 100644 index 0000000000000000000000000000000000000000..22cb9b72c60635db1754f1b83139b7b291e708b9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Instruction.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.Instruction.md" +cssclasses: hide-title +--- + + + +[`Instruction`](obsidian.Instruction.md) + +## Instruction interface + + +**Signature:** + +```typescript +export interface Instruction +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`command`](obsidian.Instruction.command.md) | | string | | +| [`purpose`](obsidian.Instruction.purpose.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Instruction/command.md b/docs/obsidian-developer/Reference/TypeScript API/Instruction/command.md new file mode 100644 index 0000000000000000000000000000000000000000..d3b458e7b7d36580549c0a525ec07fb1766aba70 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Instruction/command.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Instruction.command.md" +cssclasses: hide-title +--- + + + +[`Instruction`](obsidian.Instruction.md) › [`command`](obsidian.Instruction.command.md) + +## Instruction.command property + + +**Signature:** + +```typescript +command: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Instruction/purpose.md b/docs/obsidian-developer/Reference/TypeScript API/Instruction/purpose.md new file mode 100644 index 0000000000000000000000000000000000000000..0c1ce163ffa2f77903c0fcd4897958349983f7c1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Instruction/purpose.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Instruction.purpose.md" +cssclasses: hide-title +--- + + + +[`Instruction`](obsidian.Instruction.md) › [`purpose`](obsidian.Instruction.purpose.md) + +## Instruction.purpose property + + +**Signature:** + +```typescript +purpose: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ItemView.md b/docs/obsidian-developer/Reference/TypeScript API/ItemView.md new file mode 100644 index 0000000000000000000000000000000000000000..d1ace35bb14a0246a2c51b36c1a9c25cb1a5232d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ItemView.md @@ -0,0 +1,37 @@ +--- +aliases: "obsidian.ItemView.md" +cssclasses: hide-title +--- + + + +[`ItemView`](obsidian.ItemView.md) + +## ItemView class + + +**Signature:** + +```typescript +export abstract class ItemView extends View +``` +**Extends:** [`View`](obsidian.View.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(leaf)`](obsidian.ItemView.(constructor).md) | | Constructs a new instance of the ItemView class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`contentEl`](obsidian.ItemView.contentEl.md) | | HTMLElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`addAction(icon, title, callback)`](obsidian.ItemView.addAction.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ItemView/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/ItemView/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..3e0e60c50132639b1071e1cc57d2635fc78e7f7a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ItemView/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.ItemView.(constructor).md" +cssclasses: hide-title +--- + + + +[`ItemView`](obsidian.ItemView.md) › [`(constructor)`](obsidian.ItemView.(constructor).md) + +## ItemView.(constructor) + +Constructs a new instance of the `ItemView` class + +**Signature:** + +```typescript +constructor(leaf: WorkspaceLeaf); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ItemView/addAction.md b/docs/obsidian-developer/Reference/TypeScript API/ItemView/addAction.md new file mode 100644 index 0000000000000000000000000000000000000000..85e86e6473275628f8c2292d8b08534a83375f28 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ItemView/addAction.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.ItemView.addAction.md" +cssclasses: hide-title +--- + + + +[`ItemView`](obsidian.ItemView.md) › [`addAction`](obsidian.ItemView.addAction.md) + +## ItemView.addAction() method + + +**Signature:** + +```typescript +addAction(icon: IconName, title: string, callback: (evt: MouseEvent) => any): HTMLElement; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| icon | [`IconName`](obsidian.IconName.md) | | +| title | string | | +| callback | (evt: MouseEvent) => any | | + +**Returns:** + +`HTMLElement` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ItemView/contentEl.md b/docs/obsidian-developer/Reference/TypeScript API/ItemView/contentEl.md new file mode 100644 index 0000000000000000000000000000000000000000..5cd411e052053d4a5e074ae1d3d5ff8591928876 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ItemView/contentEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ItemView.contentEl.md" +cssclasses: hide-title +--- + + + +[`ItemView`](obsidian.ItemView.md) › [`contentEl`](obsidian.ItemView.contentEl.md) + +## ItemView.contentEl property + + +**Signature:** + +```typescript +contentEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Keymap.md b/docs/obsidian-developer/Reference/TypeScript API/Keymap.md new file mode 100644 index 0000000000000000000000000000000000000000..d06c11ca9191a982d054bb7f2fa3141799cc4251 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Keymap.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.Keymap.md" +cssclasses: hide-title +--- + + + +[`Keymap`](obsidian.Keymap.md) + +## Keymap class + + +**Signature:** + +```typescript +export class Keymap +``` + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`isModEvent(evt)`](obsidian.Keymap.isModEvent.md) | static | Translates an event into the type of pane that should open. Returns 'tab' if the modifier key Cmd/Ctrl is pressed OR if this is a middle-click MouseEvent. Returns 'split' if Cmd/Ctrl+Alt is pressed. Returns 'window' if Cmd/Ctrl+Alt+Shift is pressed. | +| [`isModifier(evt, modifier)`](obsidian.Keymap.isModifier.md) | static | Checks whether the modifier key is pressed during this event | +| [`popScope(scope)`](obsidian.Keymap.popScope.md) | | | +| [`pushScope(scope)`](obsidian.Keymap.pushScope.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Keymap/isModEvent.md b/docs/obsidian-developer/Reference/TypeScript API/Keymap/isModEvent.md new file mode 100644 index 0000000000000000000000000000000000000000..2e5960c0d85c8fa4c379a77254879a6f79cc7c6c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Keymap/isModEvent.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Keymap.isModEvent.md" +cssclasses: hide-title +--- + + + +[`Keymap`](obsidian.Keymap.md) › [`isModEvent`](obsidian.Keymap.isModEvent.md) + +## Keymap.isModEvent() method + +Translates an event into the type of pane that should open. Returns 'tab' if the modifier key Cmd/Ctrl is pressed OR if this is a middle-click MouseEvent. Returns 'split' if Cmd/Ctrl+Alt is pressed. Returns 'window' if Cmd/Ctrl+Alt+Shift is pressed. + +**Signature:** + +```typescript +static isModEvent(evt?: UserEvent | null): PaneType | boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| evt | [`UserEvent`](obsidian.UserEvent.md) | null | _(Optional)_ | + +**Returns:** + +[`PaneType`](obsidian.PaneType.md)` | boolean` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Keymap/isModifier.md b/docs/obsidian-developer/Reference/TypeScript API/Keymap/isModifier.md new file mode 100644 index 0000000000000000000000000000000000000000..bff37784435b496c7b76c6b0613494853cf06229 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Keymap/isModifier.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Keymap.isModifier.md" +cssclasses: hide-title +--- + + + +[`Keymap`](obsidian.Keymap.md) › [`isModifier`](obsidian.Keymap.isModifier.md) + +## Keymap.isModifier() method + +Checks whether the modifier key is pressed during this event + +**Signature:** + +```typescript +static isModifier(evt: MouseEvent | TouchEvent | KeyboardEvent, modifier: Modifier): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| evt | MouseEvent | TouchEvent | KeyboardEvent | | +| modifier | [`Modifier`](obsidian.Modifier.md) | | + +**Returns:** + +`boolean` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Keymap/popScope.md b/docs/obsidian-developer/Reference/TypeScript API/Keymap/popScope.md new file mode 100644 index 0000000000000000000000000000000000000000..bce7bbf54d14bc5d53c876dd3e482137cdb3554f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Keymap/popScope.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Keymap.popScope.md" +cssclasses: hide-title +--- + + + +[`Keymap`](obsidian.Keymap.md) › [`popScope`](obsidian.Keymap.popScope.md) + +## Keymap.popScope() method + + +**Signature:** + +```typescript +popScope(scope: Scope): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| scope | [`Scope`](obsidian.Scope.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Keymap/pushScope.md b/docs/obsidian-developer/Reference/TypeScript API/Keymap/pushScope.md new file mode 100644 index 0000000000000000000000000000000000000000..0f1373d23d49acc961296902099ff4c478bc5729 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Keymap/pushScope.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Keymap.pushScope.md" +cssclasses: hide-title +--- + + + +[`Keymap`](obsidian.Keymap.md) › [`pushScope`](obsidian.Keymap.pushScope.md) + +## Keymap.pushScope() method + + +**Signature:** + +```typescript +pushScope(scope: Scope): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| scope | [`Scope`](obsidian.Scope.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/KeymapContext.md b/docs/obsidian-developer/Reference/TypeScript API/KeymapContext.md new file mode 100644 index 0000000000000000000000000000000000000000..8c9b314bded23ff08584f5f4221e2f37da5766d1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/KeymapContext.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.KeymapContext.md" +cssclasses: hide-title +--- + + + +[`KeymapContext`](obsidian.KeymapContext.md) + +## KeymapContext interface + + +**Signature:** + +```typescript +export interface KeymapContext extends KeymapInfo +``` +**Extends:** [`KeymapInfo`](obsidian.KeymapInfo.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`vkey`](obsidian.KeymapContext.vkey.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/KeymapContext/vkey.md b/docs/obsidian-developer/Reference/TypeScript API/KeymapContext/vkey.md new file mode 100644 index 0000000000000000000000000000000000000000..84817d665cbe0543aaa40b20de950ea3934b1be0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/KeymapContext/vkey.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.KeymapContext.vkey.md" +cssclasses: hide-title +--- + + + +[`KeymapContext`](obsidian.KeymapContext.md) › [`vkey`](obsidian.KeymapContext.vkey.md) + +## KeymapContext.vkey property + + +**Signature:** + +```typescript +vkey: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/KeymapEventHandler.md b/docs/obsidian-developer/Reference/TypeScript API/KeymapEventHandler.md new file mode 100644 index 0000000000000000000000000000000000000000..52c13f82f867b61810823534a79911798fc6dc4c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/KeymapEventHandler.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.KeymapEventHandler.md" +cssclasses: hide-title +--- + + + +[`KeymapEventHandler`](obsidian.KeymapEventHandler.md) + +## KeymapEventHandler interface + + +**Signature:** + +```typescript +export interface KeymapEventHandler extends KeymapInfo +``` +**Extends:** [`KeymapInfo`](obsidian.KeymapInfo.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`scope`](obsidian.KeymapEventHandler.scope.md) | | [`Scope`](obsidian.Scope.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/KeymapEventHandler/scope.md b/docs/obsidian-developer/Reference/TypeScript API/KeymapEventHandler/scope.md new file mode 100644 index 0000000000000000000000000000000000000000..70b5bd67114cdb9b596ac7ff2607b685709396a9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/KeymapEventHandler/scope.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.KeymapEventHandler.scope.md" +cssclasses: hide-title +--- + + + +[`KeymapEventHandler`](obsidian.KeymapEventHandler.md) › [`scope`](obsidian.KeymapEventHandler.scope.md) + +## KeymapEventHandler.scope property + + +**Signature:** + +```typescript +scope: Scope; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/KeymapEventListener.md b/docs/obsidian-developer/Reference/TypeScript API/KeymapEventListener.md new file mode 100644 index 0000000000000000000000000000000000000000..63d71b5a81c9a1c9b6850da481759e85a85bee59 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/KeymapEventListener.md @@ -0,0 +1,20 @@ +--- +aliases: "obsidian.KeymapEventListener.md" +cssclasses: hide-title +--- + + + +[`KeymapEventListener`](obsidian.KeymapEventListener.md) + +## KeymapEventListener type + +Return `false` to automatically preventDefault + +**Signature:** + +```typescript +export type KeymapEventListener = (evt: KeyboardEvent, ctx: KeymapContext) => false | any; +``` +**References:** [`KeymapContext`](obsidian.KeymapContext.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/KeymapInfo.md b/docs/obsidian-developer/Reference/TypeScript API/KeymapInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..945bce352768597c1eb8698e82c9653ad072d52d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/KeymapInfo.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.KeymapInfo.md" +cssclasses: hide-title +--- + + + +[`KeymapInfo`](obsidian.KeymapInfo.md) + +## KeymapInfo interface + + +**Signature:** + +```typescript +export interface KeymapInfo +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`key`](obsidian.KeymapInfo.key.md) | | string | null | | +| [`modifiers`](obsidian.KeymapInfo.modifiers.md) | | string | null | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/KeymapInfo/key.md b/docs/obsidian-developer/Reference/TypeScript API/KeymapInfo/key.md new file mode 100644 index 0000000000000000000000000000000000000000..86aa26faff15eb9f39f7a9bca93c826b4c2a03e2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/KeymapInfo/key.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.KeymapInfo.key.md" +cssclasses: hide-title +--- + + + +[`KeymapInfo`](obsidian.KeymapInfo.md) › [`key`](obsidian.KeymapInfo.key.md) + +## KeymapInfo.key property + + +**Signature:** + +```typescript +key: string | null; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/KeymapInfo/modifiers.md b/docs/obsidian-developer/Reference/TypeScript API/KeymapInfo/modifiers.md new file mode 100644 index 0000000000000000000000000000000000000000..908ad2b6ead6994195f3eabf24ebd505e8657e94 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/KeymapInfo/modifiers.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.KeymapInfo.modifiers.md" +cssclasses: hide-title +--- + + + +[`KeymapInfo`](obsidian.KeymapInfo.md) › [`modifiers`](obsidian.KeymapInfo.modifiers.md) + +## KeymapInfo.modifiers property + + +**Signature:** + +```typescript +modifiers: string | null; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/LinkCache.md b/docs/obsidian-developer/Reference/TypeScript API/LinkCache.md new file mode 100644 index 0000000000000000000000000000000000000000..3c340a42398c92d818fca803bf310b4eb52e6f9d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/LinkCache.md @@ -0,0 +1,19 @@ +--- +aliases: "obsidian.LinkCache.md" +cssclasses: hide-title +--- + + + +[`LinkCache`](obsidian.LinkCache.md) + +## LinkCache interface + + +**Signature:** + +```typescript +export interface LinkCache extends ReferenceCache +``` +**Extends:** [`ReferenceCache`](obsidian.ReferenceCache.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ListItemCache.md b/docs/obsidian-developer/Reference/TypeScript API/ListItemCache.md new file mode 100644 index 0000000000000000000000000000000000000000..d5a13ec259f95b755cc7000eba1e7f37208fa814 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ListItemCache.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.ListItemCache.md" +cssclasses: hide-title +--- + + + +[`ListItemCache`](obsidian.ListItemCache.md) + +## ListItemCache interface + + +**Signature:** + +```typescript +export interface ListItemCache extends CacheItem +``` +**Extends:** [`CacheItem`](obsidian.CacheItem.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`id?`](obsidian.ListItemCache.id.md) | | string | undefined | _(Optional)_ The block ID of this list item, if defined. | +| [`parent`](obsidian.ListItemCache.parent.md) | | number |

Line number of the parent list item (position.start.line). If this item has no parent (e.g. it's a root level list), then this value is the negative of the line number of the first list item (start of the list).

Can be used to deduce which list items belongs to the same group (item1.parent === item2.parent). Can be used to reconstruct hierarchy information (parentItem.position.start.line === childItem.parent).

| +| [`task?`](obsidian.ListItemCache.task.md) | | string | undefined | _(Optional)_ A single character indicating the checked status of a task. The space character ' ' is interpreted as an incomplete task. An other character is interpreted as completed task. undefined if this item isn't a task. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ListItemCache/id.md b/docs/obsidian-developer/Reference/TypeScript API/ListItemCache/id.md new file mode 100644 index 0000000000000000000000000000000000000000..e202b13ead7623e25c4677c86eb747000387af06 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ListItemCache/id.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.ListItemCache.id.md" +cssclasses: hide-title +--- + + + +[`ListItemCache`](obsidian.ListItemCache.md) › [`id`](obsidian.ListItemCache.id.md) + +## ListItemCache.id property + +The block ID of this list item, if defined. + +**Signature:** + +```typescript +id?: string | undefined; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ListItemCache/parent.md b/docs/obsidian-developer/Reference/TypeScript API/ListItemCache/parent.md new file mode 100644 index 0000000000000000000000000000000000000000..c6ab06e1713ab35462ec5ccb414aac7db7f902cb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ListItemCache/parent.md @@ -0,0 +1,20 @@ +--- +aliases: "obsidian.ListItemCache.parent.md" +cssclasses: hide-title +--- + + + +[`ListItemCache`](obsidian.ListItemCache.md) › [`parent`](obsidian.ListItemCache.parent.md) + +## ListItemCache.parent property + +Line number of the parent list item (position.start.line). If this item has no parent (e.g. it's a root level list), then this value is the negative of the line number of the first list item (start of the list). + +Can be used to deduce which list items belongs to the same group (item1.parent === item2.parent). Can be used to reconstruct hierarchy information (parentItem.position.start.line === childItem.parent). + +**Signature:** + +```typescript +parent: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ListItemCache/task.md b/docs/obsidian-developer/Reference/TypeScript API/ListItemCache/task.md new file mode 100644 index 0000000000000000000000000000000000000000..fc605afcc3d70d09e63beff84c80581e7847f0b4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ListItemCache/task.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.ListItemCache.task.md" +cssclasses: hide-title +--- + + + +[`ListItemCache`](obsidian.ListItemCache.md) › [`task`](obsidian.ListItemCache.task.md) + +## ListItemCache.task property + +A single character indicating the checked status of a task. The space character `' '` is interpreted as an incomplete task. An other character is interpreted as completed task. `undefined` if this item isn't a task. + +**Signature:** + +```typescript +task?: string | undefined; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ListedFiles.md b/docs/obsidian-developer/Reference/TypeScript API/ListedFiles.md new file mode 100644 index 0000000000000000000000000000000000000000..5e1b8326da6a00b1c6da72c246c9c0865fcf2bdf --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ListedFiles.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.ListedFiles.md" +cssclasses: hide-title +--- + + + +[`ListedFiles`](obsidian.ListedFiles.md) + +## ListedFiles interface + + +**Signature:** + +```typescript +export interface ListedFiles +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`files`](obsidian.ListedFiles.files.md) | | string[] | | +| [`folders`](obsidian.ListedFiles.folders.md) | | string[] | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ListedFiles/files.md b/docs/obsidian-developer/Reference/TypeScript API/ListedFiles/files.md new file mode 100644 index 0000000000000000000000000000000000000000..002a5a97e90be9f296a5a3dede7a89ccf6234e92 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ListedFiles/files.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ListedFiles.files.md" +cssclasses: hide-title +--- + + + +[`ListedFiles`](obsidian.ListedFiles.md) › [`files`](obsidian.ListedFiles.files.md) + +## ListedFiles.files property + + +**Signature:** + +```typescript +files: string[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ListedFiles/folders.md b/docs/obsidian-developer/Reference/TypeScript API/ListedFiles/folders.md new file mode 100644 index 0000000000000000000000000000000000000000..57733aece26db3bb4f5a70083fb16e83a85dac79 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ListedFiles/folders.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ListedFiles.folders.md" +cssclasses: hide-title +--- + + + +[`ListedFiles`](obsidian.ListedFiles.md) › [`folders`](obsidian.ListedFiles.folders.md) + +## ListedFiles.folders property + + +**Signature:** + +```typescript +folders: string[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/LivePreviewState/mousedown.md b/docs/obsidian-developer/Reference/TypeScript API/LivePreviewState/mousedown.md new file mode 100644 index 0000000000000000000000000000000000000000..10cd945609305b321e6bb35eaa4ce835f26e8e34 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/LivePreviewState/mousedown.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.LivePreviewState.mousedown.md" +cssclasses: hide-title +--- + + + +[`LivePreviewState`](obsidian.LivePreviewState.md) › [`mousedown`](obsidian.LivePreviewState.mousedown.md) + +## LivePreviewState.mousedown property + +True if the left mouse is currently held down in the editor (for example, when drag-to-select text). + +**Signature:** + +```typescript +mousedown: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Loc.md b/docs/obsidian-developer/Reference/TypeScript API/Loc.md new file mode 100644 index 0000000000000000000000000000000000000000..4d1b7cac20ffe2d2f757f25c142746ac2e7f522e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Loc.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.Loc.md" +cssclasses: hide-title +--- + + + +[`Loc`](obsidian.Loc.md) + +## Loc interface + + +**Signature:** + +```typescript +export interface Loc +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`col`](obsidian.Loc.col.md) | | number | | +| [`line`](obsidian.Loc.line.md) | | number | | +| [`offset`](obsidian.Loc.offset.md) | | number | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Loc/col.md b/docs/obsidian-developer/Reference/TypeScript API/Loc/col.md new file mode 100644 index 0000000000000000000000000000000000000000..06bb3eec3af1163586b23012102aa2763c45552d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Loc/col.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Loc.col.md" +cssclasses: hide-title +--- + + + +[`Loc`](obsidian.Loc.md) › [`col`](obsidian.Loc.col.md) + +## Loc.col property + + +**Signature:** + +```typescript +col: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Loc/line.md b/docs/obsidian-developer/Reference/TypeScript API/Loc/line.md new file mode 100644 index 0000000000000000000000000000000000000000..42ae71ee950c0f3b59836af7eeb38214637ca862 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Loc/line.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Loc.line.md" +cssclasses: hide-title +--- + + + +[`Loc`](obsidian.Loc.md) › [`line`](obsidian.Loc.line.md) + +## Loc.line property + + +**Signature:** + +```typescript +line: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Loc/offset.md b/docs/obsidian-developer/Reference/TypeScript API/Loc/offset.md new file mode 100644 index 0000000000000000000000000000000000000000..7500e7a9d4fa168e0e2f243f99963c14ba67a024 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Loc/offset.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Loc.offset.md" +cssclasses: hide-title +--- + + + +[`Loc`](obsidian.Loc.md) › [`offset`](obsidian.Loc.offset.md) + +## Loc.offset property + + +**Signature:** + +```typescript +offset: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView.md new file mode 100644 index 0000000000000000000000000000000000000000..c8d15cfceba2af3c5b224eb2ed8de645e3157f8f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView.md @@ -0,0 +1,45 @@ +--- +aliases: "obsidian.MarkdownEditView.md" +cssclasses: hide-title +--- + + + +[`MarkdownEditView`](obsidian.MarkdownEditView.md) + +## MarkdownEditView class + +This is the editor for Obsidian Mobile as well as the upcoming WYSIWYG editor. + +**Signature:** + +```typescript +export class MarkdownEditView implements MarkdownSubView, HoverParent, MarkdownFileInfo +``` +**Implements:** [`MarkdownSubView`](obsidian.MarkdownSubView.md), [`HoverParent`](obsidian.HoverParent.md), [`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(view)`](obsidian.MarkdownEditView.(constructor).md) | | Constructs a new instance of the MarkdownEditView class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`app`](obsidian.MarkdownEditView.app.md) | | [`App`](obsidian.App.md) | | +| [`file`](obsidian.MarkdownEditView.file.md) | readonly | [`TFile`](obsidian.TFile.md) | | +| [`hoverPopover`](obsidian.MarkdownEditView.hoverPopover.md) | | [`HoverPopover`](obsidian.HoverPopover.md) | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`applyScroll(scroll)`](obsidian.MarkdownEditView.applyScroll.md) | | | +| [`clear()`](obsidian.MarkdownEditView.clear.md) | | | +| [`get()`](obsidian.MarkdownEditView.get.md) | | | +| [`getScroll()`](obsidian.MarkdownEditView.getScroll.md) | | | +| [`getSelection()`](obsidian.MarkdownEditView.getSelection.md) | | | +| [`set(data, clear)`](obsidian.MarkdownEditView.set.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..450f835db347fcaf58ac5a6e6cb45932d485d856 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.MarkdownEditView.(constructor).md" +cssclasses: hide-title +--- + + + +[`MarkdownEditView`](obsidian.MarkdownEditView.md) › [`(constructor)`](obsidian.MarkdownEditView.(constructor).md) + +## MarkdownEditView.(constructor) + +Constructs a new instance of the `MarkdownEditView` class + +**Signature:** + +```typescript +constructor(view: MarkdownView); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| view | [`MarkdownView`](obsidian.MarkdownView.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/app.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/app.md new file mode 100644 index 0000000000000000000000000000000000000000..8a725b7260d02c08d5587c34fddb3c0232b2c712 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/app.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownEditView.app.md" +cssclasses: hide-title +--- + + + +[`MarkdownEditView`](obsidian.MarkdownEditView.md) › [`app`](obsidian.MarkdownEditView.app.md) + +## MarkdownEditView.app property + + +**Signature:** + +```typescript +app: App; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/applyScroll.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/applyScroll.md new file mode 100644 index 0000000000000000000000000000000000000000..1bbf35ba35dc1b2b0090fd4117e789cc0564da30 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/applyScroll.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MarkdownEditView.applyScroll.md" +cssclasses: hide-title +--- + + + +[`MarkdownEditView`](obsidian.MarkdownEditView.md) › [`applyScroll`](obsidian.MarkdownEditView.applyScroll.md) + +## MarkdownEditView.applyScroll() method + + +**Signature:** + +```typescript +applyScroll(scroll: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| scroll | number | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/clear.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/clear.md new file mode 100644 index 0000000000000000000000000000000000000000..ed5e89d52f825a4170a4e9d130d785308c7d85df --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/clear.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownEditView.clear.md" +cssclasses: hide-title +--- + + + +[`MarkdownEditView`](obsidian.MarkdownEditView.md) › [`clear`](obsidian.MarkdownEditView.clear.md) + +## MarkdownEditView.clear() method + + +**Signature:** + +```typescript +clear(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/file.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/file.md new file mode 100644 index 0000000000000000000000000000000000000000..f47e09e41cafa03f84668e57e3a57aa7d6750920 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/file.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownEditView.file.md" +cssclasses: hide-title +--- + + + +[`MarkdownEditView`](obsidian.MarkdownEditView.md) › [`file`](obsidian.MarkdownEditView.file.md) + +## MarkdownEditView.file property + + +**Signature:** + +```typescript +get file(): TFile; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/get.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/get.md new file mode 100644 index 0000000000000000000000000000000000000000..9155960958584b710b723d08a5dd15312ce718f7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/get.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownEditView.get.md" +cssclasses: hide-title +--- + + + +[`MarkdownEditView`](obsidian.MarkdownEditView.md) › [`get`](obsidian.MarkdownEditView.get.md) + +## MarkdownEditView.get() method + + +**Signature:** + +```typescript +get(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/getScroll.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/getScroll.md new file mode 100644 index 0000000000000000000000000000000000000000..caa3605f14b8ec24d7876a9344d221e4aefa5ae1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/getScroll.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownEditView.getScroll.md" +cssclasses: hide-title +--- + + + +[`MarkdownEditView`](obsidian.MarkdownEditView.md) › [`getScroll`](obsidian.MarkdownEditView.getScroll.md) + +## MarkdownEditView.getScroll() method + + +**Signature:** + +```typescript +getScroll(): number; +``` +**Returns:** + +`number` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/getSelection.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/getSelection.md new file mode 100644 index 0000000000000000000000000000000000000000..7e8c3274fb3e03f4e9c25eada591694102f58eec --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/getSelection.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownEditView.getSelection.md" +cssclasses: hide-title +--- + + + +[`MarkdownEditView`](obsidian.MarkdownEditView.md) › [`getSelection`](obsidian.MarkdownEditView.getSelection.md) + +## MarkdownEditView.getSelection() method + + +**Signature:** + +```typescript +getSelection(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/hoverPopover.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/hoverPopover.md new file mode 100644 index 0000000000000000000000000000000000000000..11cfe2d19e15155bb71cc4bcc41533bef8771a59 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/hoverPopover.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownEditView.hoverPopover.md" +cssclasses: hide-title +--- + + + +[`MarkdownEditView`](obsidian.MarkdownEditView.md) › [`hoverPopover`](obsidian.MarkdownEditView.hoverPopover.md) + +## MarkdownEditView.hoverPopover property + + +**Signature:** + +```typescript +hoverPopover: HoverPopover; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/set.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/set.md new file mode 100644 index 0000000000000000000000000000000000000000..915d9a864147f9cb89a7b43f7e94719343e8813f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownEditView/set.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.MarkdownEditView.set.md" +cssclasses: hide-title +--- + + + +[`MarkdownEditView`](obsidian.MarkdownEditView.md) › [`set`](obsidian.MarkdownEditView.set.md) + +## MarkdownEditView.set() method + + +**Signature:** + +```typescript +set(data: string, clear: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| data | string | | +| clear | boolean | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownFileInfo.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownFileInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..231fe739d1baed7b23bba679d3be7736f845a653 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownFileInfo.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.MarkdownFileInfo.md" +cssclasses: hide-title +--- + + + +[`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md) + +## MarkdownFileInfo interface + + +**Signature:** + +```typescript +export interface MarkdownFileInfo extends HoverParent +``` +**Extends:** [`HoverParent`](obsidian.HoverParent.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`app`](obsidian.MarkdownFileInfo.app.md) | | [`App`](obsidian.App.md) | | +| [`editor?`](obsidian.MarkdownFileInfo.editor.md) | | [`Editor`](obsidian.Editor.md) | _(Optional)_ | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownFileInfo/app.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownFileInfo/app.md new file mode 100644 index 0000000000000000000000000000000000000000..81c8035a0de4e98bbe73e455883fef5d0a03a7fd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownFileInfo/app.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownFileInfo.app.md" +cssclasses: hide-title +--- + + + +[`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md) › [`app`](obsidian.MarkdownFileInfo.app.md) + +## MarkdownFileInfo.app property + + +**Signature:** + +```typescript +app: App; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownFileInfo/editor.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownFileInfo/editor.md new file mode 100644 index 0000000000000000000000000000000000000000..0507db254b53bf96eb521196ce95a7df471135af --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownFileInfo/editor.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownFileInfo.editor.md" +cssclasses: hide-title +--- + + + +[`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md) › [`editor`](obsidian.MarkdownFileInfo.editor.md) + +## MarkdownFileInfo.editor property + + +**Signature:** + +```typescript +editor?: Editor; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessor.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessor.md new file mode 100644 index 0000000000000000000000000000000000000000..1c680fa3c3d6ae47a1dae2cd21aa05717a956da2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessor.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.MarkdownPostProcessor.md" +cssclasses: hide-title +--- + + + +[`MarkdownPostProcessor`](obsidian.MarkdownPostProcessor.md) + +## MarkdownPostProcessor interface + +A post processor receives an element which is a section of the preview. + +Post processors can mutate the DOM to render various things, such as mermaid graphs, latex equations, or custom controls. + +If your post processor requires lifecycle management, for example, to clear an interval, kill a subprocess, etc when this element is removed from the app, look into + +**Signature:** + +```typescript +export interface MarkdownPostProcessor +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`sortOrder?`](obsidian.MarkdownPostProcessor.sortOrder.md) | | number | _(Optional)_ An optional integer sort order. Defaults to 0. Lower number runs before higher numbers. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessor/sortOrder.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessor/sortOrder.md new file mode 100644 index 0000000000000000000000000000000000000000..25e3e39b1b67b872f4bd453e7aadca4ae33cb6cf --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessor/sortOrder.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.MarkdownPostProcessor.sortOrder.md" +cssclasses: hide-title +--- + + + +[`MarkdownPostProcessor`](obsidian.MarkdownPostProcessor.md) › [`sortOrder`](obsidian.MarkdownPostProcessor.sortOrder.md) + +## MarkdownPostProcessor.sortOrder property + +An optional integer sort order. Defaults to 0. Lower number runs before higher numbers. + +**Signature:** + +```typescript +sortOrder?: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext.md new file mode 100644 index 0000000000000000000000000000000000000000..0bbbe14e8ca8c240fd5186116deb7a4da0e7fe4c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.MarkdownPostProcessorContext.md" +cssclasses: hide-title +--- + + + +[`MarkdownPostProcessorContext`](obsidian.MarkdownPostProcessorContext.md) + +## MarkdownPostProcessorContext interface + + +**Signature:** + +```typescript +export interface MarkdownPostProcessorContext +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`docId`](obsidian.MarkdownPostProcessorContext.docId.md) | | string | | +| [`frontmatter`](obsidian.MarkdownPostProcessorContext.frontmatter.md) | | any | null | undefined | | +| [`sourcePath`](obsidian.MarkdownPostProcessorContext.sourcePath.md) | | string | | + +## Methods + +| Method | Description | +| --- | --- | +| [`addChild(child)`](obsidian.MarkdownPostProcessorContext.addChild.md) |

Adds a child component that will have its lifecycle managed by the renderer.

Use this to add a dependent child to the renderer such that if the containerEl of the child is ever removed, the component's unload will be called.

| +| [`getSectionInfo(el)`](obsidian.MarkdownPostProcessorContext.getSectionInfo.md) | Gets the section information of this element at this point in time. Only call this function right before you need this information to get the most up-to-date version. This function may also return null in many circumstances; if you use it, you must be prepared to deal with nulls. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/addChild.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/addChild.md new file mode 100644 index 0000000000000000000000000000000000000000..098534adcb541bfa1c8657cf292b72c278f7a197 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/addChild.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.MarkdownPostProcessorContext.addChild.md" +cssclasses: hide-title +--- + + + +[`MarkdownPostProcessorContext`](obsidian.MarkdownPostProcessorContext.md) › [`addChild`](obsidian.MarkdownPostProcessorContext.addChild.md) + +## MarkdownPostProcessorContext.addChild() method + +Adds a child component that will have its lifecycle managed by the renderer. + +Use this to add a dependent child to the renderer such that if the containerEl of the child is ever removed, the component's unload will be called. + +**Signature:** + +```typescript +addChild(child: MarkdownRenderChild): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| child | [`MarkdownRenderChild`](obsidian.MarkdownRenderChild.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/docId.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/docId.md new file mode 100644 index 0000000000000000000000000000000000000000..36237df52444cabda9d45f887f9c82029ca0e181 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/docId.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownPostProcessorContext.docId.md" +cssclasses: hide-title +--- + + + +[`MarkdownPostProcessorContext`](obsidian.MarkdownPostProcessorContext.md) › [`docId`](obsidian.MarkdownPostProcessorContext.docId.md) + +## MarkdownPostProcessorContext.docId property + + +**Signature:** + +```typescript +docId: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/frontmatter.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/frontmatter.md new file mode 100644 index 0000000000000000000000000000000000000000..6df492cb6ec10337686b5e65979fcc164099e6d3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/frontmatter.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownPostProcessorContext.frontmatter.md" +cssclasses: hide-title +--- + + + +[`MarkdownPostProcessorContext`](obsidian.MarkdownPostProcessorContext.md) › [`frontmatter`](obsidian.MarkdownPostProcessorContext.frontmatter.md) + +## MarkdownPostProcessorContext.frontmatter property + + +**Signature:** + +```typescript +frontmatter: any | null | undefined; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/getSectionInfo.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/getSectionInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..ea77809f60ac8db5d6345a950063b719f4211a5b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/getSectionInfo.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.MarkdownPostProcessorContext.getSectionInfo.md" +cssclasses: hide-title +--- + + + +[`MarkdownPostProcessorContext`](obsidian.MarkdownPostProcessorContext.md) › [`getSectionInfo`](obsidian.MarkdownPostProcessorContext.getSectionInfo.md) + +## MarkdownPostProcessorContext.getSectionInfo() method + +Gets the section information of this element at this point in time. Only call this function right before you need this information to get the most up-to-date version. This function may also return null in many circumstances; if you use it, you must be prepared to deal with nulls. + +**Signature:** + +```typescript +getSectionInfo(el: HTMLElement): MarkdownSectionInformation | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| el | HTMLElement | | + +**Returns:** + +[`MarkdownSectionInformation`](obsidian.MarkdownSectionInformation.md)` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/sourcePath.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/sourcePath.md new file mode 100644 index 0000000000000000000000000000000000000000..78989d6e80bbe4467fd31b49b77123e4d40e3b5c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPostProcessorContext/sourcePath.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownPostProcessorContext.sourcePath.md" +cssclasses: hide-title +--- + + + +[`MarkdownPostProcessorContext`](obsidian.MarkdownPostProcessorContext.md) › [`sourcePath`](obsidian.MarkdownPostProcessorContext.sourcePath.md) + +## MarkdownPostProcessorContext.sourcePath property + + +**Signature:** + +```typescript +sourcePath: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewEvents.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewEvents.md new file mode 100644 index 0000000000000000000000000000000000000000..5fe6aa430894cb6a63070554cc73e43e168d43c0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewEvents.md @@ -0,0 +1,20 @@ +--- +aliases: "obsidian.MarkdownPreviewEvents.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewEvents`](obsidian.MarkdownPreviewEvents.md) + +## MarkdownPreviewEvents interface + +\* + +**Signature:** + +```typescript +export interface MarkdownPreviewEvents extends Component +``` +**Extends:** [`Component`](obsidian.Component.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer.md new file mode 100644 index 0000000000000000000000000000000000000000..14f12cc1d943e9a5d720f556e57fdc27126f8c00 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.MarkdownPreviewRenderer.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewRenderer`](obsidian.MarkdownPreviewRenderer.md) + +## MarkdownPreviewRenderer class + + +**Signature:** + +```typescript +export class MarkdownPreviewRenderer +``` + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`createCodeBlockPostProcessor(language, handler)`](obsidian.MarkdownPreviewRenderer.createCodeBlockPostProcessor.md) | static | | +| [`registerPostProcessor(postProcessor, sortOrder)`](obsidian.MarkdownPreviewRenderer.registerPostProcessor.md) | static | | +| [`unregisterPostProcessor(postProcessor)`](obsidian.MarkdownPreviewRenderer.unregisterPostProcessor.md) | static | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer/createCodeBlockPostProcessor.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer/createCodeBlockPostProcessor.md new file mode 100644 index 0000000000000000000000000000000000000000..d7a31baa885b8395d14a4f0b05e1c64b1eda96c7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer/createCodeBlockPostProcessor.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.MarkdownPreviewRenderer.createCodeBlockPostProcessor.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewRenderer`](obsidian.MarkdownPreviewRenderer.md) › [`createCodeBlockPostProcessor`](obsidian.MarkdownPreviewRenderer.createCodeBlockPostProcessor.md) + +## MarkdownPreviewRenderer.createCodeBlockPostProcessor() method + + +**Signature:** + +```typescript +static createCodeBlockPostProcessor(language: string, handler: (source: string, el: HTMLElement, ctx: MarkdownPostProcessorContext) => Promise | void): (el: HTMLElement, ctx: MarkdownPostProcessorContext) => void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| language | string | | +| handler | (source: string, el: HTMLElement, ctx: [`MarkdownPostProcessorContext`](obsidian.MarkdownPostProcessorContext.md)) => Promise<any> | void | | + +**Returns:** + +`(el: ``HTMLElement``, ctx: `[`MarkdownPostProcessorContext`](obsidian.MarkdownPostProcessorContext.md)`) => void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer/registerPostProcessor.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer/registerPostProcessor.md new file mode 100644 index 0000000000000000000000000000000000000000..f3bbce39b8e79c062157e14d6fa53b2d7ceffa24 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer/registerPostProcessor.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.MarkdownPreviewRenderer.registerPostProcessor.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewRenderer`](obsidian.MarkdownPreviewRenderer.md) › [`registerPostProcessor`](obsidian.MarkdownPreviewRenderer.registerPostProcessor.md) + +## MarkdownPreviewRenderer.registerPostProcessor() method + + +**Signature:** + +```typescript +static registerPostProcessor(postProcessor: MarkdownPostProcessor, sortOrder?: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| postProcessor | [`MarkdownPostProcessor`](obsidian.MarkdownPostProcessor.md) | | +| sortOrder | number | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer/unregisterPostProcessor.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer/unregisterPostProcessor.md new file mode 100644 index 0000000000000000000000000000000000000000..568601b8901d889695b6e11b51d4831ee497e46c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewRenderer/unregisterPostProcessor.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MarkdownPreviewRenderer.unregisterPostProcessor.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewRenderer`](obsidian.MarkdownPreviewRenderer.md) › [`unregisterPostProcessor`](obsidian.MarkdownPreviewRenderer.unregisterPostProcessor.md) + +## MarkdownPreviewRenderer.unregisterPostProcessor() method + + +**Signature:** + +```typescript +static unregisterPostProcessor(postProcessor: MarkdownPostProcessor): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| postProcessor | [`MarkdownPostProcessor`](obsidian.MarkdownPostProcessor.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView.md new file mode 100644 index 0000000000000000000000000000000000000000..f3903ed2aa475fff167ec0be0062bb8de16c5d79 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView.md @@ -0,0 +1,39 @@ +--- +aliases: "obsidian.MarkdownPreviewView.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewView`](obsidian.MarkdownPreviewView.md) + +## MarkdownPreviewView class + + +**Signature:** + +```typescript +export class MarkdownPreviewView extends MarkdownRenderer implements MarkdownSubView, MarkdownPreviewEvents +``` +**Extends:** [`MarkdownRenderer`](obsidian.MarkdownRenderer.md) + +**Implements:** [`MarkdownSubView`](obsidian.MarkdownSubView.md), [`MarkdownPreviewEvents`](obsidian.MarkdownPreviewEvents.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`containerEl`](obsidian.MarkdownPreviewView.containerEl.md) | | HTMLElement | | +| [`file`](obsidian.MarkdownPreviewView.file.md) | readonly | [`TFile`](obsidian.TFile.md) | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`applyScroll(scroll)`](obsidian.MarkdownPreviewView.applyScroll.md) | | | +| [`clear()`](obsidian.MarkdownPreviewView.clear.md) | | | +| [`get()`](obsidian.MarkdownPreviewView.get.md) | | | +| [`getScroll()`](obsidian.MarkdownPreviewView.getScroll.md) | | | +| [`rerender(full)`](obsidian.MarkdownPreviewView.rerender.md) | | | +| [`set(data, clear)`](obsidian.MarkdownPreviewView.set.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/applyScroll.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/applyScroll.md new file mode 100644 index 0000000000000000000000000000000000000000..955849d99a03b86240cd169093838a62abd7e76c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/applyScroll.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MarkdownPreviewView.applyScroll.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewView`](obsidian.MarkdownPreviewView.md) › [`applyScroll`](obsidian.MarkdownPreviewView.applyScroll.md) + +## MarkdownPreviewView.applyScroll() method + + +**Signature:** + +```typescript +applyScroll(scroll: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| scroll | number | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/clear.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/clear.md new file mode 100644 index 0000000000000000000000000000000000000000..d3af28f21cb9c5cc31ee620c8dc168a648244f0b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/clear.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownPreviewView.clear.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewView`](obsidian.MarkdownPreviewView.md) › [`clear`](obsidian.MarkdownPreviewView.clear.md) + +## MarkdownPreviewView.clear() method + + +**Signature:** + +```typescript +clear(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/containerEl.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/containerEl.md new file mode 100644 index 0000000000000000000000000000000000000000..6b7b94f42c4b0fb1b7ca46a6490f74f0ce81a81a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/containerEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownPreviewView.containerEl.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewView`](obsidian.MarkdownPreviewView.md) › [`containerEl`](obsidian.MarkdownPreviewView.containerEl.md) + +## MarkdownPreviewView.containerEl property + + +**Signature:** + +```typescript +containerEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/file.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/file.md new file mode 100644 index 0000000000000000000000000000000000000000..74cb35b2d43b3163cf924b5c03fa2736011dfbb6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/file.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownPreviewView.file.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewView`](obsidian.MarkdownPreviewView.md) › [`file`](obsidian.MarkdownPreviewView.file.md) + +## MarkdownPreviewView.file property + + +**Signature:** + +```typescript +get file(): TFile; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/get.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/get.md new file mode 100644 index 0000000000000000000000000000000000000000..0d82d0bf2fdc22e0ecea6eef5e8895d89d55c69c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/get.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownPreviewView.get.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewView`](obsidian.MarkdownPreviewView.md) › [`get`](obsidian.MarkdownPreviewView.get.md) + +## MarkdownPreviewView.get() method + + +**Signature:** + +```typescript +get(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/getScroll.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/getScroll.md new file mode 100644 index 0000000000000000000000000000000000000000..8ea4725ba351a7bc02034b3548e208896c993538 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/getScroll.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownPreviewView.getScroll.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewView`](obsidian.MarkdownPreviewView.md) › [`getScroll`](obsidian.MarkdownPreviewView.getScroll.md) + +## MarkdownPreviewView.getScroll() method + + +**Signature:** + +```typescript +getScroll(): number; +``` +**Returns:** + +`number` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/rerender.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/rerender.md new file mode 100644 index 0000000000000000000000000000000000000000..b26d6b6afedba2b48e45858fe313f7bb28a15d0d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/rerender.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MarkdownPreviewView.rerender.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewView`](obsidian.MarkdownPreviewView.md) › [`rerender`](obsidian.MarkdownPreviewView.rerender.md) + +## MarkdownPreviewView.rerender() method + + +**Signature:** + +```typescript +rerender(full?: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| full | boolean | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/set.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/set.md new file mode 100644 index 0000000000000000000000000000000000000000..bc949bb3d7d7dbf3edce9cd755b6bc1bc0c7957e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownPreviewView/set.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.MarkdownPreviewView.set.md" +cssclasses: hide-title +--- + + + +[`MarkdownPreviewView`](obsidian.MarkdownPreviewView.md) › [`set`](obsidian.MarkdownPreviewView.set.md) + +## MarkdownPreviewView.set() method + + +**Signature:** + +```typescript +set(data: string, clear: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| data | string | | +| clear | boolean | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderChild.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderChild.md new file mode 100644 index 0000000000000000000000000000000000000000..1d675fe6615bd10ab29287230edc378219a11d49 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderChild.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.MarkdownRenderChild.md" +cssclasses: hide-title +--- + + + +[`MarkdownRenderChild`](obsidian.MarkdownRenderChild.md) + +## MarkdownRenderChild class + + +**Signature:** + +```typescript +export class MarkdownRenderChild extends Component +``` +**Extends:** [`Component`](obsidian.Component.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.MarkdownRenderChild.(constructor).md) | | Constructs a new instance of the MarkdownRenderChild class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`containerEl`](obsidian.MarkdownRenderChild.containerEl.md) | | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderChild/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderChild/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..dae9341858c1c6638bfa2ab8ef5956152905e0d0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderChild/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.MarkdownRenderChild.(constructor).md" +cssclasses: hide-title +--- + + + +[`MarkdownRenderChild`](obsidian.MarkdownRenderChild.md) › [`(constructor)`](obsidian.MarkdownRenderChild.(constructor).md) + +## MarkdownRenderChild.(constructor) + +Constructs a new instance of the `MarkdownRenderChild` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | This HTMLElement will be used to test whether this component is still alive. It should be a child of the markdown preview sections, and when it's no longer attached (for example, when it is replaced with a new version because the user edited the markdown source code), this component will be unloaded. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderChild/containerEl.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderChild/containerEl.md new file mode 100644 index 0000000000000000000000000000000000000000..6652a58a49bb0580942051851798d00d3db181ac --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderChild/containerEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownRenderChild.containerEl.md" +cssclasses: hide-title +--- + + + +[`MarkdownRenderChild`](obsidian.MarkdownRenderChild.md) › [`containerEl`](obsidian.MarkdownRenderChild.containerEl.md) + +## MarkdownRenderChild.containerEl property + + +**Signature:** + +```typescript +containerEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer.md new file mode 100644 index 0000000000000000000000000000000000000000..03064215adaf9b9e9fe4c573d4ad0e0eab0f7360 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer.md @@ -0,0 +1,36 @@ +--- +aliases: "obsidian.MarkdownRenderer.md" +cssclasses: hide-title +--- + + + +[`MarkdownRenderer`](obsidian.MarkdownRenderer.md) + +## MarkdownRenderer class + + +**Signature:** + +```typescript +export abstract class MarkdownRenderer extends MarkdownRenderChild implements MarkdownPreviewEvents, HoverParent +``` +**Extends:** [`MarkdownRenderChild`](obsidian.MarkdownRenderChild.md) + +**Implements:** [`MarkdownPreviewEvents`](obsidian.MarkdownPreviewEvents.md), [`HoverParent`](obsidian.HoverParent.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`app`](obsidian.MarkdownRenderer.app.md) | | [`App`](obsidian.App.md) | | +| [`file`](obsidian.MarkdownRenderer.file.md) |

abstract

readonly

| [`TFile`](obsidian.TFile.md) | | +| [`hoverPopover`](obsidian.MarkdownRenderer.hoverPopover.md) | | [`HoverPopover`](obsidian.HoverPopover.md) | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`render(app, markdown, el, sourcePath, component)`](obsidian.MarkdownRenderer.render.md) | static | Renders markdown string to an HTML element. | +| [`renderMarkdown(markdown, el, sourcePath, component)`](obsidian.MarkdownRenderer.renderMarkdown.md) | static | Renders markdown string to an HTML element. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/app.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/app.md new file mode 100644 index 0000000000000000000000000000000000000000..45ab99c6cc0dd0c87ea2815716b62bc3c39b1ed8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/app.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownRenderer.app.md" +cssclasses: hide-title +--- + + + +[`MarkdownRenderer`](obsidian.MarkdownRenderer.md) › [`app`](obsidian.MarkdownRenderer.app.md) + +## MarkdownRenderer.app property + + +**Signature:** + +```typescript +app: App; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/file.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/file.md new file mode 100644 index 0000000000000000000000000000000000000000..5bf36f8be2c8d21d4e30506261c4e4d2791fd8b5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/file.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownRenderer.file.md" +cssclasses: hide-title +--- + + + +[`MarkdownRenderer`](obsidian.MarkdownRenderer.md) › [`file`](obsidian.MarkdownRenderer.file.md) + +## MarkdownRenderer.file property + + +**Signature:** + +```typescript +abstract get file(): TFile; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/hoverPopover.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/hoverPopover.md new file mode 100644 index 0000000000000000000000000000000000000000..4961c6a8dfb6d655db0690b2af42df2d91966902 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/hoverPopover.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownRenderer.hoverPopover.md" +cssclasses: hide-title +--- + + + +[`MarkdownRenderer`](obsidian.MarkdownRenderer.md) › [`hoverPopover`](obsidian.MarkdownRenderer.hoverPopover.md) + +## MarkdownRenderer.hoverPopover property + + +**Signature:** + +```typescript +hoverPopover: HoverPopover; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/render.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/render.md new file mode 100644 index 0000000000000000000000000000000000000000..744a63a0672b51be29dbce110aa58826804cebd3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/render.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.MarkdownRenderer.render.md" +cssclasses: hide-title +--- + + + +[`MarkdownRenderer`](obsidian.MarkdownRenderer.md) › [`render`](obsidian.MarkdownRenderer.render.md) + +## MarkdownRenderer.render() method + +Renders markdown string to an HTML element. + +**Signature:** + +```typescript +static render(app: App, markdown: string, el: HTMLElement, sourcePath: string, component: Component): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| app | [`App`](obsidian.App.md) | A reference to the app object | +| markdown | string | The markdown source code | +| el | HTMLElement | The element to append to | +| sourcePath | string | The normalized path of this markdown file, used to resolve relative internal links | +| component | [`Component`](obsidian.Component.md) | A parent component to manage the lifecycle of the rendered child components. | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/renderMarkdown.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/renderMarkdown.md new file mode 100644 index 0000000000000000000000000000000000000000..c3697d25ca5f9e63e6789a205692e88bd8710596 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownRenderer/renderMarkdown.md @@ -0,0 +1,37 @@ +--- +aliases: "obsidian.MarkdownRenderer.renderMarkdown.md" +cssclasses: hide-title +--- + + + +[`MarkdownRenderer`](obsidian.MarkdownRenderer.md) › [`renderMarkdown`](obsidian.MarkdownRenderer.renderMarkdown.md) + +## MarkdownRenderer.renderMarkdown() method + +> Warning: This API is now obsolete. +> +> - use [MarkdownRenderer.render()](obsidian.MarkdownRenderer.render.md) +> + +Renders markdown string to an HTML element. + +**Signature:** + +```typescript +static renderMarkdown(markdown: string, el: HTMLElement, sourcePath: string, component: Component): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| markdown | string | | +| el | HTMLElement | | +| sourcePath | string | | +| component | [`Component`](obsidian.Component.md) | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation.md new file mode 100644 index 0000000000000000000000000000000000000000..f97aadc2b31532db557535c9b6f78aef185b21a1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.MarkdownSectionInformation.md" +cssclasses: hide-title +--- + + + +[`MarkdownSectionInformation`](obsidian.MarkdownSectionInformation.md) + +## MarkdownSectionInformation interface + + +**Signature:** + +```typescript +export interface MarkdownSectionInformation +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`lineEnd`](obsidian.MarkdownSectionInformation.lineEnd.md) | | number | | +| [`lineStart`](obsidian.MarkdownSectionInformation.lineStart.md) | | number | | +| [`text`](obsidian.MarkdownSectionInformation.text.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation/lineEnd.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation/lineEnd.md new file mode 100644 index 0000000000000000000000000000000000000000..96dda0bf80a858e8f03c87025bb80e318c98ae21 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation/lineEnd.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownSectionInformation.lineEnd.md" +cssclasses: hide-title +--- + + + +[`MarkdownSectionInformation`](obsidian.MarkdownSectionInformation.md) › [`lineEnd`](obsidian.MarkdownSectionInformation.lineEnd.md) + +## MarkdownSectionInformation.lineEnd property + + +**Signature:** + +```typescript +lineEnd: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation/lineStart.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation/lineStart.md new file mode 100644 index 0000000000000000000000000000000000000000..dbfb55e655f1a08c9b97c85636e5aad848711d94 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation/lineStart.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownSectionInformation.lineStart.md" +cssclasses: hide-title +--- + + + +[`MarkdownSectionInformation`](obsidian.MarkdownSectionInformation.md) › [`lineStart`](obsidian.MarkdownSectionInformation.lineStart.md) + +## MarkdownSectionInformation.lineStart property + + +**Signature:** + +```typescript +lineStart: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation/text.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation/text.md new file mode 100644 index 0000000000000000000000000000000000000000..221042df56b64ba5d7434fb82cddae1a31707cb1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSectionInformation/text.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownSectionInformation.text.md" +cssclasses: hide-title +--- + + + +[`MarkdownSectionInformation`](obsidian.MarkdownSectionInformation.md) › [`text`](obsidian.MarkdownSectionInformation.text.md) + +## MarkdownSectionInformation.text property + + +**Signature:** + +```typescript +text: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView.md new file mode 100644 index 0000000000000000000000000000000000000000..44bbc28410eaaddeb173e7849e5efb4978684fe5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView.md @@ -0,0 +1,45 @@ +--- +aliases: "obsidian.MarkdownSourceView.md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) + +## MarkdownSourceView class + + +**Signature:** + +```typescript +export class MarkdownSourceView implements MarkdownSubView, HoverParent, MarkdownFileInfo +``` +**Implements:** [`MarkdownSubView`](obsidian.MarkdownSubView.md), [`HoverParent`](obsidian.HoverParent.md), [`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(view)`](obsidian.MarkdownSourceView.(constructor).md) | | Constructs a new instance of the MarkdownSourceView class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`app`](obsidian.MarkdownSourceView.app.md) | | [`App`](obsidian.App.md) | | +| [`cmEditor`](obsidian.MarkdownSourceView.cmEditor.md) | | CodeMirror.Editor | | +| [`file`](obsidian.MarkdownSourceView.file.md) | readonly | [`TFile`](obsidian.TFile.md) | | +| [`hoverPopover`](obsidian.MarkdownSourceView.hoverPopover.md) | | [`HoverPopover`](obsidian.HoverPopover.md) | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`applyScroll(scroll)`](obsidian.MarkdownSourceView.applyScroll.md) | | | +| [`clear()`](obsidian.MarkdownSourceView.clear.md) | | | +| [`get()`](obsidian.MarkdownSourceView.get.md) | | | +| [`getScroll()`](obsidian.MarkdownSourceView.getScroll.md) | | | +| [`getSelection()`](obsidian.MarkdownSourceView.getSelection.md) | | | +| [`set(data, clear)`](obsidian.MarkdownSourceView.set.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..429f522f6d5e3340849eddd747fb6f3977112429 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.MarkdownSourceView.(constructor).md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) › [`(constructor)`](obsidian.MarkdownSourceView.(constructor).md) + +## MarkdownSourceView.(constructor) + +Constructs a new instance of the `MarkdownSourceView` class + +**Signature:** + +```typescript +constructor(view: MarkdownView); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| view | [`MarkdownView`](obsidian.MarkdownView.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/app.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/app.md new file mode 100644 index 0000000000000000000000000000000000000000..b3e2935eee47dafe35cd34c8d967b5a9e6f648ef --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/app.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownSourceView.app.md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) › [`app`](obsidian.MarkdownSourceView.app.md) + +## MarkdownSourceView.app property + + +**Signature:** + +```typescript +app: App; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/applyScroll.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/applyScroll.md new file mode 100644 index 0000000000000000000000000000000000000000..0d1c7af7380401ccf0d976a4ff91cbbd30902722 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/applyScroll.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MarkdownSourceView.applyScroll.md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) › [`applyScroll`](obsidian.MarkdownSourceView.applyScroll.md) + +## MarkdownSourceView.applyScroll() method + + +**Signature:** + +```typescript +applyScroll(scroll: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| scroll | number | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/clear.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/clear.md new file mode 100644 index 0000000000000000000000000000000000000000..4cb6630f1b75036226a753b9690dd93aa2d3e17b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/clear.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownSourceView.clear.md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) › [`clear`](obsidian.MarkdownSourceView.clear.md) + +## MarkdownSourceView.clear() method + + +**Signature:** + +```typescript +clear(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/cmEditor.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/cmEditor.md new file mode 100644 index 0000000000000000000000000000000000000000..99e220231e12f797558d13efb039508ed2b4493c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/cmEditor.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownSourceView.cmEditor.md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) › [`cmEditor`](obsidian.MarkdownSourceView.cmEditor.md) + +## MarkdownSourceView.cmEditor property + +> Warning: This API is now obsolete. +> +> - Please use instead. If you have to use this because you're augmenting specific CodeMirror 5 implementations, be aware that it will only work in source code mode on the desktop app, and it will not work on Mobile, or once WYSIWYG mode is released. +> + +**Signature:** + +```typescript +cmEditor: CodeMirror.Editor; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/file.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/file.md new file mode 100644 index 0000000000000000000000000000000000000000..3efbbce114da80921c59fc2d4c65debeed635901 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/file.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownSourceView.file.md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) › [`file`](obsidian.MarkdownSourceView.file.md) + +## MarkdownSourceView.file property + + +**Signature:** + +```typescript +get file(): TFile; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/get.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/get.md new file mode 100644 index 0000000000000000000000000000000000000000..35e7c493db731e6f196411811a3faec97b128369 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/get.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownSourceView.get.md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) › [`get`](obsidian.MarkdownSourceView.get.md) + +## MarkdownSourceView.get() method + + +**Signature:** + +```typescript +get(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/getScroll.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/getScroll.md new file mode 100644 index 0000000000000000000000000000000000000000..22208ede9815134dee4b02231eb3dbc5028fcb08 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/getScroll.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownSourceView.getScroll.md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) › [`getScroll`](obsidian.MarkdownSourceView.getScroll.md) + +## MarkdownSourceView.getScroll() method + + +**Signature:** + +```typescript +getScroll(): number; +``` +**Returns:** + +`number` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/getSelection.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/getSelection.md new file mode 100644 index 0000000000000000000000000000000000000000..042da5da5edb646785c16f9d1ae201d786669a88 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/getSelection.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownSourceView.getSelection.md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) › [`getSelection`](obsidian.MarkdownSourceView.getSelection.md) + +## MarkdownSourceView.getSelection() method + + +**Signature:** + +```typescript +getSelection(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/hoverPopover.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/hoverPopover.md new file mode 100644 index 0000000000000000000000000000000000000000..2e9c7c12ba0d45fef99c0005eaad6f51f25d3788 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/hoverPopover.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownSourceView.hoverPopover.md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) › [`hoverPopover`](obsidian.MarkdownSourceView.hoverPopover.md) + +## MarkdownSourceView.hoverPopover property + + +**Signature:** + +```typescript +hoverPopover: HoverPopover; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/set.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/set.md new file mode 100644 index 0000000000000000000000000000000000000000..92ec58adf4eb87131b8e2d693593f552fcc2145e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSourceView/set.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.MarkdownSourceView.set.md" +cssclasses: hide-title +--- + + + +[`MarkdownSourceView`](obsidian.MarkdownSourceView.md) › [`set`](obsidian.MarkdownSourceView.set.md) + +## MarkdownSourceView.set() method + + +**Signature:** + +```typescript +set(data: string, clear: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| data | string | | +| clear | boolean | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView.md new file mode 100644 index 0000000000000000000000000000000000000000..bcf9ec2a75695a91a420b13641a6df99ce186164 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.MarkdownSubView.md" +cssclasses: hide-title +--- + + + +[`MarkdownSubView`](obsidian.MarkdownSubView.md) + +## MarkdownSubView interface + + +**Signature:** + +```typescript +export interface MarkdownSubView +``` + +## Methods + +| Method | Description | +| --- | --- | +| [`applyScroll(scroll)`](obsidian.MarkdownSubView.applyScroll.md) | | +| [`get()`](obsidian.MarkdownSubView.get.md) | | +| [`getScroll()`](obsidian.MarkdownSubView.getScroll.md) | | +| [`set(data, clear)`](obsidian.MarkdownSubView.set.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/applyScroll.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/applyScroll.md new file mode 100644 index 0000000000000000000000000000000000000000..0352164da2dc9615e3669841397bc7ad2db191d7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/applyScroll.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MarkdownSubView.applyScroll.md" +cssclasses: hide-title +--- + + + +[`MarkdownSubView`](obsidian.MarkdownSubView.md) › [`applyScroll`](obsidian.MarkdownSubView.applyScroll.md) + +## MarkdownSubView.applyScroll() method + + +**Signature:** + +```typescript +applyScroll(scroll: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| scroll | number | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/get.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/get.md new file mode 100644 index 0000000000000000000000000000000000000000..107244a586e43b5cb93dcf6d058a1a6c27959ec5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/get.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownSubView.get.md" +cssclasses: hide-title +--- + + + +[`MarkdownSubView`](obsidian.MarkdownSubView.md) › [`get`](obsidian.MarkdownSubView.get.md) + +## MarkdownSubView.get() method + + +**Signature:** + +```typescript +get(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/getScroll.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/getScroll.md new file mode 100644 index 0000000000000000000000000000000000000000..465d8db289cbc67e7e5dc7bc79f3c2347482496d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/getScroll.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownSubView.getScroll.md" +cssclasses: hide-title +--- + + + +[`MarkdownSubView`](obsidian.MarkdownSubView.md) › [`getScroll`](obsidian.MarkdownSubView.getScroll.md) + +## MarkdownSubView.getScroll() method + + +**Signature:** + +```typescript +getScroll(): number; +``` +**Returns:** + +`number` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/set.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/set.md new file mode 100644 index 0000000000000000000000000000000000000000..ac7c14706de98e5b7c4c5b31ffe74e4327526094 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownSubView/set.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.MarkdownSubView.set.md" +cssclasses: hide-title +--- + + + +[`MarkdownSubView`](obsidian.MarkdownSubView.md) › [`set`](obsidian.MarkdownSubView.set.md) + +## MarkdownSubView.set() method + + +**Signature:** + +```typescript +set(data: string, clear: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| data | string | | +| clear | boolean | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView.md new file mode 100644 index 0000000000000000000000000000000000000000..70944ac1decc3555d309052e6a4015322b502352 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView.md @@ -0,0 +1,47 @@ +--- +aliases: "obsidian.MarkdownView.md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) + +## MarkdownView class + + +**Signature:** + +```typescript +export class MarkdownView extends TextFileView implements MarkdownFileInfo +``` +**Extends:** [`TextFileView`](obsidian.TextFileView.md) + +**Implements:** [`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(leaf)`](obsidian.MarkdownView.(constructor).md) | | Constructs a new instance of the MarkdownView class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`currentMode`](obsidian.MarkdownView.currentMode.md) | | [`MarkdownSubView`](obsidian.MarkdownSubView.md) | | +| [`editor`](obsidian.MarkdownView.editor.md) | | [`Editor`](obsidian.Editor.md) | | +| [`hoverPopover`](obsidian.MarkdownView.hoverPopover.md) | | [`HoverPopover`](obsidian.HoverPopover.md) | null | | +| [`previewMode`](obsidian.MarkdownView.previewMode.md) | | [`MarkdownPreviewView`](obsidian.MarkdownPreviewView.md) | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`clear()`](obsidian.MarkdownView.clear.md) | | | +| [`getMode()`](obsidian.MarkdownView.getMode.md) | | | +| [`getViewData()`](obsidian.MarkdownView.getViewData.md) | | | +| [`getViewType()`](obsidian.MarkdownView.getViewType.md) | | | +| [`setViewData(data, clear)`](obsidian.MarkdownView.setViewData.md) | | | +| [`showSearch(replace)`](obsidian.MarkdownView.showSearch.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..12bf9e7b6eff221d296ee11adc49c3c206253e35 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.MarkdownView.(constructor).md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) › [`(constructor)`](obsidian.MarkdownView.(constructor).md) + +## MarkdownView.(constructor) + +Constructs a new instance of the `MarkdownView` class + +**Signature:** + +```typescript +constructor(leaf: WorkspaceLeaf); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/clear.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/clear.md new file mode 100644 index 0000000000000000000000000000000000000000..44aaec1c4e8cba0b639f752e8b5f26f7075b1339 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/clear.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownView.clear.md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) › [`clear`](obsidian.MarkdownView.clear.md) + +## MarkdownView.clear() method + + +**Signature:** + +```typescript +clear(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/currentMode.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/currentMode.md new file mode 100644 index 0000000000000000000000000000000000000000..c82a467d82af86f5fbdd85193618b7806272b5a7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/currentMode.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownView.currentMode.md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) › [`currentMode`](obsidian.MarkdownView.currentMode.md) + +## MarkdownView.currentMode property + + +**Signature:** + +```typescript +currentMode: MarkdownSubView; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/editor.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/editor.md new file mode 100644 index 0000000000000000000000000000000000000000..ce63589e39acf17b4b39a27a85f7e640c982d4fb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/editor.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownView.editor.md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) › [`editor`](obsidian.MarkdownView.editor.md) + +## MarkdownView.editor property + + +**Signature:** + +```typescript +editor: Editor; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/getMode.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/getMode.md new file mode 100644 index 0000000000000000000000000000000000000000..b8da129f6641c7d2b40f1813101b77c659e17c16 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/getMode.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownView.getMode.md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) › [`getMode`](obsidian.MarkdownView.getMode.md) + +## MarkdownView.getMode() method + + +**Signature:** + +```typescript +getMode(): MarkdownViewModeType; +``` +**Returns:** + +[`MarkdownViewModeType`](obsidian.MarkdownViewModeType.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/getViewData.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/getViewData.md new file mode 100644 index 0000000000000000000000000000000000000000..f9743cf04610ad81c14c70c9315f9edbad2b4c05 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/getViewData.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownView.getViewData.md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) › [`getViewData`](obsidian.MarkdownView.getViewData.md) + +## MarkdownView.getViewData() method + + +**Signature:** + +```typescript +getViewData(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/getViewType.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/getViewType.md new file mode 100644 index 0000000000000000000000000000000000000000..a27d594961549712a5a13f45f8546595452fad0d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/getViewType.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MarkdownView.getViewType.md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) › [`getViewType`](obsidian.MarkdownView.getViewType.md) + +## MarkdownView.getViewType() method + + +**Signature:** + +```typescript +getViewType(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/hoverPopover.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/hoverPopover.md new file mode 100644 index 0000000000000000000000000000000000000000..0a4edeb8dde0ef5cfdee2aefa55bd81c050c842e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/hoverPopover.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownView.hoverPopover.md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) › [`hoverPopover`](obsidian.MarkdownView.hoverPopover.md) + +## MarkdownView.hoverPopover property + + +**Signature:** + +```typescript +hoverPopover: HoverPopover | null; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/previewMode.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/previewMode.md new file mode 100644 index 0000000000000000000000000000000000000000..3bd90dcfe2f04ae916f7e3d07762d436eff33d25 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/previewMode.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownView.previewMode.md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) › [`previewMode`](obsidian.MarkdownView.previewMode.md) + +## MarkdownView.previewMode property + + +**Signature:** + +```typescript +previewMode: MarkdownPreviewView; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/setViewData.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/setViewData.md new file mode 100644 index 0000000000000000000000000000000000000000..5230918e54b9fae363ebba749e97b92c59049665 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/setViewData.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.MarkdownView.setViewData.md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) › [`setViewData`](obsidian.MarkdownView.setViewData.md) + +## MarkdownView.setViewData() method + + +**Signature:** + +```typescript +setViewData(data: string, clear: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| data | string | | +| clear | boolean | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/showSearch.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/showSearch.md new file mode 100644 index 0000000000000000000000000000000000000000..3852b159b92c6c05e5a007ec1251550883e78eb4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownView/showSearch.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MarkdownView.showSearch.md" +cssclasses: hide-title +--- + + + +[`MarkdownView`](obsidian.MarkdownView.md) › [`showSearch`](obsidian.MarkdownView.showSearch.md) + +## MarkdownView.showSearch() method + + +**Signature:** + +```typescript +showSearch(replace?: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| replace | boolean | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MarkdownViewModeType.md b/docs/obsidian-developer/Reference/TypeScript API/MarkdownViewModeType.md new file mode 100644 index 0000000000000000000000000000000000000000..b1cf7dce67090b4d0f401a299d40f831aaf1014e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MarkdownViewModeType.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MarkdownViewModeType.md" +cssclasses: hide-title +--- + + + +[`MarkdownViewModeType`](obsidian.MarkdownViewModeType.md) + +## MarkdownViewModeType type + + +**Signature:** + +```typescript +export type MarkdownViewModeType = 'source' | 'preview'; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Menu.md b/docs/obsidian-developer/Reference/TypeScript API/Menu.md new file mode 100644 index 0000000000000000000000000000000000000000..6fe13fa11552180de689f771a484129b65612547 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Menu.md @@ -0,0 +1,41 @@ +--- +aliases: "obsidian.Menu.md" +cssclasses: hide-title +--- + + + +[`Menu`](obsidian.Menu.md) + +## Menu class + + +**Signature:** + +```typescript +export class Menu extends Component implements CloseableComponent +``` +**Extends:** [`Component`](obsidian.Component.md) + +**Implements:** [`CloseableComponent`](obsidian.CloseableComponent.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)()`](obsidian.Menu.(constructor).md) | | Constructs a new instance of the Menu class | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`addItem(cb)`](obsidian.Menu.addItem.md) | | Adds a menu item. Only works when menu is not shown yet. | +| [`addSeparator()`](obsidian.Menu.addSeparator.md) | | Adds a separator. Only works when menu is not shown yet. | +| [`close()`](obsidian.Menu.close.md) | | | +| [`hide()`](obsidian.Menu.hide.md) | | | +| [`onHide(callback)`](obsidian.Menu.onHide.md) | | | +| [`setNoIcon()`](obsidian.Menu.setNoIcon.md) | | | +| [`setUseNativeMenu(useNativeMenu)`](obsidian.Menu.setUseNativeMenu.md) | | Force this menu to use native or DOM. (Only works on the desktop app) | +| [`showAtMouseEvent(evt)`](obsidian.Menu.showAtMouseEvent.md) | | | +| [`showAtPosition(position, doc)`](obsidian.Menu.showAtPosition.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Menu/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/Menu/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..6e88c1605599a8a14d707c165edf579e408e5c86 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Menu/(constructor).md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Menu.(constructor).md" +cssclasses: hide-title +--- + + + +[`Menu`](obsidian.Menu.md) › [`(constructor)`](obsidian.Menu.(constructor).md) + +## Menu.(constructor) + +Constructs a new instance of the `Menu` class + +**Signature:** + +```typescript +constructor(); +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Menu/addItem.md b/docs/obsidian-developer/Reference/TypeScript API/Menu/addItem.md new file mode 100644 index 0000000000000000000000000000000000000000..0bcaf6ebd36ffecef6926528a277658234396b85 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Menu/addItem.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Menu.addItem.md" +cssclasses: hide-title +--- + + + +[`Menu`](obsidian.Menu.md) › [`addItem`](obsidian.Menu.addItem.md) + +## Menu.addItem() method + +Adds a menu item. Only works when menu is not shown yet. + +**Signature:** + +```typescript +addItem(cb: (item: MenuItem) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (item: [`MenuItem`](obsidian.MenuItem.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Menu/addSeparator.md b/docs/obsidian-developer/Reference/TypeScript API/Menu/addSeparator.md new file mode 100644 index 0000000000000000000000000000000000000000..2314a57e0ec95fdc089fa3b71c7b0e930ab556c7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Menu/addSeparator.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Menu.addSeparator.md" +cssclasses: hide-title +--- + + + +[`Menu`](obsidian.Menu.md) › [`addSeparator`](obsidian.Menu.addSeparator.md) + +## Menu.addSeparator() method + +Adds a separator. Only works when menu is not shown yet. + +**Signature:** + +```typescript +addSeparator(): this; +``` +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Menu/close.md b/docs/obsidian-developer/Reference/TypeScript API/Menu/close.md new file mode 100644 index 0000000000000000000000000000000000000000..a24cb70b5160de56607fe85e4d5608b04edb3892 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Menu/close.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Menu.close.md" +cssclasses: hide-title +--- + + + +[`Menu`](obsidian.Menu.md) › [`close`](obsidian.Menu.close.md) + +## Menu.close() method + + +**Signature:** + +```typescript +close(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Menu/hide.md b/docs/obsidian-developer/Reference/TypeScript API/Menu/hide.md new file mode 100644 index 0000000000000000000000000000000000000000..ce2663011e657dffccd035f12f0b88527ed845f6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Menu/hide.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Menu.hide.md" +cssclasses: hide-title +--- + + + +[`Menu`](obsidian.Menu.md) › [`hide`](obsidian.Menu.hide.md) + +## Menu.hide() method + + +**Signature:** + +```typescript +hide(): this; +``` +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Menu/onHide.md b/docs/obsidian-developer/Reference/TypeScript API/Menu/onHide.md new file mode 100644 index 0000000000000000000000000000000000000000..43b12b50bd12c353881632bc1b937dd44af2c1f6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Menu/onHide.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Menu.onHide.md" +cssclasses: hide-title +--- + + + +[`Menu`](obsidian.Menu.md) › [`onHide`](obsidian.Menu.onHide.md) + +## Menu.onHide() method + + +**Signature:** + +```typescript +onHide(callback: () => any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | () => any | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Menu/setNoIcon.md b/docs/obsidian-developer/Reference/TypeScript API/Menu/setNoIcon.md new file mode 100644 index 0000000000000000000000000000000000000000..5abfb101023c665ee264140a8f8aa80a7c729fd3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Menu/setNoIcon.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Menu.setNoIcon.md" +cssclasses: hide-title +--- + + + +[`Menu`](obsidian.Menu.md) › [`setNoIcon`](obsidian.Menu.setNoIcon.md) + +## Menu.setNoIcon() method + + +**Signature:** + +```typescript +setNoIcon(): this; +``` +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Menu/setUseNativeMenu.md b/docs/obsidian-developer/Reference/TypeScript API/Menu/setUseNativeMenu.md new file mode 100644 index 0000000000000000000000000000000000000000..feb3e1a0e4c5b78211727e3fbdb0410d507e9464 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Menu/setUseNativeMenu.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Menu.setUseNativeMenu.md" +cssclasses: hide-title +--- + + + +[`Menu`](obsidian.Menu.md) › [`setUseNativeMenu`](obsidian.Menu.setUseNativeMenu.md) + +## Menu.setUseNativeMenu() method + +Force this menu to use native or DOM. (Only works on the desktop app) + +**Signature:** + +```typescript +setUseNativeMenu(useNativeMenu: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| useNativeMenu | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Menu/showAtMouseEvent.md b/docs/obsidian-developer/Reference/TypeScript API/Menu/showAtMouseEvent.md new file mode 100644 index 0000000000000000000000000000000000000000..f8a19fa310eb60a8ca92c0bcd31e84ef908d3246 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Menu/showAtMouseEvent.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Menu.showAtMouseEvent.md" +cssclasses: hide-title +--- + + + +[`Menu`](obsidian.Menu.md) › [`showAtMouseEvent`](obsidian.Menu.showAtMouseEvent.md) + +## Menu.showAtMouseEvent() method + + +**Signature:** + +```typescript +showAtMouseEvent(evt: MouseEvent): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| evt | MouseEvent | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Menu/showAtPosition.md b/docs/obsidian-developer/Reference/TypeScript API/Menu/showAtPosition.md new file mode 100644 index 0000000000000000000000000000000000000000..4df373dca5b8963920d9857169fa1e0ae00e572d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Menu/showAtPosition.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Menu.showAtPosition.md" +cssclasses: hide-title +--- + + + +[`Menu`](obsidian.Menu.md) › [`showAtPosition`](obsidian.Menu.showAtPosition.md) + +## Menu.showAtPosition() method + + +**Signature:** + +```typescript +showAtPosition(position: MenuPositionDef, doc?: Document): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| position | [`MenuPositionDef`](obsidian.MenuPositionDef.md) | | +| doc | Document | _(Optional)_ | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuItem.md b/docs/obsidian-developer/Reference/TypeScript API/MenuItem.md new file mode 100644 index 0000000000000000000000000000000000000000..45458067f6a9ceddecf3fdb7be9d5ff59ae9968c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuItem.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.MenuItem.md" +cssclasses: hide-title +--- + + + +[`MenuItem`](obsidian.MenuItem.md) + +## MenuItem class + + +**Signature:** + +```typescript +export class MenuItem +``` + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`onClick(callback)`](obsidian.MenuItem.onClick.md) | | | +| [`setChecked(checked)`](obsidian.MenuItem.setChecked.md) | | | +| [`setDisabled(disabled)`](obsidian.MenuItem.setDisabled.md) | | | +| [`setIcon(icon)`](obsidian.MenuItem.setIcon.md) | | | +| [`setIsLabel(isLabel)`](obsidian.MenuItem.setIsLabel.md) | | | +| [`setSection(section)`](obsidian.MenuItem.setSection.md) | | Sets the section this menu item should belong in. To find the section IDs of an existing menu, inspect the DOM elements to see their data-section attribute. | +| [`setTitle(title)`](obsidian.MenuItem.setTitle.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuItem/onClick.md b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/onClick.md new file mode 100644 index 0000000000000000000000000000000000000000..85615f7ffb2b598826d5581b579c11c67854158d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/onClick.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MenuItem.onClick.md" +cssclasses: hide-title +--- + + + +[`MenuItem`](obsidian.MenuItem.md) › [`onClick`](obsidian.MenuItem.onClick.md) + +## MenuItem.onClick() method + + +**Signature:** + +```typescript +onClick(callback: (evt: MouseEvent | KeyboardEvent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (evt: MouseEvent | KeyboardEvent) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setChecked.md b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setChecked.md new file mode 100644 index 0000000000000000000000000000000000000000..38f6a1673c26757a93e302e38f392c792f0c6b49 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setChecked.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MenuItem.setChecked.md" +cssclasses: hide-title +--- + + + +[`MenuItem`](obsidian.MenuItem.md) › [`setChecked`](obsidian.MenuItem.setChecked.md) + +## MenuItem.setChecked() method + + +**Signature:** + +```typescript +setChecked(checked: boolean | null): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| checked | boolean | null | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setDisabled.md b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setDisabled.md new file mode 100644 index 0000000000000000000000000000000000000000..23fad7c2addc1a898f70fa7f306da8743a7ded2c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setDisabled.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MenuItem.setDisabled.md" +cssclasses: hide-title +--- + + + +[`MenuItem`](obsidian.MenuItem.md) › [`setDisabled`](obsidian.MenuItem.setDisabled.md) + +## MenuItem.setDisabled() method + + +**Signature:** + +```typescript +setDisabled(disabled: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| disabled | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setIcon.md b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setIcon.md new file mode 100644 index 0000000000000000000000000000000000000000..9ae352c48bc3e00a1f4a911e3df9f35e44ce23d6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setIcon.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.MenuItem.setIcon.md" +cssclasses: hide-title +--- + + + +[`MenuItem`](obsidian.MenuItem.md) › [`setIcon`](obsidian.MenuItem.setIcon.md) + +## MenuItem.setIcon() method + +**Signature:** + +```typescript +setIcon(icon: IconName | null): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| icon | [`IconName`](obsidian.IconName.md) | null | ID of the icon, can use any icon loaded with [addIcon()](obsidian.addIcon.md) or from the built-in lucide library. | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setIsLabel.md b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setIsLabel.md new file mode 100644 index 0000000000000000000000000000000000000000..be82c8296355f84db4a8c81d9726ac9713ba832a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setIsLabel.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MenuItem.setIsLabel.md" +cssclasses: hide-title +--- + + + +[`MenuItem`](obsidian.MenuItem.md) › [`setIsLabel`](obsidian.MenuItem.setIsLabel.md) + +## MenuItem.setIsLabel() method + + +**Signature:** + +```typescript +setIsLabel(isLabel: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| isLabel | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setSection.md b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setSection.md new file mode 100644 index 0000000000000000000000000000000000000000..c4f855b7aa1cbb3e2ade79009973f6fe4d8b4376 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setSection.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.MenuItem.setSection.md" +cssclasses: hide-title +--- + + + +[`MenuItem`](obsidian.MenuItem.md) › [`setSection`](obsidian.MenuItem.setSection.md) + +## MenuItem.setSection() method + +Sets the section this menu item should belong in. To find the section IDs of an existing menu, inspect the DOM elements to see their `data-section` attribute. + +**Signature:** + +```typescript +setSection(section: string): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| section | string | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setTitle.md b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setTitle.md new file mode 100644 index 0000000000000000000000000000000000000000..a24e50bfce2bbc67effa00ec6fddf14ce9820127 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuItem/setTitle.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MenuItem.setTitle.md" +cssclasses: hide-title +--- + + + +[`MenuItem`](obsidian.MenuItem.md) › [`setTitle`](obsidian.MenuItem.setTitle.md) + +## MenuItem.setTitle() method + + +**Signature:** + +```typescript +setTitle(title: string | DocumentFragment): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| title | string | DocumentFragment | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef.md b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef.md new file mode 100644 index 0000000000000000000000000000000000000000..efba7e0003b2ac08c6a4a5e221766b6f48922d56 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MenuPositionDef.md" +cssclasses: hide-title +--- + + + +[`MenuPositionDef`](obsidian.MenuPositionDef.md) + +## MenuPositionDef interface + + +**Signature:** + +```typescript +export interface MenuPositionDef +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`left?`](obsidian.MenuPositionDef.left.md) | | boolean | _(Optional)_ | +| [`overlap?`](obsidian.MenuPositionDef.overlap.md) | | boolean | _(Optional)_ | +| [`width?`](obsidian.MenuPositionDef.width.md) | | number | _(Optional)_ | +| [`x`](obsidian.MenuPositionDef.x.md) | | number | | +| [`y`](obsidian.MenuPositionDef.y.md) | | number | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/left.md b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/left.md new file mode 100644 index 0000000000000000000000000000000000000000..752948893c4026001fb4260d4662e3091524e942 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/left.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MenuPositionDef.left.md" +cssclasses: hide-title +--- + + + +[`MenuPositionDef`](obsidian.MenuPositionDef.md) › [`left`](obsidian.MenuPositionDef.left.md) + +## MenuPositionDef.left property + + +**Signature:** + +```typescript +left?: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/overlap.md b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/overlap.md new file mode 100644 index 0000000000000000000000000000000000000000..98304cd74825340860048ef1be558f5d58044fcd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/overlap.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MenuPositionDef.overlap.md" +cssclasses: hide-title +--- + + + +[`MenuPositionDef`](obsidian.MenuPositionDef.md) › [`overlap`](obsidian.MenuPositionDef.overlap.md) + +## MenuPositionDef.overlap property + + +**Signature:** + +```typescript +overlap?: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/width.md b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/width.md new file mode 100644 index 0000000000000000000000000000000000000000..7e4bfde3ad2fcc478c07066601cfc1df03a481d2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/width.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MenuPositionDef.width.md" +cssclasses: hide-title +--- + + + +[`MenuPositionDef`](obsidian.MenuPositionDef.md) › [`width`](obsidian.MenuPositionDef.width.md) + +## MenuPositionDef.width property + + +**Signature:** + +```typescript +width?: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/x.md b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/x.md new file mode 100644 index 0000000000000000000000000000000000000000..587d832bec4c2abe4ab0f6902e05cff51a041fff --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/x.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MenuPositionDef.x.md" +cssclasses: hide-title +--- + + + +[`MenuPositionDef`](obsidian.MenuPositionDef.md) › [`x`](obsidian.MenuPositionDef.x.md) + +## MenuPositionDef.x property + + +**Signature:** + +```typescript +x: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/y.md b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/y.md new file mode 100644 index 0000000000000000000000000000000000000000..409c4c6264bb5c27c048d8b1d86d49f91678c2bb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuPositionDef/y.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MenuPositionDef.y.md" +cssclasses: hide-title +--- + + + +[`MenuPositionDef`](obsidian.MenuPositionDef.md) › [`y`](obsidian.MenuPositionDef.y.md) + +## MenuPositionDef.y property + + +**Signature:** + +```typescript +y: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MenuSeparator.md b/docs/obsidian-developer/Reference/TypeScript API/MenuSeparator.md new file mode 100644 index 0000000000000000000000000000000000000000..e6d66b9e98b4ea8bdb43482e8f8a5c3b8be444ba --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MenuSeparator.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MenuSeparator.md" +cssclasses: hide-title +--- + + + +[`MenuSeparator`](obsidian.MenuSeparator.md) + +## MenuSeparator class + + +**Signature:** + +```typescript +export class MenuSeparator +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MetadataCache.md b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache.md new file mode 100644 index 0000000000000000000000000000000000000000..29b0e434c46fc1a155d39cbc2dd26b68e0ac9682 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache.md @@ -0,0 +1,40 @@ +--- +aliases: "obsidian.MetadataCache.md" +cssclasses: hide-title +--- + + + +[`MetadataCache`](obsidian.MetadataCache.md) + +## MetadataCache class + +Linktext is any internal link that is composed of a path and a subpath, such as "My note\#Heading" Linkpath (or path) is the path part of a linktext Subpath is the heading/block ID part of a linktext. + +**Signature:** + +```typescript +export class MetadataCache extends Events +``` +**Extends:** [`Events`](obsidian.Events.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`resolvedLinks`](obsidian.MetadataCache.resolvedLinks.md) | | Record<string, Record<string, number>> | Contains all resolved links. This object maps each source file's path to an object of destination file paths with the link count. Source and destination paths are all vault absolute paths that comes from TFile.path and can be used with Vault.getAbstractFileByPath(path). | +| [`unresolvedLinks`](obsidian.MetadataCache.unresolvedLinks.md) | | Record<string, Record<string, number>> | Contains all unresolved links. This object maps each source file to an object of unknown destinations with count. Source paths are all vault absolute paths, similar to resolvedLinks. | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`fileToLinktext(file, sourcePath, omitMdExtension)`](obsidian.MetadataCache.fileToLinktext.md) | |

Generates a linktext for a file.

If file name is unique, use the filename. If not unique, use full path.

| +| [`getCache(path)`](obsidian.MetadataCache.getCache.md) | | | +| [`getFileCache(file)`](obsidian.MetadataCache.getFileCache.md) | | | +| [`getFirstLinkpathDest(linkpath, sourcePath)`](obsidian.MetadataCache.getFirstLinkpathDest.md) | | Get the best match for a linkpath. | +| [`on(name, callback, ctx)`](obsidian.MetadataCache.on.md) | |

Called when a file has been indexed, and its (updated) cache is now available.

Note: This is not called when a file is renamed for performance reasons. You must hook the vault rename event for those. (Details: https://github.com/obsidianmd/obsidian-api/issues/77)

| +| [`on(name, callback, ctx)`](obsidian.MetadataCache.on_1.md) | | Called when a file has been deleted. A best-effort previous version of the cached metadata is presented, but it could be null in case the file was not successfully cached previously. | +| [`on(name, callback, ctx)`](obsidian.MetadataCache.on_2.md) | | Called when a file has been resolved for resolvedLinks and unresolvedLinks. This happens sometimes after a file has been indexed. | +| [`on(name, callback, ctx)`](obsidian.MetadataCache.on_3.md) | | Called when all files has been resolved. This will be fired each time files get modified after the initial load. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/fileToLinktext.md b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/fileToLinktext.md new file mode 100644 index 0000000000000000000000000000000000000000..a00eec3f1d2623f4bb46053e6aa9b16909b6375b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/fileToLinktext.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.MetadataCache.fileToLinktext.md" +cssclasses: hide-title +--- + + + +[`MetadataCache`](obsidian.MetadataCache.md) › [`fileToLinktext`](obsidian.MetadataCache.fileToLinktext.md) + +## MetadataCache.fileToLinktext() method + +Generates a linktext for a file. + +If file name is unique, use the filename. If not unique, use full path. + +**Signature:** + +```typescript +fileToLinktext(file: TFile, sourcePath: string, omitMdExtension?: boolean): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | +| sourcePath | string | | +| omitMdExtension | boolean | _(Optional)_ | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/getCache.md b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/getCache.md new file mode 100644 index 0000000000000000000000000000000000000000..1c021225601b069c17bd00b56e756611fc27dfd8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/getCache.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MetadataCache.getCache.md" +cssclasses: hide-title +--- + + + +[`MetadataCache`](obsidian.MetadataCache.md) › [`getCache`](obsidian.MetadataCache.getCache.md) + +## MetadataCache.getCache() method + + +**Signature:** + +```typescript +getCache(path: string): CachedMetadata | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| path | string | | + +**Returns:** + +[`CachedMetadata`](obsidian.CachedMetadata.md)` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/getFileCache.md b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/getFileCache.md new file mode 100644 index 0000000000000000000000000000000000000000..900b0ac394ab6e2331e5cbbb54b60487768cd4e7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/getFileCache.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MetadataCache.getFileCache.md" +cssclasses: hide-title +--- + + + +[`MetadataCache`](obsidian.MetadataCache.md) › [`getFileCache`](obsidian.MetadataCache.getFileCache.md) + +## MetadataCache.getFileCache() method + + +**Signature:** + +```typescript +getFileCache(file: TFile): CachedMetadata | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | + +**Returns:** + +[`CachedMetadata`](obsidian.CachedMetadata.md)` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/getFirstLinkpathDest.md b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/getFirstLinkpathDest.md new file mode 100644 index 0000000000000000000000000000000000000000..efd00b2e079f6a25ecf9889c581aa982b1418900 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/getFirstLinkpathDest.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.MetadataCache.getFirstLinkpathDest.md" +cssclasses: hide-title +--- + + + +[`MetadataCache`](obsidian.MetadataCache.md) › [`getFirstLinkpathDest`](obsidian.MetadataCache.getFirstLinkpathDest.md) + +## MetadataCache.getFirstLinkpathDest() method + +Get the best match for a linkpath. + +**Signature:** + +```typescript +getFirstLinkpathDest(linkpath: string, sourcePath: string): TFile | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| linkpath | string | | +| sourcePath | string | | + +**Returns:** + +[`TFile`](obsidian.TFile.md)` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on.md b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on.md new file mode 100644 index 0000000000000000000000000000000000000000..5238cadc95d9cc0abb490120d8b55f1f484d42f3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.MetadataCache.on.md" +cssclasses: hide-title +--- + + + +[`MetadataCache`](obsidian.MetadataCache.md) › [`on`](obsidian.MetadataCache.on.md) + +## MetadataCache.on() method + +Called when a file has been indexed, and its (updated) cache is now available. + +Note: This is not called when a file is renamed for performance reasons. You must hook the vault rename event for those. (Details: https://github.com/obsidianmd/obsidian-api/issues/77) + +**Signature:** + +```typescript +on(name: 'changed', callback: (file: TFile, data: string, cache: CachedMetadata) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'changed' | | +| callback | (file: [`TFile`](obsidian.TFile.md), data: string, cache: [`CachedMetadata`](obsidian.CachedMetadata.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on_1.md b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on_1.md new file mode 100644 index 0000000000000000000000000000000000000000..6165e49147951120f76e283f32c9a5fe9707a742 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on_1.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.MetadataCache.on_1.md" +cssclasses: hide-title +--- + + + +[`MetadataCache`](obsidian.MetadataCache.md) › [`on`](obsidian.MetadataCache.on_1.md) + +## MetadataCache.on() method + +Called when a file has been deleted. A best-effort previous version of the cached metadata is presented, but it could be null in case the file was not successfully cached previously. + +**Signature:** + +```typescript +on(name: 'deleted', callback: (file: TFile, prevCache: CachedMetadata | null) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'deleted' | | +| callback | (file: [`TFile`](obsidian.TFile.md), prevCache: [`CachedMetadata`](obsidian.CachedMetadata.md) | null) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on_2.md b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on_2.md new file mode 100644 index 0000000000000000000000000000000000000000..835fd390e2f576aa81c29b8fde72757bc966f968 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on_2.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.MetadataCache.on_2.md" +cssclasses: hide-title +--- + + + +[`MetadataCache`](obsidian.MetadataCache.md) › [`on`](obsidian.MetadataCache.on_2.md) + +## MetadataCache.on() method + +Called when a file has been resolved for `resolvedLinks` and `unresolvedLinks`. This happens sometimes after a file has been indexed. + +**Signature:** + +```typescript +on(name: 'resolve', callback: (file: TFile) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'resolve' | | +| callback | (file: [`TFile`](obsidian.TFile.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on_3.md b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on_3.md new file mode 100644 index 0000000000000000000000000000000000000000..1a0980f1b7e5b54bfee5f3b53a1f676657b8070f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/on_3.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.MetadataCache.on_3.md" +cssclasses: hide-title +--- + + + +[`MetadataCache`](obsidian.MetadataCache.md) › [`on`](obsidian.MetadataCache.on_3.md) + +## MetadataCache.on() method + +Called when all files has been resolved. This will be fired each time files get modified after the initial load. + +**Signature:** + +```typescript +on(name: 'resolved', callback: () => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'resolved' | | +| callback | () => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/resolvedLinks.md b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/resolvedLinks.md new file mode 100644 index 0000000000000000000000000000000000000000..10abe811765d64e061309b001d071ab742f81640 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/resolvedLinks.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.MetadataCache.resolvedLinks.md" +cssclasses: hide-title +--- + + + +[`MetadataCache`](obsidian.MetadataCache.md) › [`resolvedLinks`](obsidian.MetadataCache.resolvedLinks.md) + +## MetadataCache.resolvedLinks property + +Contains all resolved links. This object maps each source file's path to an object of destination file paths with the link count. Source and destination paths are all vault absolute paths that comes from `TFile.path` and can be used with `Vault.getAbstractFileByPath(path)`. + +**Signature:** + +```typescript +resolvedLinks: Record>; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/unresolvedLinks.md b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/unresolvedLinks.md new file mode 100644 index 0000000000000000000000000000000000000000..f151cd3ae3f00bb81db7ed5a0c06dfaa852ed71d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MetadataCache/unresolvedLinks.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.MetadataCache.unresolvedLinks.md" +cssclasses: hide-title +--- + + + +[`MetadataCache`](obsidian.MetadataCache.md) › [`unresolvedLinks`](obsidian.MetadataCache.unresolvedLinks.md) + +## MetadataCache.unresolvedLinks property + +Contains all unresolved links. This object maps each source file to an object of unknown destinations with count. Source paths are all vault absolute paths, similar to `resolvedLinks`. + +**Signature:** + +```typescript +unresolvedLinks: Record>; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal.md b/docs/obsidian-developer/Reference/TypeScript API/Modal.md new file mode 100644 index 0000000000000000000000000000000000000000..1ac6d73f07619953a589f15d52eb8c74106ba456 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal.md @@ -0,0 +1,46 @@ +--- +aliases: "obsidian.Modal.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) + +## Modal class + + +**Signature:** + +```typescript +export class Modal implements CloseableComponent +``` +**Implements:** [`CloseableComponent`](obsidian.CloseableComponent.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(app)`](obsidian.Modal.(constructor).md) | | Constructs a new instance of the Modal class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`app`](obsidian.Modal.app.md) | | [`App`](obsidian.App.md) | | +| [`containerEl`](obsidian.Modal.containerEl.md) | | HTMLElement | | +| [`contentEl`](obsidian.Modal.contentEl.md) | | HTMLElement | | +| [`modalEl`](obsidian.Modal.modalEl.md) | | HTMLElement | | +| [`scope`](obsidian.Modal.scope.md) | | [`Scope`](obsidian.Scope.md) | | +| [`shouldRestoreSelection`](obsidian.Modal.shouldRestoreSelection.md) | | boolean | | +| [`titleEl`](obsidian.Modal.titleEl.md) | | HTMLElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`close()`](obsidian.Modal.close.md) | | | +| [`onClose()`](obsidian.Modal.onClose.md) | | | +| [`onOpen()`](obsidian.Modal.onOpen.md) | | | +| [`open()`](obsidian.Modal.open.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/Modal/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..6a2942c7a2c6cd011846e6f0d1b9bbdf9a47194f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.Modal.(constructor).md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`(constructor)`](obsidian.Modal.(constructor).md) + +## Modal.(constructor) + +Constructs a new instance of the `Modal` class + +**Signature:** + +```typescript +constructor(app: App); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| app | [`App`](obsidian.App.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/app.md b/docs/obsidian-developer/Reference/TypeScript API/Modal/app.md new file mode 100644 index 0000000000000000000000000000000000000000..438e5e95927273363d57d6eb76f7950b03c85d10 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/app.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Modal.app.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`app`](obsidian.Modal.app.md) + +## Modal.app property + + +**Signature:** + +```typescript +app: App; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/close.md b/docs/obsidian-developer/Reference/TypeScript API/Modal/close.md new file mode 100644 index 0000000000000000000000000000000000000000..a6b89e89b00290a18987acbbce8a2881f71521d2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/close.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Modal.close.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`close`](obsidian.Modal.close.md) + +## Modal.close() method + + +**Signature:** + +```typescript +close(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/containerEl.md b/docs/obsidian-developer/Reference/TypeScript API/Modal/containerEl.md new file mode 100644 index 0000000000000000000000000000000000000000..3198a366d13bca3f3f8d14764c5b66fbf41e7e66 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/containerEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Modal.containerEl.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`containerEl`](obsidian.Modal.containerEl.md) + +## Modal.containerEl property + + +**Signature:** + +```typescript +containerEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/contentEl.md b/docs/obsidian-developer/Reference/TypeScript API/Modal/contentEl.md new file mode 100644 index 0000000000000000000000000000000000000000..f45594525373982c36c86bb52797c12e3ee99629 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/contentEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Modal.contentEl.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`contentEl`](obsidian.Modal.contentEl.md) + +## Modal.contentEl property + + +**Signature:** + +```typescript +contentEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/modalEl.md b/docs/obsidian-developer/Reference/TypeScript API/Modal/modalEl.md new file mode 100644 index 0000000000000000000000000000000000000000..2d9a7ab7799b3fa34f28b2c26d52be9248999cb5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/modalEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Modal.modalEl.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`modalEl`](obsidian.Modal.modalEl.md) + +## Modal.modalEl property + + +**Signature:** + +```typescript +modalEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/onClose.md b/docs/obsidian-developer/Reference/TypeScript API/Modal/onClose.md new file mode 100644 index 0000000000000000000000000000000000000000..6ff4ae9cfd9d78ba409b6f39e745a4eacd4c8a09 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/onClose.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Modal.onClose.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`onClose`](obsidian.Modal.onClose.md) + +## Modal.onClose() method + + +**Signature:** + +```typescript +onClose(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/onOpen.md b/docs/obsidian-developer/Reference/TypeScript API/Modal/onOpen.md new file mode 100644 index 0000000000000000000000000000000000000000..aae9439be572a2f757880dd9b4d606db7bc7662e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/onOpen.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Modal.onOpen.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`onOpen`](obsidian.Modal.onOpen.md) + +## Modal.onOpen() method + + +**Signature:** + +```typescript +onOpen(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/open.md b/docs/obsidian-developer/Reference/TypeScript API/Modal/open.md new file mode 100644 index 0000000000000000000000000000000000000000..957f4b04b89508e81f8f4b306826d722a9544ed7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/open.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Modal.open.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`open`](obsidian.Modal.open.md) + +## Modal.open() method + + +**Signature:** + +```typescript +open(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/scope.md b/docs/obsidian-developer/Reference/TypeScript API/Modal/scope.md new file mode 100644 index 0000000000000000000000000000000000000000..405d8ac96bd3ea873a05c34798a71f9edf8d4a92 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/scope.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Modal.scope.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`scope`](obsidian.Modal.scope.md) + +## Modal.scope property + + +**Signature:** + +```typescript +scope: Scope; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/shouldRestoreSelection.md b/docs/obsidian-developer/Reference/TypeScript API/Modal/shouldRestoreSelection.md new file mode 100644 index 0000000000000000000000000000000000000000..e80b4f923fabdb18038e6c3ed8306dfcf12bba26 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/shouldRestoreSelection.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Modal.shouldRestoreSelection.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`shouldRestoreSelection`](obsidian.Modal.shouldRestoreSelection.md) + +## Modal.shouldRestoreSelection property + + +**Signature:** + +```typescript +shouldRestoreSelection: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modal/titleEl.md b/docs/obsidian-developer/Reference/TypeScript API/Modal/titleEl.md new file mode 100644 index 0000000000000000000000000000000000000000..1c1b9db7fea542e17c32591ffea4fe637365aa06 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modal/titleEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Modal.titleEl.md" +cssclasses: hide-title +--- + + + +[`Modal`](obsidian.Modal.md) › [`titleEl`](obsidian.Modal.titleEl.md) + +## Modal.titleEl property + + +**Signature:** + +```typescript +titleEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Modifier.md b/docs/obsidian-developer/Reference/TypeScript API/Modifier.md new file mode 100644 index 0000000000000000000000000000000000000000..2b2ab8c8a60ff20520eaafe9187ceeb47932f934 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Modifier.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Modifier.md" +cssclasses: hide-title +--- + + + +[`Modifier`](obsidian.Modifier.md) + +## Modifier type + +Mod = Cmd on MacOS and Ctrl on other OS Ctrl = Ctrl key for every OS Meta = Cmd on MacOS and Win key on other OS + +**Signature:** + +```typescript +export type Modifier = 'Mod' | 'Ctrl' | 'Meta' | 'Shift' | 'Alt'; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent.md b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..8c0197cdff284792931ef42d3a0bfeb2496393f6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent.md @@ -0,0 +1,35 @@ +--- +aliases: "obsidian.MomentFormatComponent.md" +cssclasses: hide-title +--- + + + +[`MomentFormatComponent`](obsidian.MomentFormatComponent.md) + +## MomentFormatComponent class + + +**Signature:** + +```typescript +export class MomentFormatComponent extends TextComponent +``` +**Extends:** [`TextComponent`](obsidian.TextComponent.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`sampleEl`](obsidian.MomentFormatComponent.sampleEl.md) | | HTMLElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`onChanged()`](obsidian.MomentFormatComponent.onChanged.md) | | | +| [`setDefaultFormat(defaultFormat)`](obsidian.MomentFormatComponent.setDefaultFormat.md) | | Sets the default format when input is cleared. Also used for placeholder. | +| [`setSampleEl(sampleEl)`](obsidian.MomentFormatComponent.setSampleEl.md) | | | +| [`setValue(value)`](obsidian.MomentFormatComponent.setValue.md) | | | +| [`updateSample()`](obsidian.MomentFormatComponent.updateSample.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/onChanged.md b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/onChanged.md new file mode 100644 index 0000000000000000000000000000000000000000..0d12c756aeea0cb2e0334abba228b463c4b6977c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/onChanged.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MomentFormatComponent.onChanged.md" +cssclasses: hide-title +--- + + + +[`MomentFormatComponent`](obsidian.MomentFormatComponent.md) › [`onChanged`](obsidian.MomentFormatComponent.onChanged.md) + +## MomentFormatComponent.onChanged() method + + +**Signature:** + +```typescript +onChanged(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/sampleEl.md b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/sampleEl.md new file mode 100644 index 0000000000000000000000000000000000000000..364cf650fa0797bf26378aa268d2613400e6226f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/sampleEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.MomentFormatComponent.sampleEl.md" +cssclasses: hide-title +--- + + + +[`MomentFormatComponent`](obsidian.MomentFormatComponent.md) › [`sampleEl`](obsidian.MomentFormatComponent.sampleEl.md) + +## MomentFormatComponent.sampleEl property + + +**Signature:** + +```typescript +sampleEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/setDefaultFormat.md b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/setDefaultFormat.md new file mode 100644 index 0000000000000000000000000000000000000000..f2bbc42e64e0b1128d533c4e97e552fd92e6c9ee --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/setDefaultFormat.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.MomentFormatComponent.setDefaultFormat.md" +cssclasses: hide-title +--- + + + +[`MomentFormatComponent`](obsidian.MomentFormatComponent.md) › [`setDefaultFormat`](obsidian.MomentFormatComponent.setDefaultFormat.md) + +## MomentFormatComponent.setDefaultFormat() method + +Sets the default format when input is cleared. Also used for placeholder. + +**Signature:** + +```typescript +setDefaultFormat(defaultFormat: string): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| defaultFormat | string | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/setSampleEl.md b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/setSampleEl.md new file mode 100644 index 0000000000000000000000000000000000000000..17e94ac1cd7838ea3abb4543ca4a7e906162f8f6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/setSampleEl.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MomentFormatComponent.setSampleEl.md" +cssclasses: hide-title +--- + + + +[`MomentFormatComponent`](obsidian.MomentFormatComponent.md) › [`setSampleEl`](obsidian.MomentFormatComponent.setSampleEl.md) + +## MomentFormatComponent.setSampleEl() method + + +**Signature:** + +```typescript +setSampleEl(sampleEl: HTMLElement): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| sampleEl | HTMLElement | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/setValue.md b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/setValue.md new file mode 100644 index 0000000000000000000000000000000000000000..0bd579c306ff328adcd6f67f764f784f62ff3f17 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/setValue.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.MomentFormatComponent.setValue.md" +cssclasses: hide-title +--- + + + +[`MomentFormatComponent`](obsidian.MomentFormatComponent.md) › [`setValue`](obsidian.MomentFormatComponent.setValue.md) + +## MomentFormatComponent.setValue() method + + +**Signature:** + +```typescript +setValue(value: string): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | string | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/updateSample.md b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/updateSample.md new file mode 100644 index 0000000000000000000000000000000000000000..48ca9a9ea8bc600a24fca62d0446c158910fbfea --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/MomentFormatComponent/updateSample.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.MomentFormatComponent.updateSample.md" +cssclasses: hide-title +--- + + + +[`MomentFormatComponent`](obsidian.MomentFormatComponent.md) › [`updateSample`](obsidian.MomentFormatComponent.updateSample.md) + +## MomentFormatComponent.updateSample() method + + +**Signature:** + +```typescript +updateSample(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Notice.md b/docs/obsidian-developer/Reference/TypeScript API/Notice.md new file mode 100644 index 0000000000000000000000000000000000000000..3698e98b8c036d9895ebb233069db323eaf1665d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Notice.md @@ -0,0 +1,38 @@ +--- +aliases: "obsidian.Notice.md" +cssclasses: hide-title +--- + + + +[`Notice`](obsidian.Notice.md) + +## Notice class + +Notification component. Use to present timely, high-value information. + +**Signature:** + +```typescript +export class Notice +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(message, duration)`](obsidian.Notice.(constructor).md) | | Constructs a new instance of the Notice class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`noticeEl`](obsidian.Notice.noticeEl.md) | | HTMLElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`hide()`](obsidian.Notice.hide.md) | | | +| [`setMessage(message)`](obsidian.Notice.setMessage.md) | | Change the message of this notice. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Notice/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/Notice/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..77f50ed743caae2469660544f4c49947f34e7721 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Notice/(constructor).md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.Notice.(constructor).md" +cssclasses: hide-title +--- + + + +[`Notice`](obsidian.Notice.md) › [`(constructor)`](obsidian.Notice.(constructor).md) + +## Notice.(constructor) + +Constructs a new instance of the `Notice` class + +**Signature:** + +```typescript +constructor(message: string | DocumentFragment, duration?: number); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| message | string | DocumentFragment | The message to be displayed, can either be a simple string or a | +| duration | number | _(Optional)_ Time in milliseconds to show the notice for. If this is 0, the Notice will stay visible until the user manually dismisses it. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Notice/hide.md b/docs/obsidian-developer/Reference/TypeScript API/Notice/hide.md new file mode 100644 index 0000000000000000000000000000000000000000..f087e7df280ed53e326e4dc739a11ae4761177a5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Notice/hide.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Notice.hide.md" +cssclasses: hide-title +--- + + + +[`Notice`](obsidian.Notice.md) › [`hide`](obsidian.Notice.hide.md) + +## Notice.hide() method + + +**Signature:** + +```typescript +hide(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Notice/noticeEl.md b/docs/obsidian-developer/Reference/TypeScript API/Notice/noticeEl.md new file mode 100644 index 0000000000000000000000000000000000000000..d542e86e702741efa0c9d580f3a4e1866a4ed9d3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Notice/noticeEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Notice.noticeEl.md" +cssclasses: hide-title +--- + + + +[`Notice`](obsidian.Notice.md) › [`noticeEl`](obsidian.Notice.noticeEl.md) + +## Notice.noticeEl property + + +**Signature:** + +```typescript +noticeEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Notice/setMessage.md b/docs/obsidian-developer/Reference/TypeScript API/Notice/setMessage.md new file mode 100644 index 0000000000000000000000000000000000000000..25901757d8dd5be661a5966e8a9d6b6259c45acf --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Notice/setMessage.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Notice.setMessage.md" +cssclasses: hide-title +--- + + + +[`Notice`](obsidian.Notice.md) › [`setMessage`](obsidian.Notice.setMessage.md) + +## Notice.setMessage() method + +Change the message of this notice. + +**Signature:** + +```typescript +setMessage(message: string | DocumentFragment): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| message | string | DocumentFragment | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ObsidianProtocolData.md b/docs/obsidian-developer/Reference/TypeScript API/ObsidianProtocolData.md new file mode 100644 index 0000000000000000000000000000000000000000..2015375ed03fd979191937c196569390537ac6ef --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ObsidianProtocolData.md @@ -0,0 +1,24 @@ +--- +aliases: "obsidian.ObsidianProtocolData.md" +cssclasses: hide-title +--- + + + +[`ObsidianProtocolData`](obsidian.ObsidianProtocolData.md) + +## ObsidianProtocolData interface + + +**Signature:** + +```typescript +export interface ObsidianProtocolData +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`action`](obsidian.ObsidianProtocolData.action.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ObsidianProtocolData/action.md b/docs/obsidian-developer/Reference/TypeScript API/ObsidianProtocolData/action.md new file mode 100644 index 0000000000000000000000000000000000000000..49290727ef3451076ea6837e6b42d9a67268c07c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ObsidianProtocolData/action.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ObsidianProtocolData.action.md" +cssclasses: hide-title +--- + + + +[`ObsidianProtocolData`](obsidian.ObsidianProtocolData.md) › [`action`](obsidian.ObsidianProtocolData.action.md) + +## ObsidianProtocolData.action property + + +**Signature:** + +```typescript +action: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ObsidianProtocolHandler.md b/docs/obsidian-developer/Reference/TypeScript API/ObsidianProtocolHandler.md new file mode 100644 index 0000000000000000000000000000000000000000..61c6426a69b1920e51b6680344ff6e4a859d25c6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ObsidianProtocolHandler.md @@ -0,0 +1,19 @@ +--- +aliases: "obsidian.ObsidianProtocolHandler.md" +cssclasses: hide-title +--- + + + +[`ObsidianProtocolHandler`](obsidian.ObsidianProtocolHandler.md) + +## ObsidianProtocolHandler type + + +**Signature:** + +```typescript +export type ObsidianProtocolHandler = (params: ObsidianProtocolData) => any; +``` +**References:** [`ObsidianProtocolData`](obsidian.ObsidianProtocolData.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/OpenViewState.md b/docs/obsidian-developer/Reference/TypeScript API/OpenViewState.md new file mode 100644 index 0000000000000000000000000000000000000000..e5f70f4dc768017802b810be4a9bd0da1a7b3cf7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/OpenViewState.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.OpenViewState.md" +cssclasses: hide-title +--- + + + +[`OpenViewState`](obsidian.OpenViewState.md) + +## OpenViewState interface + + +**Signature:** + +```typescript +export interface OpenViewState +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`active?`](obsidian.OpenViewState.active.md) | | boolean | _(Optional)_ | +| [`eState?`](obsidian.OpenViewState.eState.md) | | any | _(Optional)_ | +| [`group?`](obsidian.OpenViewState.group.md) | | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | _(Optional)_ | +| [`state?`](obsidian.OpenViewState.state.md) | | any | _(Optional)_ | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/active.md b/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/active.md new file mode 100644 index 0000000000000000000000000000000000000000..8b4c9082afed580e0d12aff160bc97e525ae1703 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/active.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.OpenViewState.active.md" +cssclasses: hide-title +--- + + + +[`OpenViewState`](obsidian.OpenViewState.md) › [`active`](obsidian.OpenViewState.active.md) + +## OpenViewState.active property + + +**Signature:** + +```typescript +active?: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/eState.md b/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/eState.md new file mode 100644 index 0000000000000000000000000000000000000000..baf5067ba61b9cd629c54a8f2093b7a135413b61 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/eState.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.OpenViewState.eState.md" +cssclasses: hide-title +--- + + + +[`OpenViewState`](obsidian.OpenViewState.md) › [`eState`](obsidian.OpenViewState.eState.md) + +## OpenViewState.eState property + + +**Signature:** + +```typescript +eState?: any; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/group.md b/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/group.md new file mode 100644 index 0000000000000000000000000000000000000000..4e63c2e392d676679219617cb9ec6ac4bbc9d1a7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/group.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.OpenViewState.group.md" +cssclasses: hide-title +--- + + + +[`OpenViewState`](obsidian.OpenViewState.md) › [`group`](obsidian.OpenViewState.group.md) + +## OpenViewState.group property + + +**Signature:** + +```typescript +group?: WorkspaceLeaf; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/state.md b/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/state.md new file mode 100644 index 0000000000000000000000000000000000000000..144979f0016ccac73243da599fc7e976509cae31 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/OpenViewState/state.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.OpenViewState.state.md" +cssclasses: hide-title +--- + + + +[`OpenViewState`](obsidian.OpenViewState.md) › [`state`](obsidian.OpenViewState.state.md) + +## OpenViewState.state property + + +**Signature:** + +```typescript +state?: any; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PaneType.md b/docs/obsidian-developer/Reference/TypeScript API/PaneType.md new file mode 100644 index 0000000000000000000000000000000000000000..c328a70e173d33212a8ce69fd946a1cf94250e3a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PaneType.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.PaneType.md" +cssclasses: hide-title +--- + + + +[`PaneType`](obsidian.PaneType.md) + +## PaneType type + + +**Signature:** + +```typescript +export type PaneType = 'tab' | 'split' | 'window'; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Platform.md b/docs/obsidian-developer/Reference/TypeScript API/Platform.md new file mode 100644 index 0000000000000000000000000000000000000000..4356731b4f35e1f3f93fff70f29d583a04ed23a9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Platform.md @@ -0,0 +1,32 @@ +--- +aliases: "obsidian.Platform.md" +cssclasses: hide-title +--- + + + +[`Platform`](obsidian.Platform.md) + +## Platform variable + + +**Signature:** + +```typescript +Platform: { + isDesktop: boolean; + isMobile: boolean; + isDesktopApp: boolean; + isMobileApp: boolean; + isIosApp: boolean; + isAndroidApp: boolean; + isPhone: boolean; + isTablet: boolean; + isMacOS: boolean; + isWin: boolean; + isLinux: boolean; + isSafari: boolean; + resourcePathPrefix: string; + +} +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin.md new file mode 100644 index 0000000000000000000000000000000000000000..41c16e0f51cf52ad43f688bd73244d88473f8b9b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin.md @@ -0,0 +1,52 @@ +--- +aliases: "obsidian.Plugin.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) + +## Plugin\_2 class + + +**Signature:** + +```typescript +export abstract class Plugin extends Component +``` +**Extends:** [`Component`](obsidian.Component.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(app, manifest)`](obsidian.Plugin.(constructor).md) | | Constructs a new instance of the Plugin class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`app`](obsidian.Plugin.app.md) | | [`App`](obsidian.App.md) | | +| [`manifest`](obsidian.Plugin.manifest.md) | | [`PluginManifest`](obsidian.PluginManifest.md) | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`addCommand(command)`](obsidian.Plugin.addCommand.md) | | Register a command globally. Registered commands will be available from the @{link https://help.obsidian.md/Plugins/Command+palette Command pallete}. The command id and name will be automatically prefixed with this plugin's id and name. | +| [`addRibbonIcon(icon, title, callback)`](obsidian.Plugin.addRibbonIcon.md) | | Adds a ribbon icon to the left bar. | +| [`addSettingTab(settingTab)`](obsidian.Plugin.addSettingTab.md) | | Register a settings tab, which allows users to change settings. | +| [`addStatusBarItem()`](obsidian.Plugin.addStatusBarItem.md) | | Adds a status bar item to the bottom of the app. Not available on mobile. | +| [`loadData()`](obsidian.Plugin.loadData.md) | | Load settings data from disk. Data is stored in data.json in the plugin folder. | +| [`registerCodeMirror(callback)`](obsidian.Plugin.registerCodeMirror.md) | | Runs callback on all currently loaded instances of CodeMirror, then registers the callback for all future CodeMirror instances. | +| [`registerEditorExtension(extension)`](obsidian.Plugin.registerEditorExtension.md) | | Registers a CodeMirror 6 extension. To reconfigure cm6 extensions for a plugin on the fly, an array should be passed in, and modified dynamically. Once this array is modified, calling [Workspace.updateOptions()](obsidian.Workspace.updateOptions.md) will apply the changes. | +| [`registerEditorSuggest(editorSuggest)`](obsidian.Plugin.registerEditorSuggest.md) | | Register an EditorSuggest which can provide live suggestions while the user is typing. | +| [`registerExtensions(extensions, viewType)`](obsidian.Plugin.registerExtensions.md) | | | +| [`registerHoverLinkSource(id, info)`](obsidian.Plugin.registerHoverLinkSource.md) | | Registers a view with the 'Page preview' core plugin as an emitter of the 'hover-link' on the event. | +| [`registerMarkdownCodeBlockProcessor(language, handler, sortOrder)`](obsidian.Plugin.registerMarkdownCodeBlockProcessor.md) | | Register a special post processor that handles fenced code given a language and a handler. This special post processor takes care of removing the
 and create a 
that will be passed to the handler, and is expected to be filled with custom elements. | +| [`registerMarkdownPostProcessor(postProcessor, sortOrder)`](obsidian.Plugin.registerMarkdownPostProcessor.md) | | Registers a post processor, to change how the document looks in reading mode. | +| [`registerObsidianProtocolHandler(action, handler)`](obsidian.Plugin.registerObsidianProtocolHandler.md) | | Register a handler for obsidian:// URLs. | +| [`registerView(type, viewCreator)`](obsidian.Plugin.registerView.md) | | | +| [`saveData(data)`](obsidian.Plugin.saveData.md) | | Write settings data to disk. Data is stored in data.json in the plugin folder. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..d9bbccaab23960268c01b0a3e1cdc9f34f4b23d2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/(constructor).md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.Plugin.(constructor).md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`(constructor)`](obsidian.Plugin.(constructor).md) + +## Plugin\_2.(constructor) + +Constructs a new instance of the `Plugin` class + +**Signature:** + +```typescript +constructor(app: App, manifest: PluginManifest); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| app | [`App`](obsidian.App.md) | | +| manifest | [`PluginManifest`](obsidian.PluginManifest.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/addCommand.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/addCommand.md new file mode 100644 index 0000000000000000000000000000000000000000..2d12a0efb4cd95b988e757060c5d8335f4bc5399 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/addCommand.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Plugin.addCommand.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`addCommand`](obsidian.Plugin.addCommand.md) + +## Plugin\_2.addCommand() method + +Register a command globally. Registered commands will be available from the @{link https://help.obsidian.md/Plugins/Command+palette Command pallete}. The command id and name will be automatically prefixed with this plugin's id and name. + +**Signature:** + +```typescript +addCommand(command: Command): Command; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| command | [`Command`](obsidian.Command.md) | | + +**Returns:** + +[`Command`](obsidian.Command.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/addRibbonIcon.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/addRibbonIcon.md new file mode 100644 index 0000000000000000000000000000000000000000..1860f44ab83e82f8d7cae05fe80deba64f2b9f3b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/addRibbonIcon.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Plugin.addRibbonIcon.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`addRibbonIcon`](obsidian.Plugin.addRibbonIcon.md) + +## Plugin\_2.addRibbonIcon() method + +Adds a ribbon icon to the left bar. + +**Signature:** + +```typescript +addRibbonIcon(icon: IconName, title: string, callback: (evt: MouseEvent) => any): HTMLElement; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| icon | [`IconName`](obsidian.IconName.md) | The icon name to be used. See [addIcon()](obsidian.addIcon.md) | +| title | string | The title to be displayed in the tooltip. | +| callback | (evt: MouseEvent) => any | The click callback. | + +**Returns:** + +`HTMLElement` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/addSettingTab.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/addSettingTab.md new file mode 100644 index 0000000000000000000000000000000000000000..d0c0658bf2420af75fb1ae735104a5d53dbcdedd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/addSettingTab.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Plugin.addSettingTab.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`addSettingTab`](obsidian.Plugin.addSettingTab.md) + +## Plugin\_2.addSettingTab() method + +Register a settings tab, which allows users to change settings. + +**Signature:** + +```typescript +addSettingTab(settingTab: PluginSettingTab): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| settingTab | [`PluginSettingTab`](obsidian.PluginSettingTab.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/addStatusBarItem.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/addStatusBarItem.md new file mode 100644 index 0000000000000000000000000000000000000000..c33f14481e6d4ab305f8cf11c870bb70626f7d77 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/addStatusBarItem.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Plugin.addStatusBarItem.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`addStatusBarItem`](obsidian.Plugin.addStatusBarItem.md) + +## Plugin\_2.addStatusBarItem() method + +Adds a status bar item to the bottom of the app. Not available on mobile. + +**Signature:** + +```typescript +addStatusBarItem(): HTMLElement; +``` +**Returns:** + +`HTMLElement` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/app.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/app.md new file mode 100644 index 0000000000000000000000000000000000000000..a374eae0aaa76ab3c969212464ba49c0d016b0a6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/app.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Plugin.app.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`app`](obsidian.Plugin.app.md) + +## Plugin\_2.app property + + +**Signature:** + +```typescript +app: App; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/loadData.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/loadData.md new file mode 100644 index 0000000000000000000000000000000000000000..cc24b0f2db658ab6fb0d47e4b3e5d1ffb132e8e8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/loadData.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Plugin.loadData.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`loadData`](obsidian.Plugin.loadData.md) + +## Plugin\_2.loadData() method + +Load settings data from disk. Data is stored in `data.json` in the plugin folder. + +**Signature:** + +```typescript +loadData(): Promise; +``` +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/manifest.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/manifest.md new file mode 100644 index 0000000000000000000000000000000000000000..c5ead5c5f2fe7b43368318954b19a2e5eb700432 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/manifest.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Plugin.manifest.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`manifest`](obsidian.Plugin.manifest.md) + +## Plugin\_2.manifest property + + +**Signature:** + +```typescript +manifest: PluginManifest; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerCodeMirror.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerCodeMirror.md new file mode 100644 index 0000000000000000000000000000000000000000..57da1d08c4ee75f67e693fb4dda89b03d59faf29 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerCodeMirror.md @@ -0,0 +1,34 @@ +--- +aliases: "obsidian.Plugin.registerCodeMirror.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`registerCodeMirror`](obsidian.Plugin.registerCodeMirror.md) + +## Plugin\_2.registerCodeMirror() method + +> Warning: This API is now obsolete. +> +> - This is only used with the legacy editor, which is no longer maintained, and will be removed in a future update. +> + +Runs callback on all currently loaded instances of CodeMirror, then registers the callback for all future CodeMirror instances. + +**Signature:** + +```typescript +registerCodeMirror(callback: (cm: CodeMirror.Editor) => any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (cm: CodeMirror.Editor) => any | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerEditorExtension.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerEditorExtension.md new file mode 100644 index 0000000000000000000000000000000000000000..cf45b5eee9d31c3896d6a82b428f50f262d10eed --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerEditorExtension.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Plugin.registerEditorExtension.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`registerEditorExtension`](obsidian.Plugin.registerEditorExtension.md) + +## Plugin\_2.registerEditorExtension() method + +Registers a CodeMirror 6 extension. To reconfigure cm6 extensions for a plugin on the fly, an array should be passed in, and modified dynamically. Once this array is modified, calling [Workspace.updateOptions()](obsidian.Workspace.updateOptions.md) will apply the changes. + +**Signature:** + +```typescript +registerEditorExtension(extension: Extension): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| extension | Extension | must be a CodeMirror 6 Extension, or an array of Extensions. | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerEditorSuggest.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerEditorSuggest.md new file mode 100644 index 0000000000000000000000000000000000000000..2b6db3a824ee83db711e30bc334b099793131cee --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerEditorSuggest.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Plugin.registerEditorSuggest.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`registerEditorSuggest`](obsidian.Plugin.registerEditorSuggest.md) + +## Plugin\_2.registerEditorSuggest() method + +Register an EditorSuggest which can provide live suggestions while the user is typing. + +**Signature:** + +```typescript +registerEditorSuggest(editorSuggest: EditorSuggest): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| editorSuggest | [`EditorSuggest`](obsidian.EditorSuggest.md)<any> | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerExtensions.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerExtensions.md new file mode 100644 index 0000000000000000000000000000000000000000..c4e7dccbc9c8653173b33bd29b88a34f7b0dabe7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerExtensions.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Plugin.registerExtensions.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`registerExtensions`](obsidian.Plugin.registerExtensions.md) + +## Plugin\_2.registerExtensions() method + + +**Signature:** + +```typescript +registerExtensions(extensions: string[], viewType: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| extensions | string[] | | +| viewType | string | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerHoverLinkSource.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerHoverLinkSource.md new file mode 100644 index 0000000000000000000000000000000000000000..7b3be47a6242eb726f790b11ce954d9f99c8d0a6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerHoverLinkSource.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Plugin.registerHoverLinkSource.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`registerHoverLinkSource`](obsidian.Plugin.registerHoverLinkSource.md) + +## Plugin\_2.registerHoverLinkSource() method + +Registers a view with the 'Page preview' core plugin as an emitter of the 'hover-link' on the event. + +**Signature:** + +```typescript +registerHoverLinkSource(id: string, info: HoverLinkSource): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| id | string | | +| info | [`HoverLinkSource`](obsidian.HoverLinkSource.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerMarkdownCodeBlockProcessor.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerMarkdownCodeBlockProcessor.md new file mode 100644 index 0000000000000000000000000000000000000000..76320368075b73f05451e4e0dce490e1592ffe4e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerMarkdownCodeBlockProcessor.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Plugin.registerMarkdownCodeBlockProcessor.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`registerMarkdownCodeBlockProcessor`](obsidian.Plugin.registerMarkdownCodeBlockProcessor.md) + +## Plugin\_2.registerMarkdownCodeBlockProcessor() method + +Register a special post processor that handles fenced code given a language and a handler. This special post processor takes care of removing the
 and create a 
that will be passed to the handler, and is expected to be filled with custom elements. + +**Signature:** + +```typescript +registerMarkdownCodeBlockProcessor(language: string, handler: (source: string, el: HTMLElement, ctx: MarkdownPostProcessorContext) => Promise | void, sortOrder?: number): MarkdownPostProcessor; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| language | string | | +| handler | (source: string, el: HTMLElement, ctx: [`MarkdownPostProcessorContext`](obsidian.MarkdownPostProcessorContext.md)) => Promise<any> | void | | +| sortOrder | number | _(Optional)_ | + +**Returns:** + +[`MarkdownPostProcessor`](obsidian.MarkdownPostProcessor.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerMarkdownPostProcessor.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerMarkdownPostProcessor.md new file mode 100644 index 0000000000000000000000000000000000000000..aa40db2ca02e4472be767a9a34631bcb49125b60 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerMarkdownPostProcessor.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Plugin.registerMarkdownPostProcessor.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`registerMarkdownPostProcessor`](obsidian.Plugin.registerMarkdownPostProcessor.md) + +## Plugin\_2.registerMarkdownPostProcessor() method + +Registers a post processor, to change how the document looks in reading mode. + +**Signature:** + +```typescript +registerMarkdownPostProcessor(postProcessor: MarkdownPostProcessor, sortOrder?: number): MarkdownPostProcessor; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| postProcessor | [`MarkdownPostProcessor`](obsidian.MarkdownPostProcessor.md) | | +| sortOrder | number | _(Optional)_ | + +**Returns:** + +[`MarkdownPostProcessor`](obsidian.MarkdownPostProcessor.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerObsidianProtocolHandler.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerObsidianProtocolHandler.md new file mode 100644 index 0000000000000000000000000000000000000000..fc3ffd8e051e87731274f369efb44fd07c96d623 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerObsidianProtocolHandler.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Plugin.registerObsidianProtocolHandler.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`registerObsidianProtocolHandler`](obsidian.Plugin.registerObsidianProtocolHandler.md) + +## Plugin\_2.registerObsidianProtocolHandler() method + +Register a handler for obsidian:// URLs. + +**Signature:** + +```typescript +registerObsidianProtocolHandler(action: string, handler: ObsidianProtocolHandler): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| action | string | the action string. For example, "open" corresponds to obsidian://open. | +| handler | [`ObsidianProtocolHandler`](obsidian.ObsidianProtocolHandler.md) | the callback to trigger. A key-value pair that is decoded from the query will be passed in. For example, obsidian://open?key=value would generate {"action": "open", "key": "value"}. | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerView.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerView.md new file mode 100644 index 0000000000000000000000000000000000000000..582f88a360dad421d09dd7c77e265c437857e194 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/registerView.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Plugin.registerView.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`registerView`](obsidian.Plugin.registerView.md) + +## Plugin\_2.registerView() method + + +**Signature:** + +```typescript +registerView(type: string, viewCreator: ViewCreator): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| type | string | | +| viewCreator | [`ViewCreator`](obsidian.ViewCreator.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Plugin/saveData.md b/docs/obsidian-developer/Reference/TypeScript API/Plugin/saveData.md new file mode 100644 index 0000000000000000000000000000000000000000..0ad7307c612578174d23f22f34750bba9334a5af --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Plugin/saveData.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Plugin.saveData.md" +cssclasses: hide-title +--- + + + +[`Plugin\_2`](obsidian.Plugin.md) › [`saveData`](obsidian.Plugin.saveData.md) + +## Plugin\_2.saveData() method + +Write settings data to disk. Data is stored in `data.json` in the plugin folder. + +**Signature:** + +```typescript +saveData(data: any): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| data | any | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginManifest.md b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest.md new file mode 100644 index 0000000000000000000000000000000000000000..0f2260adde521543e9ed6a1ce309a09552b4452c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.PluginManifest.md" +cssclasses: hide-title +--- + + + +[`PluginManifest`](obsidian.PluginManifest.md) + +## PluginManifest interface + +Metadata about a Community plugin. + +**Signature:** + +```typescript +export interface PluginManifest +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`author`](obsidian.PluginManifest.author.md) | | string | The author's name. | +| [`authorUrl?`](obsidian.PluginManifest.authorUrl.md) | | string | _(Optional)_ A URL to the author's website. | +| [`description`](obsidian.PluginManifest.description.md) | | string | A description of the plugin. | +| [`dir?`](obsidian.PluginManifest.dir.md) | | string | _(Optional)_ Vault path to the plugin folder in the config directory. | +| [`id`](obsidian.PluginManifest.id.md) | | string | The plugin ID. | +| [`isDesktopOnly?`](obsidian.PluginManifest.isDesktopOnly.md) | | boolean | _(Optional)_ Whether the plugin can be used only on desktop. | +| [`minAppVersion`](obsidian.PluginManifest.minAppVersion.md) | | string | The minimum required Obsidian version to run this plugin. | +| [`name`](obsidian.PluginManifest.name.md) | | string | The display name. | +| [`version`](obsidian.PluginManifest.version.md) | | string | The current version, using . | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/author.md b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/author.md new file mode 100644 index 0000000000000000000000000000000000000000..b32a13c8c7ac00416834ab3a296c640db9e7dce0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/author.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.PluginManifest.author.md" +cssclasses: hide-title +--- + + + +[`PluginManifest`](obsidian.PluginManifest.md) › [`author`](obsidian.PluginManifest.author.md) + +## PluginManifest.author property + +The author's name. + +**Signature:** + +```typescript +author: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/authorUrl.md b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/authorUrl.md new file mode 100644 index 0000000000000000000000000000000000000000..5623178af39bffd1db8bc2816d5e96d07c030741 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/authorUrl.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.PluginManifest.authorUrl.md" +cssclasses: hide-title +--- + + + +[`PluginManifest`](obsidian.PluginManifest.md) › [`authorUrl`](obsidian.PluginManifest.authorUrl.md) + +## PluginManifest.authorUrl property + +A URL to the author's website. + +**Signature:** + +```typescript +authorUrl?: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/description.md b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/description.md new file mode 100644 index 0000000000000000000000000000000000000000..81fc81655375db7abad87c82d6ef666111abd4b0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/description.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.PluginManifest.description.md" +cssclasses: hide-title +--- + + + +[`PluginManifest`](obsidian.PluginManifest.md) › [`description`](obsidian.PluginManifest.description.md) + +## PluginManifest.description property + +A description of the plugin. + +**Signature:** + +```typescript +description: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/dir.md b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/dir.md new file mode 100644 index 0000000000000000000000000000000000000000..59176032e7d908733323ed41ad3088d610d20073 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/dir.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.PluginManifest.dir.md" +cssclasses: hide-title +--- + + + +[`PluginManifest`](obsidian.PluginManifest.md) › [`dir`](obsidian.PluginManifest.dir.md) + +## PluginManifest.dir property + +Vault path to the plugin folder in the config directory. + +**Signature:** + +```typescript +dir?: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/id.md b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/id.md new file mode 100644 index 0000000000000000000000000000000000000000..8222e188ed0128d22dc1d85c4ebd04ba4e7e7457 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/id.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.PluginManifest.id.md" +cssclasses: hide-title +--- + + + +[`PluginManifest`](obsidian.PluginManifest.md) › [`id`](obsidian.PluginManifest.id.md) + +## PluginManifest.id property + +The plugin ID. + +**Signature:** + +```typescript +id: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/isDesktopOnly.md b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/isDesktopOnly.md new file mode 100644 index 0000000000000000000000000000000000000000..9b323e22f8264c8e6e7dacab94e9cf97984cba55 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/isDesktopOnly.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.PluginManifest.isDesktopOnly.md" +cssclasses: hide-title +--- + + + +[`PluginManifest`](obsidian.PluginManifest.md) › [`isDesktopOnly`](obsidian.PluginManifest.isDesktopOnly.md) + +## PluginManifest.isDesktopOnly property + +Whether the plugin can be used only on desktop. + +**Signature:** + +```typescript +isDesktopOnly?: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/minAppVersion.md b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/minAppVersion.md new file mode 100644 index 0000000000000000000000000000000000000000..e8251a9cf612b152cd15b8dde41aba050fda6060 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/minAppVersion.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.PluginManifest.minAppVersion.md" +cssclasses: hide-title +--- + + + +[`PluginManifest`](obsidian.PluginManifest.md) › [`minAppVersion`](obsidian.PluginManifest.minAppVersion.md) + +## PluginManifest.minAppVersion property + +The minimum required Obsidian version to run this plugin. + +**Signature:** + +```typescript +minAppVersion: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/name.md b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/name.md new file mode 100644 index 0000000000000000000000000000000000000000..dacb29fa295ec73a196c755c22dec85994fbcb0c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/name.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.PluginManifest.name.md" +cssclasses: hide-title +--- + + + +[`PluginManifest`](obsidian.PluginManifest.md) › [`name`](obsidian.PluginManifest.name.md) + +## PluginManifest.name property + +The display name. + +**Signature:** + +```typescript +name: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/version.md b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/version.md new file mode 100644 index 0000000000000000000000000000000000000000..24228e0632d1791a615e7c513ca1aa3d93d364b2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginManifest/version.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.PluginManifest.version.md" +cssclasses: hide-title +--- + + + +[`PluginManifest`](obsidian.PluginManifest.md) › [`version`](obsidian.PluginManifest.version.md) + +## PluginManifest.version property + +The current version, using . + +**Signature:** + +```typescript +version: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginSettingTab.md b/docs/obsidian-developer/Reference/TypeScript API/PluginSettingTab.md new file mode 100644 index 0000000000000000000000000000000000000000..e57b4cbce88dd86b4a67f90720735a2932221ba5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginSettingTab.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.PluginSettingTab.md" +cssclasses: hide-title +--- + + + +[`PluginSettingTab`](obsidian.PluginSettingTab.md) + +## PluginSettingTab class + +Provides a unified interface for users to configure the plugin. + +**Signature:** + +```typescript +export abstract class PluginSettingTab extends SettingTab +``` +**Extends:** [`SettingTab`](obsidian.SettingTab.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(app, plugin)`](obsidian.PluginSettingTab.(constructor).md) | | Constructs a new instance of the PluginSettingTab class | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/PluginSettingTab/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/PluginSettingTab/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..d01644e2b3d1e4797815c3f8ff920fcdd8a05d7e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PluginSettingTab/(constructor).md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.PluginSettingTab.(constructor).md" +cssclasses: hide-title +--- + + + +[`PluginSettingTab`](obsidian.PluginSettingTab.md) › [`(constructor)`](obsidian.PluginSettingTab.(constructor).md) + +## PluginSettingTab.(constructor) + +Constructs a new instance of the `PluginSettingTab` class + +**Signature:** + +```typescript +constructor(app: App, plugin: Plugin); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| app | [`App`](obsidian.App.md) | | +| plugin | [`Plugin`](obsidian.Plugin.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Point.md b/docs/obsidian-developer/Reference/TypeScript API/Point.md new file mode 100644 index 0000000000000000000000000000000000000000..4d4c98d167f199a8d3a3ca061d43f970bd40424e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Point.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.Point.md" +cssclasses: hide-title +--- + + + +[`Point`](obsidian.Point.md) + +## Point interface + + +**Signature:** + +```typescript +export interface Point +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`x`](obsidian.Point.x.md) | | number | | +| [`y`](obsidian.Point.y.md) | | number | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Point/x.md b/docs/obsidian-developer/Reference/TypeScript API/Point/x.md new file mode 100644 index 0000000000000000000000000000000000000000..a62619ec22473ef7956b54022a3dd3c50dcc9c72 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Point/x.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Point.x.md" +cssclasses: hide-title +--- + + + +[`Point`](obsidian.Point.md) › [`x`](obsidian.Point.x.md) + +## Point.x property + + +**Signature:** + +```typescript +x: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Point/y.md b/docs/obsidian-developer/Reference/TypeScript API/Point/y.md new file mode 100644 index 0000000000000000000000000000000000000000..994f1801e83034bd7bf47dd1f7d8e1657f105efa --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Point/y.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Point.y.md" +cssclasses: hide-title +--- + + + +[`Point`](obsidian.Point.md) › [`y`](obsidian.Point.y.md) + +## Point.y property + + +**Signature:** + +```typescript +y: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PopoverState.md b/docs/obsidian-developer/Reference/TypeScript API/PopoverState.md new file mode 100644 index 0000000000000000000000000000000000000000..ca20c0c45874821b2e9cde8d94e09239ee6f8d8d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PopoverState.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.PopoverState.md" +cssclasses: hide-title +--- + + + +[`PopoverState`](obsidian.PopoverState.md) + +## PopoverState enum + + +**Signature:** + +```typescript +export enum PopoverState +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest.md b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest.md new file mode 100644 index 0000000000000000000000000000000000000000..085c37b0f0452f1471f86788ddbcbde124252ed9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest.md @@ -0,0 +1,42 @@ +--- +aliases: "obsidian.PopoverSuggest.md" +cssclasses: hide-title +--- + + + +[`PopoverSuggest`](obsidian.PopoverSuggest.md) + +## PopoverSuggest class + +Base class for adding a type-ahead popover. + +**Signature:** + +```typescript +export abstract class PopoverSuggest implements ISuggestOwner, CloseableComponent +``` +**Implements:** [`ISuggestOwner`](obsidian.ISuggestOwner.md)``, [`CloseableComponent`](obsidian.CloseableComponent.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(app, scope)`](obsidian.PopoverSuggest.(constructor).md) | | Constructs a new instance of the PopoverSuggest class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`app`](obsidian.PopoverSuggest.app.md) | | [`App`](obsidian.App.md) | | +| [`scope`](obsidian.PopoverSuggest.scope.md) | | [`Scope`](obsidian.Scope.md) | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`close()`](obsidian.PopoverSuggest.close.md) | | | +| [`open()`](obsidian.PopoverSuggest.open.md) | | | +| [`renderSuggestion(value, el)`](obsidian.PopoverSuggest.renderSuggestion.md) | abstract | | +| [`selectSuggestion(value, evt)`](obsidian.PopoverSuggest.selectSuggestion.md) | abstract | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..93578a81988b2a33f8db885d95cc918cc12b23f5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/(constructor).md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.PopoverSuggest.(constructor).md" +cssclasses: hide-title +--- + + + +[`PopoverSuggest`](obsidian.PopoverSuggest.md) › [`(constructor)`](obsidian.PopoverSuggest.(constructor).md) + +## PopoverSuggest.(constructor) + +Constructs a new instance of the `PopoverSuggest` class + +**Signature:** + +```typescript +constructor(app: App, scope?: Scope); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| app | [`App`](obsidian.App.md) | | +| scope | [`Scope`](obsidian.Scope.md) | _(Optional)_ | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/app.md b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/app.md new file mode 100644 index 0000000000000000000000000000000000000000..9a5e2b303db50d8c451ee17eb6b11cbc76f62287 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/app.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.PopoverSuggest.app.md" +cssclasses: hide-title +--- + + + +[`PopoverSuggest`](obsidian.PopoverSuggest.md) › [`app`](obsidian.PopoverSuggest.app.md) + +## PopoverSuggest.app property + + +**Signature:** + +```typescript +app: App; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/close.md b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/close.md new file mode 100644 index 0000000000000000000000000000000000000000..ac0c9929b66f1f80d2d6ee573f4d8854a7b041d8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/close.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.PopoverSuggest.close.md" +cssclasses: hide-title +--- + + + +[`PopoverSuggest`](obsidian.PopoverSuggest.md) › [`close`](obsidian.PopoverSuggest.close.md) + +## PopoverSuggest.close() method + + +**Signature:** + +```typescript +close(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/open.md b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/open.md new file mode 100644 index 0000000000000000000000000000000000000000..e67d7e376f5949080d2f04f3a9b0b44a891e0db8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/open.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.PopoverSuggest.open.md" +cssclasses: hide-title +--- + + + +[`PopoverSuggest`](obsidian.PopoverSuggest.md) › [`open`](obsidian.PopoverSuggest.open.md) + +## PopoverSuggest.open() method + + +**Signature:** + +```typescript +open(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/renderSuggestion.md b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/renderSuggestion.md new file mode 100644 index 0000000000000000000000000000000000000000..aefe0c96992a35a32d826d9f017b52e62609dd98 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/renderSuggestion.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.PopoverSuggest.renderSuggestion.md" +cssclasses: hide-title +--- + + + +[`PopoverSuggest`](obsidian.PopoverSuggest.md) › [`renderSuggestion`](obsidian.PopoverSuggest.renderSuggestion.md) + +## PopoverSuggest.renderSuggestion() method + + +**Signature:** + +```typescript +abstract renderSuggestion(value: T, el: HTMLElement): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | T | | +| el | HTMLElement | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/scope.md b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/scope.md new file mode 100644 index 0000000000000000000000000000000000000000..9e9162eddad2e95e5afc69aecb769b4e14905d55 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/scope.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.PopoverSuggest.scope.md" +cssclasses: hide-title +--- + + + +[`PopoverSuggest`](obsidian.PopoverSuggest.md) › [`scope`](obsidian.PopoverSuggest.scope.md) + +## PopoverSuggest.scope property + + +**Signature:** + +```typescript +scope: Scope; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/selectSuggestion.md b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/selectSuggestion.md new file mode 100644 index 0000000000000000000000000000000000000000..e96afb86d611e91be38602ea54d4817c1e47ba9f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PopoverSuggest/selectSuggestion.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.PopoverSuggest.selectSuggestion.md" +cssclasses: hide-title +--- + + + +[`PopoverSuggest`](obsidian.PopoverSuggest.md) › [`selectSuggestion`](obsidian.PopoverSuggest.selectSuggestion.md) + +## PopoverSuggest.selectSuggestion() method + + +**Signature:** + +```typescript +abstract selectSuggestion(value: T, evt: MouseEvent | KeyboardEvent): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | T | | +| evt | MouseEvent | KeyboardEvent | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Pos.md b/docs/obsidian-developer/Reference/TypeScript API/Pos.md new file mode 100644 index 0000000000000000000000000000000000000000..2fd44fe64b6b952990dd15acdb8fd199e5dfe4dd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Pos.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.Pos.md" +cssclasses: hide-title +--- + + + +[`Pos`](obsidian.Pos.md) + +## Pos interface + + +**Signature:** + +```typescript +export interface Pos +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`end`](obsidian.Pos.end.md) | | [`Loc`](obsidian.Loc.md) | | +| [`start`](obsidian.Pos.start.md) | | [`Loc`](obsidian.Loc.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Pos/end.md b/docs/obsidian-developer/Reference/TypeScript API/Pos/end.md new file mode 100644 index 0000000000000000000000000000000000000000..b69e0a60ef2faa633b9f6add28344b12e2b4f56f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Pos/end.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Pos.end.md" +cssclasses: hide-title +--- + + + +[`Pos`](obsidian.Pos.md) › [`end`](obsidian.Pos.end.md) + +## Pos.end property + + +**Signature:** + +```typescript +end: Loc; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Pos/start.md b/docs/obsidian-developer/Reference/TypeScript API/Pos/start.md new file mode 100644 index 0000000000000000000000000000000000000000..250a77fb90c997d5c3c6fb4af28983df98309ade --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Pos/start.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Pos.start.md" +cssclasses: hide-title +--- + + + +[`Pos`](obsidian.Pos.md) › [`start`](obsidian.Pos.start.md) + +## Pos.start property + + +**Signature:** + +```typescript +start: Loc; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery.md b/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery.md new file mode 100644 index 0000000000000000000000000000000000000000..a44e800f0be61afacb120279e8bab03c75d4a723 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.PreparedQuery.md" +cssclasses: hide-title +--- + + + +[`PreparedQuery`](obsidian.PreparedQuery.md) + +## PreparedQuery interface + + +**Signature:** + +```typescript +export interface PreparedQuery +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`fuzzy`](obsidian.PreparedQuery.fuzzy.md) | | string[] | | +| [`query`](obsidian.PreparedQuery.query.md) | | string | | +| [`tokens`](obsidian.PreparedQuery.tokens.md) | | string[] | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery/fuzzy.md b/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery/fuzzy.md new file mode 100644 index 0000000000000000000000000000000000000000..f68141a15c0496ec9ab742651ccb5c7af8c59a3d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery/fuzzy.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.PreparedQuery.fuzzy.md" +cssclasses: hide-title +--- + + + +[`PreparedQuery`](obsidian.PreparedQuery.md) › [`fuzzy`](obsidian.PreparedQuery.fuzzy.md) + +## PreparedQuery.fuzzy property + + +**Signature:** + +```typescript +fuzzy: string[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery/query.md b/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery/query.md new file mode 100644 index 0000000000000000000000000000000000000000..c590590efa98603b77473578a4105afaba554193 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery/query.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.PreparedQuery.query.md" +cssclasses: hide-title +--- + + + +[`PreparedQuery`](obsidian.PreparedQuery.md) › [`query`](obsidian.PreparedQuery.query.md) + +## PreparedQuery.query property + + +**Signature:** + +```typescript +query: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery/tokens.md b/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery/tokens.md new file mode 100644 index 0000000000000000000000000000000000000000..c1ad0207e93a06ca97efb138f2cca06952b665ee --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/PreparedQuery/tokens.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.PreparedQuery.tokens.md" +cssclasses: hide-title +--- + + + +[`PreparedQuery`](obsidian.PreparedQuery.md) › [`tokens`](obsidian.PreparedQuery.tokens.md) + +## PreparedQuery.tokens property + + +**Signature:** + +```typescript +tokens: string[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent.md b/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..7e3a5a1a6188066551698f5aac0e18c2ebff962f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent.md @@ -0,0 +1,32 @@ +--- +aliases: "obsidian.ProgressBarComponent.md" +cssclasses: hide-title +--- + + + +[`ProgressBarComponent`](obsidian.ProgressBarComponent.md) + +## ProgressBarComponent class + + +**Signature:** + +```typescript +export class ProgressBarComponent extends ValueComponent +``` +**Extends:** [`ValueComponent`](obsidian.ValueComponent.md)`` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.ProgressBarComponent.(constructor).md) | | Constructs a new instance of the ProgressBarComponent class | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getValue()`](obsidian.ProgressBarComponent.getValue.md) | | | +| [`setValue(value)`](obsidian.ProgressBarComponent.setValue.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..d9c12ea65465137250b4803bd4ebf1ba5eb8e631 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.ProgressBarComponent.(constructor).md" +cssclasses: hide-title +--- + + + +[`ProgressBarComponent`](obsidian.ProgressBarComponent.md) › [`(constructor)`](obsidian.ProgressBarComponent.(constructor).md) + +## ProgressBarComponent.(constructor) + +Constructs a new instance of the `ProgressBarComponent` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent/getValue.md b/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent/getValue.md new file mode 100644 index 0000000000000000000000000000000000000000..aed59173ca02e55aa7a1b8cb21b0faf848b668de --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent/getValue.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.ProgressBarComponent.getValue.md" +cssclasses: hide-title +--- + + + +[`ProgressBarComponent`](obsidian.ProgressBarComponent.md) › [`getValue`](obsidian.ProgressBarComponent.getValue.md) + +## ProgressBarComponent.getValue() method + + +**Signature:** + +```typescript +getValue(): number; +``` +**Returns:** + +`number` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent/setValue.md b/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent/setValue.md new file mode 100644 index 0000000000000000000000000000000000000000..390cb7af6cb470e23fc480db5980427e2209c993 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ProgressBarComponent/setValue.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.ProgressBarComponent.setValue.md" +cssclasses: hide-title +--- + + + +[`ProgressBarComponent`](obsidian.ProgressBarComponent.md) › [`setValue`](obsidian.ProgressBarComponent.setValue.md) + +## ProgressBarComponent.setValue() method + +**Signature:** + +```typescript +setValue(value: number): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | number | The progress amount, a value between 0-100. | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/RGB.md b/docs/obsidian-developer/Reference/TypeScript API/RGB.md new file mode 100644 index 0000000000000000000000000000000000000000..8d233238bd98e994087cd0f3439ada39e83cd55f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RGB.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.RGB.md" +cssclasses: hide-title +--- + + + +[`RGB`](obsidian.RGB.md) + +## RGB interface + + +**Signature:** + +```typescript +export interface RGB +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`b`](obsidian.RGB.b.md) | | number | Blue integer value between 0 and 255 | +| [`g`](obsidian.RGB.g.md) | | number | Green integer value between 0 and 255 | +| [`r`](obsidian.RGB.r.md) | | number | Red integer value between 0 and 255 | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/RGB/b.md b/docs/obsidian-developer/Reference/TypeScript API/RGB/b.md new file mode 100644 index 0000000000000000000000000000000000000000..95decd6080e745331d300ba3e9e6d2ed2facf261 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RGB/b.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.RGB.b.md" +cssclasses: hide-title +--- + + + +[`RGB`](obsidian.RGB.md) › [`b`](obsidian.RGB.b.md) + +## RGB.b property + +Blue integer value between 0 and 255 + +**Signature:** + +```typescript +b: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RGB/g.md b/docs/obsidian-developer/Reference/TypeScript API/RGB/g.md new file mode 100644 index 0000000000000000000000000000000000000000..6ff8280c727edcb9aed24fef43f0815e2eccb7d6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RGB/g.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.RGB.g.md" +cssclasses: hide-title +--- + + + +[`RGB`](obsidian.RGB.md) › [`g`](obsidian.RGB.g.md) + +## RGB.g property + +Green integer value between 0 and 255 + +**Signature:** + +```typescript +g: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RGB/r.md b/docs/obsidian-developer/Reference/TypeScript API/RGB/r.md new file mode 100644 index 0000000000000000000000000000000000000000..ae4441d11c5bb98f43d28605f45fd33c6eda1dc9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RGB/r.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.RGB.r.md" +cssclasses: hide-title +--- + + + +[`RGB`](obsidian.RGB.md) › [`r`](obsidian.RGB.r.md) + +## RGB.r property + +Red integer value between 0 and 255 + +**Signature:** + +```typescript +r: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Reference.md b/docs/obsidian-developer/Reference/TypeScript API/Reference.md new file mode 100644 index 0000000000000000000000000000000000000000..d4af2b0c0e47dc0b726b81869979d7ad9ec289ab --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Reference.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.Reference.md" +cssclasses: hide-title +--- + + + +[`Reference`](obsidian.Reference.md) + +## Reference interface + + +**Signature:** + +```typescript +export interface Reference +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`displayText?`](obsidian.Reference.displayText.md) | | string | _(Optional)_ if title is different than link text, in the case of \[\[page name\|display name\]\] | +| [`link`](obsidian.Reference.link.md) | | string | | +| [`original`](obsidian.Reference.original.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Reference/displayText.md b/docs/obsidian-developer/Reference/TypeScript API/Reference/displayText.md new file mode 100644 index 0000000000000000000000000000000000000000..b0642e8d01ad6da0f95a8e3e2ec6354f80ec0c97 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Reference/displayText.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Reference.displayText.md" +cssclasses: hide-title +--- + + + +[`Reference`](obsidian.Reference.md) › [`displayText`](obsidian.Reference.displayText.md) + +## Reference.displayText property + +if title is different than link text, in the case of \[\[page name\|display name\]\] + +**Signature:** + +```typescript +displayText?: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Reference/link.md b/docs/obsidian-developer/Reference/TypeScript API/Reference/link.md new file mode 100644 index 0000000000000000000000000000000000000000..431a6f2399aeb34180bcc29ed22e885370abbb67 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Reference/link.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Reference.link.md" +cssclasses: hide-title +--- + + + +[`Reference`](obsidian.Reference.md) › [`link`](obsidian.Reference.link.md) + +## Reference.link property + + +**Signature:** + +```typescript +link: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Reference/original.md b/docs/obsidian-developer/Reference/TypeScript API/Reference/original.md new file mode 100644 index 0000000000000000000000000000000000000000..845e24ef59ac7bac1b0e637d8e047ef7df1fb4d3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Reference/original.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Reference.original.md" +cssclasses: hide-title +--- + + + +[`Reference`](obsidian.Reference.md) › [`original`](obsidian.Reference.original.md) + +## Reference.original property + + +**Signature:** + +```typescript +original: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ReferenceCache.md b/docs/obsidian-developer/Reference/TypeScript API/ReferenceCache.md new file mode 100644 index 0000000000000000000000000000000000000000..1a43db16da35bf079d94038079ba37c32a8e99cf --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ReferenceCache.md @@ -0,0 +1,19 @@ +--- +aliases: "obsidian.ReferenceCache.md" +cssclasses: hide-title +--- + + + +[`ReferenceCache`](obsidian.ReferenceCache.md) + +## ReferenceCache interface + + +**Signature:** + +```typescript +export interface ReferenceCache extends Reference, CacheItem +``` +**Extends:** [`Reference`](obsidian.Reference.md), [`CacheItem`](obsidian.CacheItem.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam.md new file mode 100644 index 0000000000000000000000000000000000000000..70e476d23fb72f2c24e49c80594e7cc6dd4117d2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.RequestUrlParam.md" +cssclasses: hide-title +--- + + + +[`RequestUrlParam`](obsidian.RequestUrlParam.md) + +## RequestUrlParam interface + + +**Signature:** + +```typescript +export interface RequestUrlParam +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`body?`](obsidian.RequestUrlParam.body.md) | | string | ArrayBuffer | _(Optional)_ | +| [`contentType?`](obsidian.RequestUrlParam.contentType.md) | | string | _(Optional)_ | +| [`headers?`](obsidian.RequestUrlParam.headers.md) | | Record<string, string> | _(Optional)_ | +| [`method?`](obsidian.RequestUrlParam.method.md) | | string | _(Optional)_ | +| [`throw?`](obsidian.RequestUrlParam.throw.md) | | boolean | _(Optional)_ Whether to throw an error when the status code is 400+ Defaults to true | +| [`url`](obsidian.RequestUrlParam.url.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/body.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/body.md new file mode 100644 index 0000000000000000000000000000000000000000..a58d36b6d18bebc8bc5f31542815c2152a1aa3d2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/body.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlParam.body.md" +cssclasses: hide-title +--- + + + +[`RequestUrlParam`](obsidian.RequestUrlParam.md) › [`body`](obsidian.RequestUrlParam.body.md) + +## RequestUrlParam.body property + + +**Signature:** + +```typescript +body?: string | ArrayBuffer; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/contentType.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/contentType.md new file mode 100644 index 0000000000000000000000000000000000000000..60c94c6d5c01725023e0f92f662f473f562c00ea --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/contentType.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlParam.contentType.md" +cssclasses: hide-title +--- + + + +[`RequestUrlParam`](obsidian.RequestUrlParam.md) › [`contentType`](obsidian.RequestUrlParam.contentType.md) + +## RequestUrlParam.contentType property + + +**Signature:** + +```typescript +contentType?: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/headers.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/headers.md new file mode 100644 index 0000000000000000000000000000000000000000..9bea19d693d16e68a00a99c6590b3c383066721c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/headers.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlParam.headers.md" +cssclasses: hide-title +--- + + + +[`RequestUrlParam`](obsidian.RequestUrlParam.md) › [`headers`](obsidian.RequestUrlParam.headers.md) + +## RequestUrlParam.headers property + + +**Signature:** + +```typescript +headers?: Record; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/method.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/method.md new file mode 100644 index 0000000000000000000000000000000000000000..492de50961c72d81a94bf010d8e758b59090c35a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/method.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlParam.method.md" +cssclasses: hide-title +--- + + + +[`RequestUrlParam`](obsidian.RequestUrlParam.md) › [`method`](obsidian.RequestUrlParam.method.md) + +## RequestUrlParam.method property + + +**Signature:** + +```typescript +method?: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/throw.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/throw.md new file mode 100644 index 0000000000000000000000000000000000000000..a65cffe429f201e2a68206be73b434087f9c7b1f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/throw.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.RequestUrlParam.throw.md" +cssclasses: hide-title +--- + + + +[`RequestUrlParam`](obsidian.RequestUrlParam.md) › [`throw`](obsidian.RequestUrlParam.throw.md) + +## RequestUrlParam.throw property + +Whether to throw an error when the status code is 400+ Defaults to true + +**Signature:** + +```typescript +throw?: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/url.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/url.md new file mode 100644 index 0000000000000000000000000000000000000000..cc7a6edcfa5074354ba3fcd807eeba8e81697a60 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlParam/url.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlParam.url.md" +cssclasses: hide-title +--- + + + +[`RequestUrlParam`](obsidian.RequestUrlParam.md) › [`url`](obsidian.RequestUrlParam.url.md) + +## RequestUrlParam.url property + + +**Signature:** + +```typescript +url: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse.md new file mode 100644 index 0000000000000000000000000000000000000000..f85a2103ce351db4a3e5534c5d1325953a8e4054 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.RequestUrlResponse.md" +cssclasses: hide-title +--- + + + +[`RequestUrlResponse`](obsidian.RequestUrlResponse.md) + +## RequestUrlResponse interface + + +**Signature:** + +```typescript +export interface RequestUrlResponse +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`arrayBuffer`](obsidian.RequestUrlResponse.arrayBuffer.md) | | ArrayBuffer | | +| [`headers`](obsidian.RequestUrlResponse.headers.md) | | Record<string, string> | | +| [`json`](obsidian.RequestUrlResponse.json.md) | | any | | +| [`status`](obsidian.RequestUrlResponse.status.md) | | number | | +| [`text`](obsidian.RequestUrlResponse.text.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/arrayBuffer.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/arrayBuffer.md new file mode 100644 index 0000000000000000000000000000000000000000..aa8f59f31cc37d164f0353b360ef2b897bd9d4c7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/arrayBuffer.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlResponse.arrayBuffer.md" +cssclasses: hide-title +--- + + + +[`RequestUrlResponse`](obsidian.RequestUrlResponse.md) › [`arrayBuffer`](obsidian.RequestUrlResponse.arrayBuffer.md) + +## RequestUrlResponse.arrayBuffer property + + +**Signature:** + +```typescript +arrayBuffer: ArrayBuffer; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/headers.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/headers.md new file mode 100644 index 0000000000000000000000000000000000000000..89508b03aeacde460b861a0222db3ee3cb20e74c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/headers.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlResponse.headers.md" +cssclasses: hide-title +--- + + + +[`RequestUrlResponse`](obsidian.RequestUrlResponse.md) › [`headers`](obsidian.RequestUrlResponse.headers.md) + +## RequestUrlResponse.headers property + + +**Signature:** + +```typescript +headers: Record; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/json.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/json.md new file mode 100644 index 0000000000000000000000000000000000000000..a2eb5eea424e83099a1e4b079f7a1f5b0e4e7fc4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/json.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlResponse.json.md" +cssclasses: hide-title +--- + + + +[`RequestUrlResponse`](obsidian.RequestUrlResponse.md) › [`json`](obsidian.RequestUrlResponse.json.md) + +## RequestUrlResponse.json property + + +**Signature:** + +```typescript +json: any; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/status.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/status.md new file mode 100644 index 0000000000000000000000000000000000000000..98e10d57060e7fabe41e3d6c6b59371b3b7882f5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/status.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlResponse.status.md" +cssclasses: hide-title +--- + + + +[`RequestUrlResponse`](obsidian.RequestUrlResponse.md) › [`status`](obsidian.RequestUrlResponse.status.md) + +## RequestUrlResponse.status property + + +**Signature:** + +```typescript +status: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/text.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/text.md new file mode 100644 index 0000000000000000000000000000000000000000..d5095067811eb954ce1cde4ad68f97b6089d95cc --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponse/text.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlResponse.text.md" +cssclasses: hide-title +--- + + + +[`RequestUrlResponse`](obsidian.RequestUrlResponse.md) › [`text`](obsidian.RequestUrlResponse.text.md) + +## RequestUrlResponse.text property + + +**Signature:** + +```typescript +text: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise.md new file mode 100644 index 0000000000000000000000000000000000000000..13dafbdb1fe9090e099ec67bf617db7889068462 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.RequestUrlResponsePromise.md" +cssclasses: hide-title +--- + + + +[`RequestUrlResponsePromise`](obsidian.RequestUrlResponsePromise.md) + +## RequestUrlResponsePromise interface + + +**Signature:** + +```typescript +export interface RequestUrlResponsePromise extends Promise +``` +**Extends:** `Promise``<`[`RequestUrlResponse`](obsidian.RequestUrlResponse.md)`>` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`arrayBuffer`](obsidian.RequestUrlResponsePromise.arrayBuffer.md) | | Promise<ArrayBuffer> | | +| [`json`](obsidian.RequestUrlResponsePromise.json.md) | | Promise<any> | | +| [`text`](obsidian.RequestUrlResponsePromise.text.md) | | Promise<string> | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise/arrayBuffer.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise/arrayBuffer.md new file mode 100644 index 0000000000000000000000000000000000000000..50c628fa28e098da1e05f5977274a1351fcbba5a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise/arrayBuffer.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlResponsePromise.arrayBuffer.md" +cssclasses: hide-title +--- + + + +[`RequestUrlResponsePromise`](obsidian.RequestUrlResponsePromise.md) › [`arrayBuffer`](obsidian.RequestUrlResponsePromise.arrayBuffer.md) + +## RequestUrlResponsePromise.arrayBuffer property + + +**Signature:** + +```typescript +arrayBuffer: Promise; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise/json.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise/json.md new file mode 100644 index 0000000000000000000000000000000000000000..a00b3bea8ef5fd2cb9296392cdee4bd043203273 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise/json.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlResponsePromise.json.md" +cssclasses: hide-title +--- + + + +[`RequestUrlResponsePromise`](obsidian.RequestUrlResponsePromise.md) › [`json`](obsidian.RequestUrlResponsePromise.json.md) + +## RequestUrlResponsePromise.json property + + +**Signature:** + +```typescript +json: Promise; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise/text.md b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise/text.md new file mode 100644 index 0000000000000000000000000000000000000000..ab30700b3cc55cd4f51f7c348654b59d0a69ded2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/RequestUrlResponsePromise/text.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.RequestUrlResponsePromise.text.md" +cssclasses: hide-title +--- + + + +[`RequestUrlResponsePromise`](obsidian.RequestUrlResponsePromise.md) › [`text`](obsidian.RequestUrlResponsePromise.text.md) + +## RequestUrlResponsePromise.text property + + +**Signature:** + +```typescript +text: Promise; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Scope.md b/docs/obsidian-developer/Reference/TypeScript API/Scope.md new file mode 100644 index 0000000000000000000000000000000000000000..24238673a8fb007fb68f91caece7778638ec47c0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Scope.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Scope.md" +cssclasses: hide-title +--- + + + +[`Scope`](obsidian.Scope.md) + +## Scope class + + +**Signature:** + +```typescript +export class Scope +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(parent)`](obsidian.Scope.(constructor).md) | | Constructs a new instance of the Scope class | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`register(modifiers, key, func)`](obsidian.Scope.register.md) | | | +| [`unregister(handler)`](obsidian.Scope.unregister.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Scope/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/Scope/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..bc5669ce28b664810e878453ac5a0ef1f8848212 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Scope/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.Scope.(constructor).md" +cssclasses: hide-title +--- + + + +[`Scope`](obsidian.Scope.md) › [`(constructor)`](obsidian.Scope.(constructor).md) + +## Scope.(constructor) + +Constructs a new instance of the `Scope` class + +**Signature:** + +```typescript +constructor(parent?: Scope); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| parent | [`Scope`](obsidian.Scope.md) | _(Optional)_ | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Scope/register.md b/docs/obsidian-developer/Reference/TypeScript API/Scope/register.md new file mode 100644 index 0000000000000000000000000000000000000000..cb29fbeb38e9337bee69fb29c567078d2449d462 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Scope/register.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Scope.register.md" +cssclasses: hide-title +--- + + + +[`Scope`](obsidian.Scope.md) › [`register`](obsidian.Scope.register.md) + +## Scope.register() method + +**Signature:** + +```typescript +register(modifiers: Modifier[], key: string | null, func: KeymapEventListener): KeymapEventHandler; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| modifiers | [`Modifier`](obsidian.Modifier.md)[] | Mod, Ctrl, Meta, Shift, or Alt. Mod translates to Meta on macOS and Ctrl otherwise. | +| key | string | null | Keycode from https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key\_Values | +| func | [`KeymapEventListener`](obsidian.KeymapEventListener.md) | the callback | + +**Returns:** + +[`KeymapEventHandler`](obsidian.KeymapEventHandler.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Scope/unregister.md b/docs/obsidian-developer/Reference/TypeScript API/Scope/unregister.md new file mode 100644 index 0000000000000000000000000000000000000000..17be56bba12900d8a9bfe8a0702a7dca23c9a0a1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Scope/unregister.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Scope.unregister.md" +cssclasses: hide-title +--- + + + +[`Scope`](obsidian.Scope.md) › [`unregister`](obsidian.Scope.unregister.md) + +## Scope.unregister() method + + +**Signature:** + +```typescript +unregister(handler: KeymapEventHandler): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| handler | [`KeymapEventHandler`](obsidian.KeymapEventHandler.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SearchComponent.md b/docs/obsidian-developer/Reference/TypeScript API/SearchComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..71684105ba6bb621744b903020aa2def686e6f70 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SearchComponent.md @@ -0,0 +1,37 @@ +--- +aliases: "obsidian.SearchComponent.md" +cssclasses: hide-title +--- + + + +[`SearchComponent`](obsidian.SearchComponent.md) + +## SearchComponent class + + +**Signature:** + +```typescript +export class SearchComponent extends AbstractTextComponent +``` +**Extends:** [`AbstractTextComponent`](obsidian.AbstractTextComponent.md)`<``HTMLInputElement``>` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.SearchComponent.(constructor).md) | | Constructs a new instance of the SearchComponent class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`clearButtonEl`](obsidian.SearchComponent.clearButtonEl.md) | | HTMLElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`onChanged()`](obsidian.SearchComponent.onChanged.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SearchComponent/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/SearchComponent/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..d3f7affcc37202f48501a79132ff4c60a2f50409 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SearchComponent/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.SearchComponent.(constructor).md" +cssclasses: hide-title +--- + + + +[`SearchComponent`](obsidian.SearchComponent.md) › [`(constructor)`](obsidian.SearchComponent.(constructor).md) + +## SearchComponent.(constructor) + +Constructs a new instance of the `SearchComponent` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SearchComponent/clearButtonEl.md b/docs/obsidian-developer/Reference/TypeScript API/SearchComponent/clearButtonEl.md new file mode 100644 index 0000000000000000000000000000000000000000..57bbb02f1e322e1abbf5122db7ecb0ceb394eea5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SearchComponent/clearButtonEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SearchComponent.clearButtonEl.md" +cssclasses: hide-title +--- + + + +[`SearchComponent`](obsidian.SearchComponent.md) › [`clearButtonEl`](obsidian.SearchComponent.clearButtonEl.md) + +## SearchComponent.clearButtonEl property + + +**Signature:** + +```typescript +clearButtonEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SearchComponent/onChanged.md b/docs/obsidian-developer/Reference/TypeScript API/SearchComponent/onChanged.md new file mode 100644 index 0000000000000000000000000000000000000000..8015ec5a060026765d489bc71fcd2b3bdc6459dc --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SearchComponent/onChanged.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.SearchComponent.onChanged.md" +cssclasses: hide-title +--- + + + +[`SearchComponent`](obsidian.SearchComponent.md) › [`onChanged`](obsidian.SearchComponent.onChanged.md) + +## SearchComponent.onChanged() method + + +**Signature:** + +```typescript +onChanged(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SearchMatchPart.md b/docs/obsidian-developer/Reference/TypeScript API/SearchMatchPart.md new file mode 100644 index 0000000000000000000000000000000000000000..c738db9871e965ca3c45c4d8887ac20469353d76 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SearchMatchPart.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.SearchMatchPart.md" +cssclasses: hide-title +--- + + + +[`SearchMatchPart`](obsidian.SearchMatchPart.md) + +## SearchMatchPart type + +Text position offsets within text file. Represents a text range \[from offset, to offset\]. + +**Signature:** + +```typescript +export type SearchMatchPart = [number, number]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SearchMatches.md b/docs/obsidian-developer/Reference/TypeScript API/SearchMatches.md new file mode 100644 index 0000000000000000000000000000000000000000..3fc66524ae1837c9c09c53e842a36fd9271325ed --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SearchMatches.md @@ -0,0 +1,19 @@ +--- +aliases: "obsidian.SearchMatches.md" +cssclasses: hide-title +--- + + + +[`SearchMatches`](obsidian.SearchMatches.md) + +## SearchMatches type + + +**Signature:** + +```typescript +export type SearchMatches = SearchMatchPart[]; +``` +**References:** [`SearchMatchPart`](obsidian.SearchMatchPart.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SearchResult.md b/docs/obsidian-developer/Reference/TypeScript API/SearchResult.md new file mode 100644 index 0000000000000000000000000000000000000000..aba34c8e487b07d1ef59667e7244f6858ad7db79 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SearchResult.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.SearchResult.md" +cssclasses: hide-title +--- + + + +[`SearchResult`](obsidian.SearchResult.md) + +## SearchResult interface + + +**Signature:** + +```typescript +export interface SearchResult +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`matches`](obsidian.SearchResult.matches.md) | | [`SearchMatches`](obsidian.SearchMatches.md) | | +| [`score`](obsidian.SearchResult.score.md) | | number | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SearchResult/matches.md b/docs/obsidian-developer/Reference/TypeScript API/SearchResult/matches.md new file mode 100644 index 0000000000000000000000000000000000000000..9e4e9a44853f2d023c5d7fe895b36d7461b872b0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SearchResult/matches.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SearchResult.matches.md" +cssclasses: hide-title +--- + + + +[`SearchResult`](obsidian.SearchResult.md) › [`matches`](obsidian.SearchResult.matches.md) + +## SearchResult.matches property + + +**Signature:** + +```typescript +matches: SearchMatches; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SearchResult/score.md b/docs/obsidian-developer/Reference/TypeScript API/SearchResult/score.md new file mode 100644 index 0000000000000000000000000000000000000000..60ff2db8f6e99b1cfc8e3d2dde5068b8ca397506 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SearchResult/score.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SearchResult.score.md" +cssclasses: hide-title +--- + + + +[`SearchResult`](obsidian.SearchResult.md) › [`score`](obsidian.SearchResult.score.md) + +## SearchResult.score property + + +**Signature:** + +```typescript +score: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SearchResultContainer.md b/docs/obsidian-developer/Reference/TypeScript API/SearchResultContainer.md new file mode 100644 index 0000000000000000000000000000000000000000..b9ed7684ce15c9e8ac246e7f2a16294c4fe4d254 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SearchResultContainer.md @@ -0,0 +1,24 @@ +--- +aliases: "obsidian.SearchResultContainer.md" +cssclasses: hide-title +--- + + + +[`SearchResultContainer`](obsidian.SearchResultContainer.md) + +## SearchResultContainer interface + + +**Signature:** + +```typescript +export interface SearchResultContainer +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`match`](obsidian.SearchResultContainer.match.md) | | [`SearchResult`](obsidian.SearchResult.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SearchResultContainer/match.md b/docs/obsidian-developer/Reference/TypeScript API/SearchResultContainer/match.md new file mode 100644 index 0000000000000000000000000000000000000000..c7326659c16bc9980293bf78a2c04d84d3f1341a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SearchResultContainer/match.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SearchResultContainer.match.md" +cssclasses: hide-title +--- + + + +[`SearchResultContainer`](obsidian.SearchResultContainer.md) › [`match`](obsidian.SearchResultContainer.match.md) + +## SearchResultContainer.match property + + +**Signature:** + +```typescript +match: SearchResult; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SectionCache.md b/docs/obsidian-developer/Reference/TypeScript API/SectionCache.md new file mode 100644 index 0000000000000000000000000000000000000000..51610ab70237ef4b1a4d2f9aa4fff29e5d6e41d6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SectionCache.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.SectionCache.md" +cssclasses: hide-title +--- + + + +[`SectionCache`](obsidian.SectionCache.md) + +## SectionCache interface + + +**Signature:** + +```typescript +export interface SectionCache extends CacheItem +``` +**Extends:** [`CacheItem`](obsidian.CacheItem.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`id?`](obsidian.SectionCache.id.md) | | string | undefined | _(Optional)_ The block ID of this section, if defined. | +| [`type`](obsidian.SectionCache.type.md) | | string | The type string generated by the parser. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SectionCache/id.md b/docs/obsidian-developer/Reference/TypeScript API/SectionCache/id.md new file mode 100644 index 0000000000000000000000000000000000000000..ccf6fa5913b5c5b5ee41aed38ce189233ffd2426 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SectionCache/id.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.SectionCache.id.md" +cssclasses: hide-title +--- + + + +[`SectionCache`](obsidian.SectionCache.md) › [`id`](obsidian.SectionCache.id.md) + +## SectionCache.id property + +The block ID of this section, if defined. + +**Signature:** + +```typescript +id?: string | undefined; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SectionCache/type.md b/docs/obsidian-developer/Reference/TypeScript API/SectionCache/type.md new file mode 100644 index 0000000000000000000000000000000000000000..74847fb127b5835f6e158d6d15adfc68665f473a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SectionCache/type.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.SectionCache.type.md" +cssclasses: hide-title +--- + + + +[`SectionCache`](obsidian.SectionCache.md) › [`type`](obsidian.SectionCache.type.md) + +## SectionCache.type property + +The type string generated by the parser. + +**Signature:** + +```typescript +type: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting.md b/docs/obsidian-developer/Reference/TypeScript API/Setting.md new file mode 100644 index 0000000000000000000000000000000000000000..49a1f35a1b7efc9ecb07209a141083be239d9d6c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting.md @@ -0,0 +1,59 @@ +--- +aliases: "obsidian.Setting.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) + +## Setting class + + +**Signature:** + +```typescript +export class Setting +``` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.Setting.(constructor).md) | | Constructs a new instance of the Setting class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`components`](obsidian.Setting.components.md) | | [`BaseComponent`](obsidian.BaseComponent.md)[] | | +| [`controlEl`](obsidian.Setting.controlEl.md) | | HTMLElement | | +| [`descEl`](obsidian.Setting.descEl.md) | | HTMLElement | | +| [`infoEl`](obsidian.Setting.infoEl.md) | | HTMLElement | | +| [`nameEl`](obsidian.Setting.nameEl.md) | | HTMLElement | | +| [`settingEl`](obsidian.Setting.settingEl.md) | | HTMLElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`addButton(cb)`](obsidian.Setting.addButton.md) | | | +| [`addColorPicker(cb)`](obsidian.Setting.addColorPicker.md) | | | +| [`addDropdown(cb)`](obsidian.Setting.addDropdown.md) | | | +| [`addExtraButton(cb)`](obsidian.Setting.addExtraButton.md) | | | +| [`addMomentFormat(cb)`](obsidian.Setting.addMomentFormat.md) | | | +| [`addProgressBar(cb)`](obsidian.Setting.addProgressBar.md) | | | +| [`addSearch(cb)`](obsidian.Setting.addSearch.md) | | | +| [`addSlider(cb)`](obsidian.Setting.addSlider.md) | | | +| [`addText(cb)`](obsidian.Setting.addText.md) | | | +| [`addTextArea(cb)`](obsidian.Setting.addTextArea.md) | | | +| [`addToggle(cb)`](obsidian.Setting.addToggle.md) | | | +| [`clear()`](obsidian.Setting.clear.md) | | | +| [`setClass(cls)`](obsidian.Setting.setClass.md) | | | +| [`setDesc(desc)`](obsidian.Setting.setDesc.md) | | | +| [`setDisabled(disabled)`](obsidian.Setting.setDisabled.md) | | | +| [`setHeading()`](obsidian.Setting.setHeading.md) | | | +| [`setName(name)`](obsidian.Setting.setName.md) | | | +| [`setTooltip(tooltip, options)`](obsidian.Setting.setTooltip.md) | | | +| [`then(cb)`](obsidian.Setting.then.md) | | Facilitates chaining | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/Setting/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..e976ecd1c31440e9fe7a0c0676cd902e549677e7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.Setting.(constructor).md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`(constructor)`](obsidian.Setting.(constructor).md) + +## Setting.(constructor) + +Constructs a new instance of the `Setting` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/addButton.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/addButton.md new file mode 100644 index 0000000000000000000000000000000000000000..c8b2c3df1ed5c3f44218b9997c64874ae452a1e4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/addButton.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.addButton.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`addButton`](obsidian.Setting.addButton.md) + +## Setting.addButton() method + + +**Signature:** + +```typescript +addButton(cb: (component: ButtonComponent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: [`ButtonComponent`](obsidian.ButtonComponent.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/addColorPicker.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/addColorPicker.md new file mode 100644 index 0000000000000000000000000000000000000000..1e12797394d95a3e7b8a50d753cc2a302da50235 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/addColorPicker.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.addColorPicker.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`addColorPicker`](obsidian.Setting.addColorPicker.md) + +## Setting.addColorPicker() method + + +**Signature:** + +```typescript +addColorPicker(cb: (component: ColorComponent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: [`ColorComponent`](obsidian.ColorComponent.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/addDropdown.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/addDropdown.md new file mode 100644 index 0000000000000000000000000000000000000000..4e9e01765042906b0b5d3249d58f1264a81fcb99 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/addDropdown.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.addDropdown.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`addDropdown`](obsidian.Setting.addDropdown.md) + +## Setting.addDropdown() method + + +**Signature:** + +```typescript +addDropdown(cb: (component: DropdownComponent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: [`DropdownComponent`](obsidian.DropdownComponent.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/addExtraButton.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/addExtraButton.md new file mode 100644 index 0000000000000000000000000000000000000000..d8c950fe0a02e8f3d15db6807945f7ba53943b9c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/addExtraButton.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.addExtraButton.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`addExtraButton`](obsidian.Setting.addExtraButton.md) + +## Setting.addExtraButton() method + + +**Signature:** + +```typescript +addExtraButton(cb: (component: ExtraButtonComponent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: [`ExtraButtonComponent`](obsidian.ExtraButtonComponent.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/addMomentFormat.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/addMomentFormat.md new file mode 100644 index 0000000000000000000000000000000000000000..b4371b53fb3e46a4e6f80d3bd08fb96cc98d2c4a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/addMomentFormat.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.addMomentFormat.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`addMomentFormat`](obsidian.Setting.addMomentFormat.md) + +## Setting.addMomentFormat() method + + +**Signature:** + +```typescript +addMomentFormat(cb: (component: MomentFormatComponent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: [`MomentFormatComponent`](obsidian.MomentFormatComponent.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/addProgressBar.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/addProgressBar.md new file mode 100644 index 0000000000000000000000000000000000000000..851e66918faa8a43351329c83d5272bb7dd90a4d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/addProgressBar.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.addProgressBar.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`addProgressBar`](obsidian.Setting.addProgressBar.md) + +## Setting.addProgressBar() method + + +**Signature:** + +```typescript +addProgressBar(cb: (component: ProgressBarComponent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: [`ProgressBarComponent`](obsidian.ProgressBarComponent.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/addSearch.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/addSearch.md new file mode 100644 index 0000000000000000000000000000000000000000..bc5b758994de9680743637afaff6fdc5308183e8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/addSearch.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.addSearch.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`addSearch`](obsidian.Setting.addSearch.md) + +## Setting.addSearch() method + + +**Signature:** + +```typescript +addSearch(cb: (component: SearchComponent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: [`SearchComponent`](obsidian.SearchComponent.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/addSlider.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/addSlider.md new file mode 100644 index 0000000000000000000000000000000000000000..9ea2224c84a8adb05b1de07eabd279510b1b9495 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/addSlider.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.addSlider.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`addSlider`](obsidian.Setting.addSlider.md) + +## Setting.addSlider() method + + +**Signature:** + +```typescript +addSlider(cb: (component: SliderComponent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: [`SliderComponent`](obsidian.SliderComponent.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/addText.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/addText.md new file mode 100644 index 0000000000000000000000000000000000000000..5e218372c196923ad8ecdbd9032eb5fc264cce35 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/addText.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.addText.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`addText`](obsidian.Setting.addText.md) + +## Setting.addText() method + + +**Signature:** + +```typescript +addText(cb: (component: TextComponent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: [`TextComponent`](obsidian.TextComponent.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/addTextArea.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/addTextArea.md new file mode 100644 index 0000000000000000000000000000000000000000..122ffb0338a82a6194c744454f3dc1eeafa5e0dd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/addTextArea.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.addTextArea.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`addTextArea`](obsidian.Setting.addTextArea.md) + +## Setting.addTextArea() method + + +**Signature:** + +```typescript +addTextArea(cb: (component: TextAreaComponent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: [`TextAreaComponent`](obsidian.TextAreaComponent.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/addToggle.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/addToggle.md new file mode 100644 index 0000000000000000000000000000000000000000..6c4240f62e7f3396f4cfe455cfaf8b9df1db8248 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/addToggle.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.addToggle.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`addToggle`](obsidian.Setting.addToggle.md) + +## Setting.addToggle() method + + +**Signature:** + +```typescript +addToggle(cb: (component: ToggleComponent) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (component: [`ToggleComponent`](obsidian.ToggleComponent.md)) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/clear.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/clear.md new file mode 100644 index 0000000000000000000000000000000000000000..9975a1ac62ac400e533f09791c2671d0713c8442 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/clear.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Setting.clear.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`clear`](obsidian.Setting.clear.md) + +## Setting.clear() method + + +**Signature:** + +```typescript +clear(): this; +``` +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/components.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/components.md new file mode 100644 index 0000000000000000000000000000000000000000..c3ffe0ef640fe0931f95b080e402c1d1969f219e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/components.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Setting.components.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`components`](obsidian.Setting.components.md) + +## Setting.components property + + +**Signature:** + +```typescript +components: BaseComponent[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/controlEl.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/controlEl.md new file mode 100644 index 0000000000000000000000000000000000000000..4a8f20f80bcfad1bb0853f13b68631cfc55b9179 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/controlEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Setting.controlEl.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`controlEl`](obsidian.Setting.controlEl.md) + +## Setting.controlEl property + + +**Signature:** + +```typescript +controlEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/descEl.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/descEl.md new file mode 100644 index 0000000000000000000000000000000000000000..9bd1c4be06806646ec1b12a8780afd89f5f5bb51 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/descEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Setting.descEl.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`descEl`](obsidian.Setting.descEl.md) + +## Setting.descEl property + + +**Signature:** + +```typescript +descEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/infoEl.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/infoEl.md new file mode 100644 index 0000000000000000000000000000000000000000..5d3c330090fe7bfade831180ee1efde5b4a305b3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/infoEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Setting.infoEl.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`infoEl`](obsidian.Setting.infoEl.md) + +## Setting.infoEl property + + +**Signature:** + +```typescript +infoEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/nameEl.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/nameEl.md new file mode 100644 index 0000000000000000000000000000000000000000..4c05a382eecdb0490c405c23ea41e432838fc625 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/nameEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Setting.nameEl.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`nameEl`](obsidian.Setting.nameEl.md) + +## Setting.nameEl property + + +**Signature:** + +```typescript +nameEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/setClass.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/setClass.md new file mode 100644 index 0000000000000000000000000000000000000000..fd619cb682abced090bb9327bb8e74d187353ce1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/setClass.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.setClass.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`setClass`](obsidian.Setting.setClass.md) + +## Setting.setClass() method + + +**Signature:** + +```typescript +setClass(cls: string): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cls | string | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/setDesc.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/setDesc.md new file mode 100644 index 0000000000000000000000000000000000000000..11c9c887260e2b8da38cf0f7e2dd90a37248f288 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/setDesc.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.setDesc.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`setDesc`](obsidian.Setting.setDesc.md) + +## Setting.setDesc() method + + +**Signature:** + +```typescript +setDesc(desc: string | DocumentFragment): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| desc | string | DocumentFragment | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/setDisabled.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/setDisabled.md new file mode 100644 index 0000000000000000000000000000000000000000..1067e284726e0c83f9f930a05c8ceb4b0db3e8a8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/setDisabled.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.setDisabled.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`setDisabled`](obsidian.Setting.setDisabled.md) + +## Setting.setDisabled() method + + +**Signature:** + +```typescript +setDisabled(disabled: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| disabled | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/setHeading.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/setHeading.md new file mode 100644 index 0000000000000000000000000000000000000000..afd7e7fa0f98b33a4fab85b579e6beeea8125ed2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/setHeading.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Setting.setHeading.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`setHeading`](obsidian.Setting.setHeading.md) + +## Setting.setHeading() method + + +**Signature:** + +```typescript +setHeading(): this; +``` +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/setName.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/setName.md new file mode 100644 index 0000000000000000000000000000000000000000..4a3f06d0f4a4f5d73b67b30b36c1ed89f381256e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/setName.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Setting.setName.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`setName`](obsidian.Setting.setName.md) + +## Setting.setName() method + + +**Signature:** + +```typescript +setName(name: string | DocumentFragment): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | DocumentFragment | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/setTooltip.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/setTooltip.md new file mode 100644 index 0000000000000000000000000000000000000000..505dfb8680532005d43bc3da930a85c7acefc5f9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/setTooltip.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Setting.setTooltip.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`setTooltip`](obsidian.Setting.setTooltip.md) + +## Setting.setTooltip() method + + +**Signature:** + +```typescript +setTooltip(tooltip: string, options?: TooltipOptions): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| tooltip | string | | +| options | [`TooltipOptions`](obsidian.TooltipOptions.md) | _(Optional)_ | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/settingEl.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/settingEl.md new file mode 100644 index 0000000000000000000000000000000000000000..ea27869c2e37b726d6de83ba23fdb2ec59e9d30e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/settingEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Setting.settingEl.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`settingEl`](obsidian.Setting.settingEl.md) + +## Setting.settingEl property + + +**Signature:** + +```typescript +settingEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Setting/then.md b/docs/obsidian-developer/Reference/TypeScript API/Setting/then.md new file mode 100644 index 0000000000000000000000000000000000000000..cf0cdb7ac4728c62343a66526745ef0dc588baba --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Setting/then.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Setting.then.md" +cssclasses: hide-title +--- + + + +[`Setting`](obsidian.Setting.md) › [`then`](obsidian.Setting.then.md) + +## Setting.then() method + +Facilitates chaining + +**Signature:** + +```typescript +then(cb: (setting: this) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (setting: this) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SettingTab.md b/docs/obsidian-developer/Reference/TypeScript API/SettingTab.md new file mode 100644 index 0000000000000000000000000000000000000000..3ce1e96005fd0da068370cc4fcb77201300fba09 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SettingTab.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.SettingTab.md" +cssclasses: hide-title +--- + + + +[`SettingTab`](obsidian.SettingTab.md) + +## SettingTab class + +**Signature:** + +```typescript +export abstract class SettingTab +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`app`](obsidian.SettingTab.app.md) | | [`App`](obsidian.App.md) | Reference to the app instance. | +| [`containerEl`](obsidian.SettingTab.containerEl.md) | | HTMLElement | Outermost HTML element on the setting tab. | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`display()`](obsidian.SettingTab.display.md) | abstract | Called when the settings tab should be rendered. | +| [`hide()`](obsidian.SettingTab.hide.md) | | Hides the contents of the setting tab. Any registered components should be unloaded when the view is hidden. Override this if you need to perform additional cleanup. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SettingTab/app.md b/docs/obsidian-developer/Reference/TypeScript API/SettingTab/app.md new file mode 100644 index 0000000000000000000000000000000000000000..e6ee6b4b448796ee3b822106e0197d90a392e348 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SettingTab/app.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.SettingTab.app.md" +cssclasses: hide-title +--- + + + +[`SettingTab`](obsidian.SettingTab.md) › [`app`](obsidian.SettingTab.app.md) + +## SettingTab.app property + +Reference to the app instance. + +**Signature:** + +```typescript +app: App; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SettingTab/containerEl.md b/docs/obsidian-developer/Reference/TypeScript API/SettingTab/containerEl.md new file mode 100644 index 0000000000000000000000000000000000000000..36a30dd2b02da6b1d70da46b0f77460894e60588 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SettingTab/containerEl.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.SettingTab.containerEl.md" +cssclasses: hide-title +--- + + + +[`SettingTab`](obsidian.SettingTab.md) › [`containerEl`](obsidian.SettingTab.containerEl.md) + +## SettingTab.containerEl property + +Outermost HTML element on the setting tab. + +**Signature:** + +```typescript +containerEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SettingTab/display.md b/docs/obsidian-developer/Reference/TypeScript API/SettingTab/display.md new file mode 100644 index 0000000000000000000000000000000000000000..9324e56d1deee95972a27f0db3b74d24ce71b7d6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SettingTab/display.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.SettingTab.display.md" +cssclasses: hide-title +--- + + + +[`SettingTab`](obsidian.SettingTab.md) › [`display`](obsidian.SettingTab.display.md) + +## SettingTab.display() method + +Called when the settings tab should be rendered. + +**Signature:** + +```typescript +abstract display(): any; +``` +**Returns:** + +`any` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SettingTab/hide.md b/docs/obsidian-developer/Reference/TypeScript API/SettingTab/hide.md new file mode 100644 index 0000000000000000000000000000000000000000..8a435d4c936bc6cc3281283c398350256435e072 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SettingTab/hide.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.SettingTab.hide.md" +cssclasses: hide-title +--- + + + +[`SettingTab`](obsidian.SettingTab.md) › [`hide`](obsidian.SettingTab.hide.md) + +## SettingTab.hide() method + +Hides the contents of the setting tab. Any registered components should be unloaded when the view is hidden. Override this if you need to perform additional cleanup. + +**Signature:** + +```typescript +hide(): any; +``` +**Returns:** + +`any` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SliderComponent.md b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..8d258b0f3b01f13a95e098ef62c40cdc62a04faa --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent.md @@ -0,0 +1,44 @@ +--- +aliases: "obsidian.SliderComponent.md" +cssclasses: hide-title +--- + + + +[`SliderComponent`](obsidian.SliderComponent.md) + +## SliderComponent class + + +**Signature:** + +```typescript +export class SliderComponent extends ValueComponent +``` +**Extends:** [`ValueComponent`](obsidian.ValueComponent.md)`` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.SliderComponent.(constructor).md) | | Constructs a new instance of the SliderComponent class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`sliderEl`](obsidian.SliderComponent.sliderEl.md) | | HTMLInputElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getValue()`](obsidian.SliderComponent.getValue.md) | | | +| [`getValuePretty()`](obsidian.SliderComponent.getValuePretty.md) | | | +| [`onChange(callback)`](obsidian.SliderComponent.onChange.md) | | | +| [`setDisabled(disabled)`](obsidian.SliderComponent.setDisabled.md) | | | +| [`setDynamicTooltip()`](obsidian.SliderComponent.setDynamicTooltip.md) | | | +| [`setLimits(min, max, step)`](obsidian.SliderComponent.setLimits.md) | | | +| [`setValue(value)`](obsidian.SliderComponent.setValue.md) | | | +| [`showTooltip()`](obsidian.SliderComponent.showTooltip.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..b27bd01151bbe3f4dd2b854ffe8cce6fe750b33e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.SliderComponent.(constructor).md" +cssclasses: hide-title +--- + + + +[`SliderComponent`](obsidian.SliderComponent.md) › [`(constructor)`](obsidian.SliderComponent.(constructor).md) + +## SliderComponent.(constructor) + +Constructs a new instance of the `SliderComponent` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/getValue.md b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/getValue.md new file mode 100644 index 0000000000000000000000000000000000000000..accf3df27325ba92afe79dc3c4cf65c7cd74d27d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/getValue.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.SliderComponent.getValue.md" +cssclasses: hide-title +--- + + + +[`SliderComponent`](obsidian.SliderComponent.md) › [`getValue`](obsidian.SliderComponent.getValue.md) + +## SliderComponent.getValue() method + + +**Signature:** + +```typescript +getValue(): number; +``` +**Returns:** + +`number` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/getValuePretty.md b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/getValuePretty.md new file mode 100644 index 0000000000000000000000000000000000000000..562fd8161a46c7a01096602c1543dc6c408c9d42 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/getValuePretty.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.SliderComponent.getValuePretty.md" +cssclasses: hide-title +--- + + + +[`SliderComponent`](obsidian.SliderComponent.md) › [`getValuePretty`](obsidian.SliderComponent.getValuePretty.md) + +## SliderComponent.getValuePretty() method + + +**Signature:** + +```typescript +getValuePretty(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/onChange.md b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/onChange.md new file mode 100644 index 0000000000000000000000000000000000000000..bc3df96c5636b21853b0c3f677867dee6833818f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/onChange.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.SliderComponent.onChange.md" +cssclasses: hide-title +--- + + + +[`SliderComponent`](obsidian.SliderComponent.md) › [`onChange`](obsidian.SliderComponent.onChange.md) + +## SliderComponent.onChange() method + + +**Signature:** + +```typescript +onChange(callback: (value: number) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (value: number) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setDisabled.md b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setDisabled.md new file mode 100644 index 0000000000000000000000000000000000000000..06adbb6985faacfba06eab4edbd84cefc4b5fecf --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setDisabled.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.SliderComponent.setDisabled.md" +cssclasses: hide-title +--- + + + +[`SliderComponent`](obsidian.SliderComponent.md) › [`setDisabled`](obsidian.SliderComponent.setDisabled.md) + +## SliderComponent.setDisabled() method + + +**Signature:** + +```typescript +setDisabled(disabled: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| disabled | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setDynamicTooltip.md b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setDynamicTooltip.md new file mode 100644 index 0000000000000000000000000000000000000000..634c7800940c13a687ecc712fb04f8d15e8eeddb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setDynamicTooltip.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.SliderComponent.setDynamicTooltip.md" +cssclasses: hide-title +--- + + + +[`SliderComponent`](obsidian.SliderComponent.md) › [`setDynamicTooltip`](obsidian.SliderComponent.setDynamicTooltip.md) + +## SliderComponent.setDynamicTooltip() method + + +**Signature:** + +```typescript +setDynamicTooltip(): this; +``` +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setLimits.md b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setLimits.md new file mode 100644 index 0000000000000000000000000000000000000000..fdf158a367f84199c3e4ecbdce22405e2f606dc9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setLimits.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.SliderComponent.setLimits.md" +cssclasses: hide-title +--- + + + +[`SliderComponent`](obsidian.SliderComponent.md) › [`setLimits`](obsidian.SliderComponent.setLimits.md) + +## SliderComponent.setLimits() method + + +**Signature:** + +```typescript +setLimits(min: number, max: number, step: number | 'any'): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| min | number | | +| max | number | | +| step | number | 'any' | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setValue.md b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setValue.md new file mode 100644 index 0000000000000000000000000000000000000000..4194386b2797329c44f7df39bac1545a9389ed78 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/setValue.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.SliderComponent.setValue.md" +cssclasses: hide-title +--- + + + +[`SliderComponent`](obsidian.SliderComponent.md) › [`setValue`](obsidian.SliderComponent.setValue.md) + +## SliderComponent.setValue() method + + +**Signature:** + +```typescript +setValue(value: number): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | number | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/showTooltip.md b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/showTooltip.md new file mode 100644 index 0000000000000000000000000000000000000000..c8fd386cf25eb53f926fb528e0cd78042811a690 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/showTooltip.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.SliderComponent.showTooltip.md" +cssclasses: hide-title +--- + + + +[`SliderComponent`](obsidian.SliderComponent.md) › [`showTooltip`](obsidian.SliderComponent.showTooltip.md) + +## SliderComponent.showTooltip() method + + +**Signature:** + +```typescript +showTooltip(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/sliderEl.md b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/sliderEl.md new file mode 100644 index 0000000000000000000000000000000000000000..4bad5e2eee1abb3ef9401658fdf8cf894047bbf4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SliderComponent/sliderEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SliderComponent.sliderEl.md" +cssclasses: hide-title +--- + + + +[`SliderComponent`](obsidian.SliderComponent.md) › [`sliderEl`](obsidian.SliderComponent.sliderEl.md) + +## SliderComponent.sliderEl property + + +**Signature:** + +```typescript +sliderEl: HTMLInputElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SplitDirection.md b/docs/obsidian-developer/Reference/TypeScript API/SplitDirection.md new file mode 100644 index 0000000000000000000000000000000000000000..8ef322bcf07763d351507d6f008110caeaa16fe4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SplitDirection.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SplitDirection.md" +cssclasses: hide-title +--- + + + +[`SplitDirection`](obsidian.SplitDirection.md) + +## SplitDirection type + + +**Signature:** + +```typescript +export type SplitDirection = 'vertical' | 'horizontal'; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Stat.md b/docs/obsidian-developer/Reference/TypeScript API/Stat.md new file mode 100644 index 0000000000000000000000000000000000000000..e107316995e06b490fdcec3fcbdf66fb72f62c7a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Stat.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.Stat.md" +cssclasses: hide-title +--- + + + +[`Stat`](obsidian.Stat.md) + +## Stat interface + + +**Signature:** + +```typescript +export interface Stat +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`ctime`](obsidian.Stat.ctime.md) | | number | Time of creation, represented as a unix timestamp. | +| [`mtime`](obsidian.Stat.mtime.md) | | number | Time of last modification, represented as a unix timestamp. | +| [`size`](obsidian.Stat.size.md) | | number | Size on disk, as bytes. | +| [`type`](obsidian.Stat.type.md) | | 'file' | 'folder' | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Stat/ctime.md b/docs/obsidian-developer/Reference/TypeScript API/Stat/ctime.md new file mode 100644 index 0000000000000000000000000000000000000000..aebe5a737155ff75108e35c6c1966d54d9f8b01f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Stat/ctime.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Stat.ctime.md" +cssclasses: hide-title +--- + + + +[`Stat`](obsidian.Stat.md) › [`ctime`](obsidian.Stat.ctime.md) + +## Stat.ctime property + +Time of creation, represented as a unix timestamp. + +**Signature:** + +```typescript +ctime: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Stat/mtime.md b/docs/obsidian-developer/Reference/TypeScript API/Stat/mtime.md new file mode 100644 index 0000000000000000000000000000000000000000..55f892832d10a8fa8c11f4973e9fcbbf79a20944 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Stat/mtime.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Stat.mtime.md" +cssclasses: hide-title +--- + + + +[`Stat`](obsidian.Stat.md) › [`mtime`](obsidian.Stat.mtime.md) + +## Stat.mtime property + +Time of last modification, represented as a unix timestamp. + +**Signature:** + +```typescript +mtime: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Stat/size.md b/docs/obsidian-developer/Reference/TypeScript API/Stat/size.md new file mode 100644 index 0000000000000000000000000000000000000000..0ca6c10262a86027a652d765d4700f5f25779ce5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Stat/size.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Stat.size.md" +cssclasses: hide-title +--- + + + +[`Stat`](obsidian.Stat.md) › [`size`](obsidian.Stat.size.md) + +## Stat.size property + +Size on disk, as bytes. + +**Signature:** + +```typescript +size: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Stat/type.md b/docs/obsidian-developer/Reference/TypeScript API/Stat/type.md new file mode 100644 index 0000000000000000000000000000000000000000..49f07fe7512eaf67fcd90f50151bebae866979f4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Stat/type.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Stat.type.md" +cssclasses: hide-title +--- + + + +[`Stat`](obsidian.Stat.md) › [`type`](obsidian.Stat.type.md) + +## Stat.type property + + +**Signature:** + +```typescript +type: 'file' | 'folder'; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SubpathResult.md b/docs/obsidian-developer/Reference/TypeScript API/SubpathResult.md new file mode 100644 index 0000000000000000000000000000000000000000..d8bdbe0be4a11c192b9f4f0f79db333cd47d3d2e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SubpathResult.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.SubpathResult.md" +cssclasses: hide-title +--- + + + +[`SubpathResult`](obsidian.SubpathResult.md) + +## SubpathResult interface + + +**Signature:** + +```typescript +export interface SubpathResult +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`end`](obsidian.SubpathResult.end.md) | | [`Loc`](obsidian.Loc.md) | null | | +| [`start`](obsidian.SubpathResult.start.md) | | [`Loc`](obsidian.Loc.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SubpathResult/end.md b/docs/obsidian-developer/Reference/TypeScript API/SubpathResult/end.md new file mode 100644 index 0000000000000000000000000000000000000000..35a257effe8121e1ff5ab2d405b470e9f9ec5a4e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SubpathResult/end.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SubpathResult.end.md" +cssclasses: hide-title +--- + + + +[`SubpathResult`](obsidian.SubpathResult.md) › [`end`](obsidian.SubpathResult.end.md) + +## SubpathResult.end property + + +**Signature:** + +```typescript +end: Loc | null; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SubpathResult/start.md b/docs/obsidian-developer/Reference/TypeScript API/SubpathResult/start.md new file mode 100644 index 0000000000000000000000000000000000000000..a03baba7ae6c9a1a834b35484c6398eac666da8f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SubpathResult/start.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SubpathResult.start.md" +cssclasses: hide-title +--- + + + +[`SubpathResult`](obsidian.SubpathResult.md) › [`start`](obsidian.SubpathResult.start.md) + +## SubpathResult.start property + + +**Signature:** + +```typescript +start: Loc; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal.md new file mode 100644 index 0000000000000000000000000000000000000000..a6de64d7065958313708eeb444c8b1d1e3d8431c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal.md @@ -0,0 +1,48 @@ +--- +aliases: "obsidian.SuggestModal.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) + +## SuggestModal class + + +**Signature:** + +```typescript +export abstract class SuggestModal extends Modal implements ISuggestOwner +``` +**Extends:** [`Modal`](obsidian.Modal.md) + +**Implements:** [`ISuggestOwner`](obsidian.ISuggestOwner.md)`` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(app)`](obsidian.SuggestModal.(constructor).md) | | Constructs a new instance of the SuggestModal class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`emptyStateText`](obsidian.SuggestModal.emptyStateText.md) | | string | | +| [`inputEl`](obsidian.SuggestModal.inputEl.md) | | HTMLInputElement | | +| [`limit`](obsidian.SuggestModal.limit.md) | | number | | +| [`resultContainerEl`](obsidian.SuggestModal.resultContainerEl.md) | | HTMLElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getSuggestions(query)`](obsidian.SuggestModal.getSuggestions.md) | abstract | | +| [`onChooseSuggestion(item, evt)`](obsidian.SuggestModal.onChooseSuggestion.md) | abstract | | +| [`onNoSuggestion()`](obsidian.SuggestModal.onNoSuggestion.md) | | | +| [`renderSuggestion(value, el)`](obsidian.SuggestModal.renderSuggestion.md) | abstract | | +| [`selectSuggestion(value, evt)`](obsidian.SuggestModal.selectSuggestion.md) | | | +| [`setInstructions(instructions)`](obsidian.SuggestModal.setInstructions.md) | | | +| [`setPlaceholder(placeholder)`](obsidian.SuggestModal.setPlaceholder.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..c65e988eb1e881ebb58e09f2f766f674ff6f1bb9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.SuggestModal.(constructor).md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`(constructor)`](obsidian.SuggestModal.(constructor).md) + +## SuggestModal.(constructor) + +Constructs a new instance of the `SuggestModal` class + +**Signature:** + +```typescript +constructor(app: App); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| app | [`App`](obsidian.App.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/emptyStateText.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/emptyStateText.md new file mode 100644 index 0000000000000000000000000000000000000000..d08726c9d71eed237029312d16a7445a2fccadff --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/emptyStateText.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SuggestModal.emptyStateText.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`emptyStateText`](obsidian.SuggestModal.emptyStateText.md) + +## SuggestModal.emptyStateText property + + +**Signature:** + +```typescript +emptyStateText: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/getSuggestions.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/getSuggestions.md new file mode 100644 index 0000000000000000000000000000000000000000..5a1c7dac2c020f27845edc37343120fa87a2d3a5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/getSuggestions.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.SuggestModal.getSuggestions.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`getSuggestions`](obsidian.SuggestModal.getSuggestions.md) + +## SuggestModal.getSuggestions() method + + +**Signature:** + +```typescript +abstract getSuggestions(query: string): T[] | Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| query | string | | + +**Returns:** + +`T[] | ``Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/inputEl.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/inputEl.md new file mode 100644 index 0000000000000000000000000000000000000000..99c2f2e796d1cf82171bfafbf0d4313c91bdf281 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/inputEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SuggestModal.inputEl.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`inputEl`](obsidian.SuggestModal.inputEl.md) + +## SuggestModal.inputEl property + + +**Signature:** + +```typescript +inputEl: HTMLInputElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/limit.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/limit.md new file mode 100644 index 0000000000000000000000000000000000000000..0b522c44b499ef4262619ace9e9a8aa454cb226e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/limit.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SuggestModal.limit.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`limit`](obsidian.SuggestModal.limit.md) + +## SuggestModal.limit property + + +**Signature:** + +```typescript +limit: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/onChooseSuggestion.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/onChooseSuggestion.md new file mode 100644 index 0000000000000000000000000000000000000000..3aa3e397b468f6b854f61c17720c1154665e51d7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/onChooseSuggestion.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.SuggestModal.onChooseSuggestion.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`onChooseSuggestion`](obsidian.SuggestModal.onChooseSuggestion.md) + +## SuggestModal.onChooseSuggestion() method + + +**Signature:** + +```typescript +abstract onChooseSuggestion(item: T, evt: MouseEvent | KeyboardEvent): any; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| item | T | | +| evt | MouseEvent | KeyboardEvent | | + +**Returns:** + +`any` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/onNoSuggestion.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/onNoSuggestion.md new file mode 100644 index 0000000000000000000000000000000000000000..c06c054076dac7cafdeed00a0bccf332e724414b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/onNoSuggestion.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.SuggestModal.onNoSuggestion.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`onNoSuggestion`](obsidian.SuggestModal.onNoSuggestion.md) + +## SuggestModal.onNoSuggestion() method + + +**Signature:** + +```typescript +onNoSuggestion(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/renderSuggestion.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/renderSuggestion.md new file mode 100644 index 0000000000000000000000000000000000000000..88d8c768f701b236111f01091528579d618900f9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/renderSuggestion.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.SuggestModal.renderSuggestion.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`renderSuggestion`](obsidian.SuggestModal.renderSuggestion.md) + +## SuggestModal.renderSuggestion() method + + +**Signature:** + +```typescript +abstract renderSuggestion(value: T, el: HTMLElement): any; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | T | | +| el | HTMLElement | | + +**Returns:** + +`any` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/resultContainerEl.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/resultContainerEl.md new file mode 100644 index 0000000000000000000000000000000000000000..a390f39d17ded0de8ffb1f3ad2977156606f9171 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/resultContainerEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.SuggestModal.resultContainerEl.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`resultContainerEl`](obsidian.SuggestModal.resultContainerEl.md) + +## SuggestModal.resultContainerEl property + + +**Signature:** + +```typescript +resultContainerEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/selectSuggestion.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/selectSuggestion.md new file mode 100644 index 0000000000000000000000000000000000000000..d15485be3acbca9c62dc8ee20b4761765efbfa3d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/selectSuggestion.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.SuggestModal.selectSuggestion.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`selectSuggestion`](obsidian.SuggestModal.selectSuggestion.md) + +## SuggestModal.selectSuggestion() method + + +**Signature:** + +```typescript +selectSuggestion(value: T, evt: MouseEvent | KeyboardEvent): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | T | | +| evt | MouseEvent | KeyboardEvent | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/setInstructions.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/setInstructions.md new file mode 100644 index 0000000000000000000000000000000000000000..66c74bdfe48b66687393ec1a678b89bc80c87e9b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/setInstructions.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.SuggestModal.setInstructions.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`setInstructions`](obsidian.SuggestModal.setInstructions.md) + +## SuggestModal.setInstructions() method + + +**Signature:** + +```typescript +setInstructions(instructions: Instruction[]): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| instructions | [`Instruction`](obsidian.Instruction.md)[] | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/setPlaceholder.md b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/setPlaceholder.md new file mode 100644 index 0000000000000000000000000000000000000000..daa969dd7ead54f704f313eed6510ded63b04e86 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/SuggestModal/setPlaceholder.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.SuggestModal.setPlaceholder.md" +cssclasses: hide-title +--- + + + +[`SuggestModal`](obsidian.SuggestModal.md) › [`setPlaceholder`](obsidian.SuggestModal.setPlaceholder.md) + +## SuggestModal.setPlaceholder() method + + +**Signature:** + +```typescript +setPlaceholder(placeholder: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| placeholder | string | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile.md b/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile.md new file mode 100644 index 0000000000000000000000000000000000000000..22ad9e007387009018721c329b3a3e52a1d4f630 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.TAbstractFile.md" +cssclasses: hide-title +--- + + + +[`TAbstractFile`](obsidian.TAbstractFile.md) + +## TAbstractFile class + +This can be either a `TFile` or a `TFolder`. + +**Signature:** + +```typescript +export abstract class TAbstractFile +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`name`](obsidian.TAbstractFile.name.md) | | string | | +| [`parent`](obsidian.TAbstractFile.parent.md) | | [`TFolder`](obsidian.TFolder.md) | null | | +| [`path`](obsidian.TAbstractFile.path.md) | | string | | +| [`vault`](obsidian.TAbstractFile.vault.md) | | [`Vault`](obsidian.Vault.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/name.md b/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/name.md new file mode 100644 index 0000000000000000000000000000000000000000..2da43c6fe6685ffa3587eb3dab4dd3eaa5377a71 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/name.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TAbstractFile.name.md" +cssclasses: hide-title +--- + + + +[`TAbstractFile`](obsidian.TAbstractFile.md) › [`name`](obsidian.TAbstractFile.name.md) + +## TAbstractFile.name property + + +**Signature:** + +```typescript +name: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/parent.md b/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/parent.md new file mode 100644 index 0000000000000000000000000000000000000000..643600ef58f3d14aef38032dd8228d7ebdf32fe4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/parent.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TAbstractFile.parent.md" +cssclasses: hide-title +--- + + + +[`TAbstractFile`](obsidian.TAbstractFile.md) › [`parent`](obsidian.TAbstractFile.parent.md) + +## TAbstractFile.parent property + + +**Signature:** + +```typescript +parent: TFolder | null; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/path.md b/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/path.md new file mode 100644 index 0000000000000000000000000000000000000000..62e6a7382885405f0c79b8591c8e4d010bd8f1e1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/path.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TAbstractFile.path.md" +cssclasses: hide-title +--- + + + +[`TAbstractFile`](obsidian.TAbstractFile.md) › [`path`](obsidian.TAbstractFile.path.md) + +## TAbstractFile.path property + + +**Signature:** + +```typescript +path: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/vault.md b/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/vault.md new file mode 100644 index 0000000000000000000000000000000000000000..73fc0ab1826ea70977538074813f10027396cc14 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TAbstractFile/vault.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TAbstractFile.vault.md" +cssclasses: hide-title +--- + + + +[`TAbstractFile`](obsidian.TAbstractFile.md) › [`vault`](obsidian.TAbstractFile.vault.md) + +## TAbstractFile.vault property + + +**Signature:** + +```typescript +vault: Vault; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TFile.md b/docs/obsidian-developer/Reference/TypeScript API/TFile.md new file mode 100644 index 0000000000000000000000000000000000000000..cb6aaaa8dbfe1038a65ed41c3802d815fd6a8105 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TFile.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.TFile.md" +cssclasses: hide-title +--- + + + +[`TFile`](obsidian.TFile.md) + +## TFile class + + +**Signature:** + +```typescript +export class TFile extends TAbstractFile +``` +**Extends:** [`TAbstractFile`](obsidian.TAbstractFile.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`basename`](obsidian.TFile.basename.md) | | string | | +| [`extension`](obsidian.TFile.extension.md) | | string | | +| [`stat`](obsidian.TFile.stat.md) | | [`FileStats`](obsidian.FileStats.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TFile/basename.md b/docs/obsidian-developer/Reference/TypeScript API/TFile/basename.md new file mode 100644 index 0000000000000000000000000000000000000000..b29ecf9421a47bfd5267faa208c6ae903a4160ed --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TFile/basename.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TFile.basename.md" +cssclasses: hide-title +--- + + + +[`TFile`](obsidian.TFile.md) › [`basename`](obsidian.TFile.basename.md) + +## TFile.basename property + + +**Signature:** + +```typescript +basename: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TFile/extension.md b/docs/obsidian-developer/Reference/TypeScript API/TFile/extension.md new file mode 100644 index 0000000000000000000000000000000000000000..39314be2c4171531d3d3fdbb02288097a50aa703 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TFile/extension.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TFile.extension.md" +cssclasses: hide-title +--- + + + +[`TFile`](obsidian.TFile.md) › [`extension`](obsidian.TFile.extension.md) + +## TFile.extension property + + +**Signature:** + +```typescript +extension: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TFile/stat.md b/docs/obsidian-developer/Reference/TypeScript API/TFile/stat.md new file mode 100644 index 0000000000000000000000000000000000000000..4631ae3d78dc1a286bb87beba387e2a0bfd2cac4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TFile/stat.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TFile.stat.md" +cssclasses: hide-title +--- + + + +[`TFile`](obsidian.TFile.md) › [`stat`](obsidian.TFile.stat.md) + +## TFile.stat property + + +**Signature:** + +```typescript +stat: FileStats; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TFolder.md b/docs/obsidian-developer/Reference/TypeScript API/TFolder.md new file mode 100644 index 0000000000000000000000000000000000000000..111a3b4ebda2819597960803c92a21836d8c003f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TFolder.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.TFolder.md" +cssclasses: hide-title +--- + + + +[`TFolder`](obsidian.TFolder.md) + +## TFolder class + + +**Signature:** + +```typescript +export class TFolder extends TAbstractFile +``` +**Extends:** [`TAbstractFile`](obsidian.TAbstractFile.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`children`](obsidian.TFolder.children.md) | | [`TAbstractFile`](obsidian.TAbstractFile.md)[] | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`isRoot()`](obsidian.TFolder.isRoot.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TFolder/children.md b/docs/obsidian-developer/Reference/TypeScript API/TFolder/children.md new file mode 100644 index 0000000000000000000000000000000000000000..40304f190316347ae22c3a4e44b56ab8b3a2ed16 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TFolder/children.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TFolder.children.md" +cssclasses: hide-title +--- + + + +[`TFolder`](obsidian.TFolder.md) › [`children`](obsidian.TFolder.children.md) + +## TFolder.children property + + +**Signature:** + +```typescript +children: TAbstractFile[]; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TFolder/isRoot.md b/docs/obsidian-developer/Reference/TypeScript API/TFolder/isRoot.md new file mode 100644 index 0000000000000000000000000000000000000000..650982acf57917bc1972ac7947b3150dc13ee0d0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TFolder/isRoot.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.TFolder.isRoot.md" +cssclasses: hide-title +--- + + + +[`TFolder`](obsidian.TFolder.md) › [`isRoot`](obsidian.TFolder.isRoot.md) + +## TFolder.isRoot() method + + +**Signature:** + +```typescript +isRoot(): boolean; +``` +**Returns:** + +`boolean` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TagCache.md b/docs/obsidian-developer/Reference/TypeScript API/TagCache.md new file mode 100644 index 0000000000000000000000000000000000000000..dba1c3ec8a0b823e0c40353b71df709c42da40ac --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TagCache.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.TagCache.md" +cssclasses: hide-title +--- + + + +[`TagCache`](obsidian.TagCache.md) + +## TagCache interface + + +**Signature:** + +```typescript +export interface TagCache extends CacheItem +``` +**Extends:** [`CacheItem`](obsidian.CacheItem.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`tag`](obsidian.TagCache.tag.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TagCache/tag.md b/docs/obsidian-developer/Reference/TypeScript API/TagCache/tag.md new file mode 100644 index 0000000000000000000000000000000000000000..5289a7143f2e0f4a553b0c0999e5e56dc6543460 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TagCache/tag.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TagCache.tag.md" +cssclasses: hide-title +--- + + + +[`TagCache`](obsidian.TagCache.md) › [`tag`](obsidian.TagCache.tag.md) + +## TagCache.tag property + + +**Signature:** + +```typescript +tag: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Tasks.md b/docs/obsidian-developer/Reference/TypeScript API/Tasks.md new file mode 100644 index 0000000000000000000000000000000000000000..dd858b3bef776a0808c3b8248940b8b2fcd8763c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Tasks.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.Tasks.md" +cssclasses: hide-title +--- + + + +[`Tasks`](obsidian.Tasks.md) + +## Tasks class + + +**Signature:** + +```typescript +export class Tasks +``` + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`add(callback)`](obsidian.Tasks.add.md) | | | +| [`addPromise(promise)`](obsidian.Tasks.addPromise.md) | | | +| [`isEmpty()`](obsidian.Tasks.isEmpty.md) | | | +| [`promise()`](obsidian.Tasks.promise.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Tasks/add.md b/docs/obsidian-developer/Reference/TypeScript API/Tasks/add.md new file mode 100644 index 0000000000000000000000000000000000000000..a3b61c5d40da800693b6951d08da06b571919ce3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Tasks/add.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Tasks.add.md" +cssclasses: hide-title +--- + + + +[`Tasks`](obsidian.Tasks.md) › [`add`](obsidian.Tasks.add.md) + +## Tasks.add() method + + +**Signature:** + +```typescript +add(callback: () => Promise): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | () => Promise<any> | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Tasks/addPromise.md b/docs/obsidian-developer/Reference/TypeScript API/Tasks/addPromise.md new file mode 100644 index 0000000000000000000000000000000000000000..df91bac13acb98d9d80b887414a780e9841f0630 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Tasks/addPromise.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Tasks.addPromise.md" +cssclasses: hide-title +--- + + + +[`Tasks`](obsidian.Tasks.md) › [`addPromise`](obsidian.Tasks.addPromise.md) + +## Tasks.addPromise() method + + +**Signature:** + +```typescript +addPromise(promise: Promise): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| promise | Promise<any> | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Tasks/isEmpty.md b/docs/obsidian-developer/Reference/TypeScript API/Tasks/isEmpty.md new file mode 100644 index 0000000000000000000000000000000000000000..f5c8e80faff88d0bf2ce017523f9e4a0aa6c57fd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Tasks/isEmpty.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Tasks.isEmpty.md" +cssclasses: hide-title +--- + + + +[`Tasks`](obsidian.Tasks.md) › [`isEmpty`](obsidian.Tasks.isEmpty.md) + +## Tasks.isEmpty() method + + +**Signature:** + +```typescript +isEmpty(): boolean; +``` +**Returns:** + +`boolean` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Tasks/promise.md b/docs/obsidian-developer/Reference/TypeScript API/Tasks/promise.md new file mode 100644 index 0000000000000000000000000000000000000000..5530ddc63becad295df239c5c4d9a5ff51878b6f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Tasks/promise.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Tasks.promise.md" +cssclasses: hide-title +--- + + + +[`Tasks`](obsidian.Tasks.md) › [`promise`](obsidian.Tasks.promise.md) + +## Tasks.promise() method + + +**Signature:** + +```typescript +promise(): Promise; +``` +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextAreaComponent.md b/docs/obsidian-developer/Reference/TypeScript API/TextAreaComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..359b5fe13f0507d57c1c328177bcef665dc3e82c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextAreaComponent.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.TextAreaComponent.md" +cssclasses: hide-title +--- + + + +[`TextAreaComponent`](obsidian.TextAreaComponent.md) + +## TextAreaComponent class + + +**Signature:** + +```typescript +export class TextAreaComponent extends AbstractTextComponent +``` +**Extends:** [`AbstractTextComponent`](obsidian.AbstractTextComponent.md)`<``HTMLTextAreaElement``>` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.TextAreaComponent.(constructor).md) | | Constructs a new instance of the TextAreaComponent class | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextAreaComponent/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/TextAreaComponent/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..93c8044aa912a3ff1fd98108d47162b560514f34 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextAreaComponent/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.TextAreaComponent.(constructor).md" +cssclasses: hide-title +--- + + + +[`TextAreaComponent`](obsidian.TextAreaComponent.md) › [`(constructor)`](obsidian.TextAreaComponent.(constructor).md) + +## TextAreaComponent.(constructor) + +Constructs a new instance of the `TextAreaComponent` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextComponent.md b/docs/obsidian-developer/Reference/TypeScript API/TextComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..27d1e1f388fb70dfd501be65dde9ea1bc07b459c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextComponent.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.TextComponent.md" +cssclasses: hide-title +--- + + + +[`TextComponent`](obsidian.TextComponent.md) + +## TextComponent class + + +**Signature:** + +```typescript +export class TextComponent extends AbstractTextComponent +``` +**Extends:** [`AbstractTextComponent`](obsidian.AbstractTextComponent.md)`<``HTMLInputElement``>` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.TextComponent.(constructor).md) | | Constructs a new instance of the TextComponent class | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextComponent/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/TextComponent/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..2ba924f2cf9ca2c92b540e155c9f3160d450a866 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextComponent/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.TextComponent.(constructor).md" +cssclasses: hide-title +--- + + + +[`TextComponent`](obsidian.TextComponent.md) › [`(constructor)`](obsidian.TextComponent.(constructor).md) + +## TextComponent.(constructor) + +Constructs a new instance of the `TextComponent` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextFileView.md b/docs/obsidian-developer/Reference/TypeScript API/TextFileView.md new file mode 100644 index 0000000000000000000000000000000000000000..68cead7bd77a03c6453d1955b338969902e7a8d8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextFileView.md @@ -0,0 +1,46 @@ +--- +aliases: "obsidian.TextFileView.md" +cssclasses: hide-title +--- + + + +[`TextFileView`](obsidian.TextFileView.md) + +## TextFileView class + +This class implements a plaintext-based editable file view, which can be loaded and saved given an editor. + +Note that by default, this view only saves when it's closing. To implement auto-save, your editor should call `this.requestSave()` when the content is changed. + +**Signature:** + +```typescript +export abstract class TextFileView extends EditableFileView +``` +**Extends:** [`EditableFileView`](obsidian.EditableFileView.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(leaf)`](obsidian.TextFileView.(constructor).md) | | Constructs a new instance of the TextFileView class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`data`](obsidian.TextFileView.data.md) | | string | In memory data | +| [`requestSave`](obsidian.TextFileView.requestSave.md) | | () => void | Debounced save in 2 seconds from now | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`clear()`](obsidian.TextFileView.clear.md) | abstract | Clear the editor. This is usually called when we're about to open a completely different file, so it's best to clear any editor states like undo-redo history, and any caches/indexes associated with the previous file contents. | +| [`getViewData()`](obsidian.TextFileView.getViewData.md) | abstract | Gets the data from the editor. This will be called to save the editor contents to the file. | +| [`onLoadFile(file)`](obsidian.TextFileView.onLoadFile.md) | | | +| [`onUnloadFile(file)`](obsidian.TextFileView.onUnloadFile.md) | | | +| [`save(clear)`](obsidian.TextFileView.save.md) | | | +| [`setViewData(data, clear)`](obsidian.TextFileView.setViewData.md) | abstract |

Set the data to the editor. This is used to load the file contents.

If clear is set, then it means we're opening a completely different file. In that case, you should call clear(), or implement a slightly more efficient clearing mechanism given the new data to be set.

| + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextFileView/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..67c9cec20f97c361e9fd5d632685617d245f166f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.TextFileView.(constructor).md" +cssclasses: hide-title +--- + + + +[`TextFileView`](obsidian.TextFileView.md) › [`(constructor)`](obsidian.TextFileView.(constructor).md) + +## TextFileView.(constructor) + +Constructs a new instance of the `TextFileView` class + +**Signature:** + +```typescript +constructor(leaf: WorkspaceLeaf); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextFileView/clear.md b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/clear.md new file mode 100644 index 0000000000000000000000000000000000000000..ccb44c36a598281558b0c6de97a534797503d89b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/clear.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.TextFileView.clear.md" +cssclasses: hide-title +--- + + + +[`TextFileView`](obsidian.TextFileView.md) › [`clear`](obsidian.TextFileView.clear.md) + +## TextFileView.clear() method + +Clear the editor. This is usually called when we're about to open a completely different file, so it's best to clear any editor states like undo-redo history, and any caches/indexes associated with the previous file contents. + +**Signature:** + +```typescript +abstract clear(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextFileView/data.md b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/data.md new file mode 100644 index 0000000000000000000000000000000000000000..44cd8701e4f978d721263901a18922a14b6a3bd6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/data.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.TextFileView.data.md" +cssclasses: hide-title +--- + + + +[`TextFileView`](obsidian.TextFileView.md) › [`data`](obsidian.TextFileView.data.md) + +## TextFileView.data property + +In memory data + +**Signature:** + +```typescript +data: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextFileView/getViewData.md b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/getViewData.md new file mode 100644 index 0000000000000000000000000000000000000000..004f72e5f5b82806b0247fac90563b6d180dd87f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/getViewData.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.TextFileView.getViewData.md" +cssclasses: hide-title +--- + + + +[`TextFileView`](obsidian.TextFileView.md) › [`getViewData`](obsidian.TextFileView.getViewData.md) + +## TextFileView.getViewData() method + +Gets the data from the editor. This will be called to save the editor contents to the file. + +**Signature:** + +```typescript +abstract getViewData(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextFileView/onLoadFile.md b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/onLoadFile.md new file mode 100644 index 0000000000000000000000000000000000000000..7fc1e06d3eea6d105b562519ae082a1080fc5231 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/onLoadFile.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.TextFileView.onLoadFile.md" +cssclasses: hide-title +--- + + + +[`TextFileView`](obsidian.TextFileView.md) › [`onLoadFile`](obsidian.TextFileView.onLoadFile.md) + +## TextFileView.onLoadFile() method + + +**Signature:** + +```typescript +onLoadFile(file: TFile): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextFileView/onUnloadFile.md b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/onUnloadFile.md new file mode 100644 index 0000000000000000000000000000000000000000..646078cac5ed68ba98b3a932f9f2f12694614c27 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/onUnloadFile.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.TextFileView.onUnloadFile.md" +cssclasses: hide-title +--- + + + +[`TextFileView`](obsidian.TextFileView.md) › [`onUnloadFile`](obsidian.TextFileView.onUnloadFile.md) + +## TextFileView.onUnloadFile() method + + +**Signature:** + +```typescript +onUnloadFile(file: TFile): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextFileView/requestSave.md b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/requestSave.md new file mode 100644 index 0000000000000000000000000000000000000000..128169873985b6ff2bad0c450fa51283dd263305 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/requestSave.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.TextFileView.requestSave.md" +cssclasses: hide-title +--- + + + +[`TextFileView`](obsidian.TextFileView.md) › [`requestSave`](obsidian.TextFileView.requestSave.md) + +## TextFileView.requestSave property + +Debounced save in 2 seconds from now + +**Signature:** + +```typescript +requestSave: () => void; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextFileView/save.md b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/save.md new file mode 100644 index 0000000000000000000000000000000000000000..26d7b2009f9cb1b34a31edaac233fdf680933e06 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/save.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.TextFileView.save.md" +cssclasses: hide-title +--- + + + +[`TextFileView`](obsidian.TextFileView.md) › [`save`](obsidian.TextFileView.save.md) + +## TextFileView.save() method + + +**Signature:** + +```typescript +save(clear?: boolean): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| clear | boolean | _(Optional)_ | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TextFileView/setViewData.md b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/setViewData.md new file mode 100644 index 0000000000000000000000000000000000000000..3b37f911b048b8f69a5e1daff98b07da9f5e5624 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TextFileView/setViewData.md @@ -0,0 +1,32 @@ +--- +aliases: "obsidian.TextFileView.setViewData.md" +cssclasses: hide-title +--- + + + +[`TextFileView`](obsidian.TextFileView.md) › [`setViewData`](obsidian.TextFileView.setViewData.md) + +## TextFileView.setViewData() method + +Set the data to the editor. This is used to load the file contents. + +If clear is set, then it means we're opening a completely different file. In that case, you should call clear(), or implement a slightly more efficient clearing mechanism given the new data to be set. + +**Signature:** + +```typescript +abstract setViewData(data: string, clear: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| data | string | | +| clear | boolean | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent.md b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..4c97642bbdb164fdbae877469fe299c0cd88825d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent.md @@ -0,0 +1,42 @@ +--- +aliases: "obsidian.ToggleComponent.md" +cssclasses: hide-title +--- + + + +[`ToggleComponent`](obsidian.ToggleComponent.md) + +## ToggleComponent class + + +**Signature:** + +```typescript +export class ToggleComponent extends ValueComponent +``` +**Extends:** [`ValueComponent`](obsidian.ValueComponent.md)`` + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(containerEl)`](obsidian.ToggleComponent.(constructor).md) | | Constructs a new instance of the ToggleComponent class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`toggleEl`](obsidian.ToggleComponent.toggleEl.md) | | HTMLElement | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getValue()`](obsidian.ToggleComponent.getValue.md) | | | +| [`onChange(callback)`](obsidian.ToggleComponent.onChange.md) | | | +| [`onClick()`](obsidian.ToggleComponent.onClick.md) | | | +| [`setDisabled(disabled)`](obsidian.ToggleComponent.setDisabled.md) | | | +| [`setTooltip(tooltip, options)`](obsidian.ToggleComponent.setTooltip.md) | | | +| [`setValue(on)`](obsidian.ToggleComponent.setValue.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..90bb42db1a2e6c4ce090eb8dc4e22d6704bf7250 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.ToggleComponent.(constructor).md" +cssclasses: hide-title +--- + + + +[`ToggleComponent`](obsidian.ToggleComponent.md) › [`(constructor)`](obsidian.ToggleComponent.(constructor).md) + +## ToggleComponent.(constructor) + +Constructs a new instance of the `ToggleComponent` class + +**Signature:** + +```typescript +constructor(containerEl: HTMLElement); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| containerEl | HTMLElement | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/getValue.md b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/getValue.md new file mode 100644 index 0000000000000000000000000000000000000000..766b21ee38ab87a0353e600064b1aeff6ef9ca65 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/getValue.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.ToggleComponent.getValue.md" +cssclasses: hide-title +--- + + + +[`ToggleComponent`](obsidian.ToggleComponent.md) › [`getValue`](obsidian.ToggleComponent.getValue.md) + +## ToggleComponent.getValue() method + + +**Signature:** + +```typescript +getValue(): boolean; +``` +**Returns:** + +`boolean` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/onChange.md b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/onChange.md new file mode 100644 index 0000000000000000000000000000000000000000..74dd8770fb2cbe9204fa4620a943c382dbf3e64a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/onChange.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ToggleComponent.onChange.md" +cssclasses: hide-title +--- + + + +[`ToggleComponent`](obsidian.ToggleComponent.md) › [`onChange`](obsidian.ToggleComponent.onChange.md) + +## ToggleComponent.onChange() method + + +**Signature:** + +```typescript +onChange(callback: (value: boolean) => any): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (value: boolean) => any | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/onClick.md b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/onClick.md new file mode 100644 index 0000000000000000000000000000000000000000..f4673ef321165df213ac27b57527fc0d40fedcdc --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/onClick.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.ToggleComponent.onClick.md" +cssclasses: hide-title +--- + + + +[`ToggleComponent`](obsidian.ToggleComponent.md) › [`onClick`](obsidian.ToggleComponent.onClick.md) + +## ToggleComponent.onClick() method + + +**Signature:** + +```typescript +onClick(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/setDisabled.md b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/setDisabled.md new file mode 100644 index 0000000000000000000000000000000000000000..d04e72b846e319bd4a9ba7087e7e63433d5f8d81 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/setDisabled.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ToggleComponent.setDisabled.md" +cssclasses: hide-title +--- + + + +[`ToggleComponent`](obsidian.ToggleComponent.md) › [`setDisabled`](obsidian.ToggleComponent.setDisabled.md) + +## ToggleComponent.setDisabled() method + + +**Signature:** + +```typescript +setDisabled(disabled: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| disabled | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/setTooltip.md b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/setTooltip.md new file mode 100644 index 0000000000000000000000000000000000000000..8be69a6e956e0850fa82cd1476a779aa18a62e9b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/setTooltip.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.ToggleComponent.setTooltip.md" +cssclasses: hide-title +--- + + + +[`ToggleComponent`](obsidian.ToggleComponent.md) › [`setTooltip`](obsidian.ToggleComponent.setTooltip.md) + +## ToggleComponent.setTooltip() method + + +**Signature:** + +```typescript +setTooltip(tooltip: string, options?: TooltipOptions): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| tooltip | string | | +| options | [`TooltipOptions`](obsidian.TooltipOptions.md) | _(Optional)_ | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/setValue.md b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/setValue.md new file mode 100644 index 0000000000000000000000000000000000000000..b840a62983cf772790da6f62f3505799e071b21f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/setValue.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ToggleComponent.setValue.md" +cssclasses: hide-title +--- + + + +[`ToggleComponent`](obsidian.ToggleComponent.md) › [`setValue`](obsidian.ToggleComponent.setValue.md) + +## ToggleComponent.setValue() method + + +**Signature:** + +```typescript +setValue(on: boolean): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| on | boolean | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/toggleEl.md b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/toggleEl.md new file mode 100644 index 0000000000000000000000000000000000000000..68ec6d3f08d008b459ae7ec38ad96c12ff5036b4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ToggleComponent/toggleEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ToggleComponent.toggleEl.md" +cssclasses: hide-title +--- + + + +[`ToggleComponent`](obsidian.ToggleComponent.md) › [`toggleEl`](obsidian.ToggleComponent.toggleEl.md) + +## ToggleComponent.toggleEl property + + +**Signature:** + +```typescript +toggleEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TooltipOptions.md b/docs/obsidian-developer/Reference/TypeScript API/TooltipOptions.md new file mode 100644 index 0000000000000000000000000000000000000000..63ad4a69615df50b24b6d8c98808c54187a1b4a2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TooltipOptions.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.TooltipOptions.md" +cssclasses: hide-title +--- + + + +[`TooltipOptions`](obsidian.TooltipOptions.md) + +## TooltipOptions interface + + +**Signature:** + +```typescript +export interface TooltipOptions +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`delay?`](obsidian.TooltipOptions.delay.md) | | number | _(Optional)_ | +| [`placement?`](obsidian.TooltipOptions.placement.md) | | [`TooltipPlacement`](obsidian.TooltipPlacement.md) | _(Optional)_ | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/TooltipOptions/delay.md b/docs/obsidian-developer/Reference/TypeScript API/TooltipOptions/delay.md new file mode 100644 index 0000000000000000000000000000000000000000..45987098c0aeaead98e4fbd693063b9189ed518e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TooltipOptions/delay.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TooltipOptions.delay.md" +cssclasses: hide-title +--- + + + +[`TooltipOptions`](obsidian.TooltipOptions.md) › [`delay`](obsidian.TooltipOptions.delay.md) + +## TooltipOptions.delay property + + +**Signature:** + +```typescript +delay?: number; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TooltipOptions/placement.md b/docs/obsidian-developer/Reference/TypeScript API/TooltipOptions/placement.md new file mode 100644 index 0000000000000000000000000000000000000000..043774d598a2bf24010a7444c096b40c239a92d8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TooltipOptions/placement.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TooltipOptions.placement.md" +cssclasses: hide-title +--- + + + +[`TooltipOptions`](obsidian.TooltipOptions.md) › [`placement`](obsidian.TooltipOptions.placement.md) + +## TooltipOptions.placement property + + +**Signature:** + +```typescript +placement?: TooltipPlacement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/TooltipPlacement.md b/docs/obsidian-developer/Reference/TypeScript API/TooltipPlacement.md new file mode 100644 index 0000000000000000000000000000000000000000..890ae4e12015e07b8a96675cf383cf512a1c37aa --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/TooltipPlacement.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.TooltipPlacement.md" +cssclasses: hide-title +--- + + + +[`TooltipPlacement`](obsidian.TooltipPlacement.md) + +## TooltipPlacement type + + +**Signature:** + +```typescript +export type TooltipPlacement = 'bottom' | 'right' | 'left' | 'top'; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/UserEvent.md b/docs/obsidian-developer/Reference/TypeScript API/UserEvent.md new file mode 100644 index 0000000000000000000000000000000000000000..8b29f378ba3062d7e9601b1b743c8e67af1afc6f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/UserEvent.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.UserEvent.md" +cssclasses: hide-title +--- + + + +[`UserEvent`](obsidian.UserEvent.md) + +## UserEvent type + + +**Signature:** + +```typescript +export type UserEvent = MouseEvent | KeyboardEvent | TouchEvent | PointerEvent; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ValueComponent.md b/docs/obsidian-developer/Reference/TypeScript API/ValueComponent.md new file mode 100644 index 0000000000000000000000000000000000000000..1e2fd4f2999914aae31fb60d9130796aa45cf4e1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ValueComponent.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.ValueComponent.md" +cssclasses: hide-title +--- + + + +[`ValueComponent`](obsidian.ValueComponent.md) + +## ValueComponent class + + +**Signature:** + +```typescript +export abstract class ValueComponent extends BaseComponent +``` +**Extends:** [`BaseComponent`](obsidian.BaseComponent.md) + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getValue()`](obsidian.ValueComponent.getValue.md) | abstract | | +| [`registerOptionListener(listeners, key)`](obsidian.ValueComponent.registerOptionListener.md) | | | +| [`setValue(value)`](obsidian.ValueComponent.setValue.md) | abstract | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ValueComponent/getValue.md b/docs/obsidian-developer/Reference/TypeScript API/ValueComponent/getValue.md new file mode 100644 index 0000000000000000000000000000000000000000..38e6a185c6bada06996becd737a38d958b905574 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ValueComponent/getValue.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.ValueComponent.getValue.md" +cssclasses: hide-title +--- + + + +[`ValueComponent`](obsidian.ValueComponent.md) › [`getValue`](obsidian.ValueComponent.getValue.md) + +## ValueComponent.getValue() method + + +**Signature:** + +```typescript +abstract getValue(): T; +``` +**Returns:** + +`T` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ValueComponent/registerOptionListener.md b/docs/obsidian-developer/Reference/TypeScript API/ValueComponent/registerOptionListener.md new file mode 100644 index 0000000000000000000000000000000000000000..105f1f1a68d622895e667c40a8c3368af699e05e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ValueComponent/registerOptionListener.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.ValueComponent.registerOptionListener.md" +cssclasses: hide-title +--- + + + +[`ValueComponent`](obsidian.ValueComponent.md) › [`registerOptionListener`](obsidian.ValueComponent.registerOptionListener.md) + +## ValueComponent.registerOptionListener() method + + +**Signature:** + +```typescript +registerOptionListener(listeners: Record T>, key: string): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| listeners | Record<string, (value?: T) => T> | | +| key | string | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ValueComponent/setValue.md b/docs/obsidian-developer/Reference/TypeScript API/ValueComponent/setValue.md new file mode 100644 index 0000000000000000000000000000000000000000..b9237f2a3cb675397debb5f2848daaf39c100b57 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ValueComponent/setValue.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ValueComponent.setValue.md" +cssclasses: hide-title +--- + + + +[`ValueComponent`](obsidian.ValueComponent.md) › [`setValue`](obsidian.ValueComponent.setValue.md) + +## ValueComponent.setValue() method + + +**Signature:** + +```typescript +abstract setValue(value: T): this; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| value | T | | + +**Returns:** + +`this` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault.md b/docs/obsidian-developer/Reference/TypeScript API/Vault.md new file mode 100644 index 0000000000000000000000000000000000000000..9ebd0c8b30319010152b7660975534a25fd7b475 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault.md @@ -0,0 +1,58 @@ +--- +aliases: "obsidian.Vault.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) + +## Vault class + +Work with files and folders stored inside a vault. + +**Signature:** + +```typescript +export class Vault extends Events +``` +**Extends:** [`Events`](obsidian.Events.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`adapter`](obsidian.Vault.adapter.md) | | [`DataAdapter`](obsidian.DataAdapter.md) | | +| [`configDir`](obsidian.Vault.configDir.md) | | string | Gets the path to the config folder. This value is typically .obsidian but it could be different. | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`append(file, data, options)`](obsidian.Vault.append.md) | | Add text to the end of a plaintext file inside the vault. | +| [`cachedRead(file)`](obsidian.Vault.cachedRead.md) | | Read the content of a plaintext file stored inside the vault Use this if you only want to display the content to the user. If you want to modify the file content afterward use [Vault.read()](obsidian.Vault.read.md) | +| [`copy(file, newPath)`](obsidian.Vault.copy.md) | | Create a copy of the selected file. | +| [`create(path, data, options)`](obsidian.Vault.create.md) | | Create a new plaintext file inside the vault. | +| [`createBinary(path, data, options)`](obsidian.Vault.createBinary.md) | | Create a new binary file inside the vault. | +| [`createFolder(path)`](obsidian.Vault.createFolder.md) | | Create a new folder inside the vault. | +| [`delete(file, force)`](obsidian.Vault.delete.md) | | Deletes the file completely. | +| [`getAbstractFileByPath(path)`](obsidian.Vault.getAbstractFileByPath.md) | | Get a file or folder inside the vault. If you need a file, you should test the returned object with instanceof TFile. Otherwise, if you need a folder, you should test it with instanceof TFolder. | +| [`getAllLoadedFiles()`](obsidian.Vault.getAllLoadedFiles.md) | | Get all files and folders in the vault. | +| [`getFiles()`](obsidian.Vault.getFiles.md) | | Get all files in the vault. | +| [`getMarkdownFiles()`](obsidian.Vault.getMarkdownFiles.md) | | Get all markdown files in the vault. | +| [`getName()`](obsidian.Vault.getName.md) | | Gets the name of the vault. | +| [`getResourcePath(file)`](obsidian.Vault.getResourcePath.md) | | Returns an URI for the browser engine to use, for example to embed an image. | +| [`getRoot()`](obsidian.Vault.getRoot.md) | | Get the root folder of the current vault. | +| [`modify(file, data, options)`](obsidian.Vault.modify.md) | | Modify the contents of a plaintext file. | +| [`modifyBinary(file, data, options)`](obsidian.Vault.modifyBinary.md) | | Modify the contents of a binary file. | +| [`on(name, callback, ctx)`](obsidian.Vault.on.md) | | Called when a file is created. This is also called when the vault is first loaded for each existing file If you do not wish to receive create events on vault load, register your event handler inside [Workspace.onLayoutReady()](obsidian.Workspace.onLayoutReady.md). | +| [`on(name, callback, ctx)`](obsidian.Vault.on_1.md) | | Called when a file is modified. | +| [`on(name, callback, ctx)`](obsidian.Vault.on_2.md) | | Called when a file is deleted. | +| [`on(name, callback, ctx)`](obsidian.Vault.on_3.md) | | Called when a file is renamed. | +| [`process(file, fn, options)`](obsidian.Vault.process.md) | | Atomically read, modify, and save the contents of a note. | +| [`read(file)`](obsidian.Vault.read.md) | | Read a plaintext file that is stored inside the vault, directly from disk. Use this if you intend to modify the file content afterwards. Use [Vault.cachedRead()](obsidian.Vault.cachedRead.md) otherwise for better performance. | +| [`readBinary(file)`](obsidian.Vault.readBinary.md) | | Read the content of a binary file stored inside the vault. | +| [`recurseChildren(root, cb)`](obsidian.Vault.recurseChildren.md) | static | | +| [`rename(file, newPath)`](obsidian.Vault.rename.md) | | Rename or move a file. | +| [`trash(file, system)`](obsidian.Vault.trash.md) | | Tries to move to system trash. If that isn't successful/allowed, use local trash | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/adapter.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/adapter.md new file mode 100644 index 0000000000000000000000000000000000000000..45c25bbb996d9a1b7a1d3bbe2c2ebd0df44d59e9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/adapter.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Vault.adapter.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`adapter`](obsidian.Vault.adapter.md) + +## Vault.adapter property + + +**Signature:** + +```typescript +adapter: DataAdapter; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/append.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/append.md new file mode 100644 index 0000000000000000000000000000000000000000..28caf59b138271acf8dcc8f2c8a549609b83ba4e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/append.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Vault.append.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`append`](obsidian.Vault.append.md) + +## Vault.append() method + +Add text to the end of a plaintext file inside the vault. + +**Signature:** + +```typescript +append(file: TFile, data: string, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | The file | +| data | string | the text to add | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ (Optional) | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/cachedRead.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/cachedRead.md new file mode 100644 index 0000000000000000000000000000000000000000..e514f04d2eae419a3e43f5c12cca005e2680e049 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/cachedRead.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Vault.cachedRead.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`cachedRead`](obsidian.Vault.cachedRead.md) + +## Vault.cachedRead() method + +Read the content of a plaintext file stored inside the vault Use this if you only want to display the content to the user. If you want to modify the file content afterward use [Vault.read()](obsidian.Vault.read.md) + +**Signature:** + +```typescript +cachedRead(file: TFile): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/configDir.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/configDir.md new file mode 100644 index 0000000000000000000000000000000000000000..98c9dd623e05143c9f465284bdbb36a51aa99287 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/configDir.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Vault.configDir.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`configDir`](obsidian.Vault.configDir.md) + +## Vault.configDir property + +Gets the path to the config folder. This value is typically `.obsidian` but it could be different. + +**Signature:** + +```typescript +configDir: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/copy.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/copy.md new file mode 100644 index 0000000000000000000000000000000000000000..6e60c31c05e84fbe6563da87843323abc19a4026 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/copy.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Vault.copy.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`copy`](obsidian.Vault.copy.md) + +## Vault.copy() method + +Create a copy of the selected file. + +**Signature:** + +```typescript +copy(file: TFile, newPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | The file | +| newPath | string | Vault absolute path for the new copy. | + +**Returns:** + +`Promise``<`[`TFile`](obsidian.TFile.md)`>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/create.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/create.md new file mode 100644 index 0000000000000000000000000000000000000000..ab2eb660b014115e7738636009049fdd5af6c006 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/create.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Vault.create.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`create`](obsidian.Vault.create.md) + +## Vault.create() method + +Create a new plaintext file inside the vault. + +**Signature:** + +```typescript +create(path: string, data: string, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| path | string | Vault absolute path for the new file, with extension. | +| data | string | text content for the new file. | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ (Optional) | + +**Returns:** + +`Promise``<`[`TFile`](obsidian.TFile.md)`>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/createBinary.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/createBinary.md new file mode 100644 index 0000000000000000000000000000000000000000..11dd29b08ced02cf0e0d5be937c8a9280eeb1efd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/createBinary.md @@ -0,0 +1,35 @@ +--- +aliases: "obsidian.Vault.createBinary.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`createBinary`](obsidian.Vault.createBinary.md) + +## Vault.createBinary() method + +Create a new binary file inside the vault. + +**Signature:** + +```typescript +createBinary(path: string, data: ArrayBuffer, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| path | string | Vault absolute path for the new file, with extension. | +| data | ArrayBuffer | content for the new file. | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ (Optional) | + +**Returns:** + +`Promise``<`[`TFile`](obsidian.TFile.md)`>` + +## Exceptions + +Error if file already exists + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/createFolder.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/createFolder.md new file mode 100644 index 0000000000000000000000000000000000000000..90c5fc500fca825fb7d472b3e9f0f0cda4225357 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/createFolder.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.Vault.createFolder.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`createFolder`](obsidian.Vault.createFolder.md) + +## Vault.createFolder() method + +Create a new folder inside the vault. + +**Signature:** + +```typescript +createFolder(path: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| path | string | Vault absolute path for the new folder. | + +**Returns:** + +`Promise``<`[`TFolder`](obsidian.TFolder.md)`>` + +## Exceptions + +Error if folder already exists + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/delete.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/delete.md new file mode 100644 index 0000000000000000000000000000000000000000..efe59658be3464830014c22e8d40faa4d842e2da --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/delete.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Vault.delete.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`delete`](obsidian.Vault.delete.md) + +## Vault.delete() method + +Deletes the file completely. + +**Signature:** + +```typescript +delete(file: TAbstractFile, force?: boolean): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TAbstractFile`](obsidian.TAbstractFile.md) | The file or folder to be deleted | +| force | boolean | _(Optional)_ Should attempt to delete folder even if it has hidden children | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/getAbstractFileByPath.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/getAbstractFileByPath.md new file mode 100644 index 0000000000000000000000000000000000000000..a83de9aab14b2883643e451f8d6adf56b5e237a9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/getAbstractFileByPath.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Vault.getAbstractFileByPath.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`getAbstractFileByPath`](obsidian.Vault.getAbstractFileByPath.md) + +## Vault.getAbstractFileByPath() method + +Get a file or folder inside the vault. If you need a file, you should test the returned object with `instanceof TFile`. Otherwise, if you need a folder, you should test it with `instanceof TFolder`. + +**Signature:** + +```typescript +getAbstractFileByPath(path: string): TAbstractFile | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| path | string | vault absolute path to the folder or file, with extension, case sensitive. | + +**Returns:** + +[`TAbstractFile`](obsidian.TAbstractFile.md)` | null` + +the abstract file, if it's found. + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/getAllLoadedFiles.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/getAllLoadedFiles.md new file mode 100644 index 0000000000000000000000000000000000000000..a5a41c66840028f2bddf1f921679f77c7fbbb402 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/getAllLoadedFiles.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Vault.getAllLoadedFiles.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`getAllLoadedFiles`](obsidian.Vault.getAllLoadedFiles.md) + +## Vault.getAllLoadedFiles() method + +Get all files and folders in the vault. + +**Signature:** + +```typescript +getAllLoadedFiles(): TAbstractFile[]; +``` +**Returns:** + +[`TAbstractFile`](obsidian.TAbstractFile.md)`[]` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/getFiles.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/getFiles.md new file mode 100644 index 0000000000000000000000000000000000000000..73af6357372a6c2775032618252393bbe451dbb6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/getFiles.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Vault.getFiles.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`getFiles`](obsidian.Vault.getFiles.md) + +## Vault.getFiles() method + +Get all files in the vault. + +**Signature:** + +```typescript +getFiles(): TFile[]; +``` +**Returns:** + +[`TFile`](obsidian.TFile.md)`[]` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/getMarkdownFiles.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/getMarkdownFiles.md new file mode 100644 index 0000000000000000000000000000000000000000..f406de4f2095e10a148083ec5b5f92061c541b88 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/getMarkdownFiles.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Vault.getMarkdownFiles.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`getMarkdownFiles`](obsidian.Vault.getMarkdownFiles.md) + +## Vault.getMarkdownFiles() method + +Get all markdown files in the vault. + +**Signature:** + +```typescript +getMarkdownFiles(): TFile[]; +``` +**Returns:** + +[`TFile`](obsidian.TFile.md)`[]` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/getName.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/getName.md new file mode 100644 index 0000000000000000000000000000000000000000..2f38c3c6ce9e190d78cc317e026415049e3f4fd9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/getName.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Vault.getName.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`getName`](obsidian.Vault.getName.md) + +## Vault.getName() method + +Gets the name of the vault. + +**Signature:** + +```typescript +getName(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/getResourcePath.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/getResourcePath.md new file mode 100644 index 0000000000000000000000000000000000000000..ee16fcd9301219102289b68988a9ef8f13534cbf --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/getResourcePath.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Vault.getResourcePath.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`getResourcePath`](obsidian.Vault.getResourcePath.md) + +## Vault.getResourcePath() method + +Returns an URI for the browser engine to use, for example to embed an image. + +**Signature:** + +```typescript +getResourcePath(file: TFile): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/getRoot.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/getRoot.md new file mode 100644 index 0000000000000000000000000000000000000000..f041384ef0708983019dd328073eeaedb2fa7597 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/getRoot.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Vault.getRoot.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`getRoot`](obsidian.Vault.getRoot.md) + +## Vault.getRoot() method + +Get the root folder of the current vault. + +**Signature:** + +```typescript +getRoot(): TFolder; +``` +**Returns:** + +[`TFolder`](obsidian.TFolder.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/modify.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/modify.md new file mode 100644 index 0000000000000000000000000000000000000000..87b89583b5bb70ed1a53b58af8fcb8103c6238de --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/modify.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Vault.modify.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`modify`](obsidian.Vault.modify.md) + +## Vault.modify() method + +Modify the contents of a plaintext file. + +**Signature:** + +```typescript +modify(file: TFile, data: string, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | The file | +| data | string | The new file content | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ (Optional) | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/modifyBinary.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/modifyBinary.md new file mode 100644 index 0000000000000000000000000000000000000000..1b84566363822e6cf97b7429e1d7e8c4fdab1c62 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/modifyBinary.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Vault.modifyBinary.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`modifyBinary`](obsidian.Vault.modifyBinary.md) + +## Vault.modifyBinary() method + +Modify the contents of a binary file. + +**Signature:** + +```typescript +modifyBinary(file: TFile, data: ArrayBuffer, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | The file | +| data | ArrayBuffer | The new file content | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ (Optional) | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/on.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/on.md new file mode 100644 index 0000000000000000000000000000000000000000..c09c8529dd879c540ea91902f55ec99f3e0f12ec --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/on.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Vault.on.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`on`](obsidian.Vault.on.md) + +## Vault.on() method + +Called when a file is created. This is also called when the vault is first loaded for each existing file If you do not wish to receive create events on vault load, register your event handler inside [Workspace.onLayoutReady()](obsidian.Workspace.onLayoutReady.md). + +**Signature:** + +```typescript +on(name: 'create', callback: (file: TAbstractFile) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'create' | | +| callback | (file: [`TAbstractFile`](obsidian.TAbstractFile.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/on_1.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/on_1.md new file mode 100644 index 0000000000000000000000000000000000000000..61322f0dfb07a9baf04319ee099f9a88fc5002d6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/on_1.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Vault.on_1.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`on`](obsidian.Vault.on_1.md) + +## Vault.on() method + +Called when a file is modified. + +**Signature:** + +```typescript +on(name: 'modify', callback: (file: TAbstractFile) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'modify' | | +| callback | (file: [`TAbstractFile`](obsidian.TAbstractFile.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/on_2.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/on_2.md new file mode 100644 index 0000000000000000000000000000000000000000..70602ca9ec5038338dd380056f8267c98e63ba85 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/on_2.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Vault.on_2.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`on`](obsidian.Vault.on_2.md) + +## Vault.on() method + +Called when a file is deleted. + +**Signature:** + +```typescript +on(name: 'delete', callback: (file: TAbstractFile) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'delete' | | +| callback | (file: [`TAbstractFile`](obsidian.TAbstractFile.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/on_3.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/on_3.md new file mode 100644 index 0000000000000000000000000000000000000000..66d941755d20bcdb62f17fd41a6550afeee47eef --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/on_3.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Vault.on_3.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`on`](obsidian.Vault.on_3.md) + +## Vault.on() method + +Called when a file is renamed. + +**Signature:** + +```typescript +on(name: 'rename', callback: (file: TAbstractFile, oldPath: string) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'rename' | | +| callback | (file: [`TAbstractFile`](obsidian.TAbstractFile.md), oldPath: string) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/process.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/process.md new file mode 100644 index 0000000000000000000000000000000000000000..6f865a972267e8dafc60af6e99ff11b3b1a90b48 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/process.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.Vault.process.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`process`](obsidian.Vault.process.md) + +## Vault.process() method + +Atomically read, modify, and save the contents of a note. + +**Signature:** + +```typescript +process(file: TFile, fn: (data: string) => string, options?: DataWriteOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | the file to be read and modified. | +| fn | (data: string) => string | a callback function which returns the new content of the note synchronously. | +| options | [`DataWriteOptions`](obsidian.DataWriteOptions.md) | _(Optional)_ write options. | + +**Returns:** + +`Promise``` + +string - the text value of the note that was written. + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/read.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/read.md new file mode 100644 index 0000000000000000000000000000000000000000..f6abf96a66a303edf28f60f44f0ca27ba4ff3d3f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/read.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Vault.read.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`read`](obsidian.Vault.read.md) + +## Vault.read() method + +Read a plaintext file that is stored inside the vault, directly from disk. Use this if you intend to modify the file content afterwards. Use [Vault.cachedRead()](obsidian.Vault.cachedRead.md) otherwise for better performance. + +**Signature:** + +```typescript +read(file: TFile): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/readBinary.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/readBinary.md new file mode 100644 index 0000000000000000000000000000000000000000..6c2474ef8f29431f3e1405d4f30f4387545d68a1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/readBinary.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Vault.readBinary.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`readBinary`](obsidian.Vault.readBinary.md) + +## Vault.readBinary() method + +Read the content of a binary file stored inside the vault. + +**Signature:** + +```typescript +readBinary(file: TFile): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | + +**Returns:** + +`Promise``<``ArrayBuffer``>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/recurseChildren.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/recurseChildren.md new file mode 100644 index 0000000000000000000000000000000000000000..42ee367f93c42a8aa68f07a40674479aef0a6554 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/recurseChildren.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Vault.recurseChildren.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`recurseChildren`](obsidian.Vault.recurseChildren.md) + +## Vault.recurseChildren() method + + +**Signature:** + +```typescript +static recurseChildren(root: TFolder, cb: (file: TAbstractFile) => any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| root | [`TFolder`](obsidian.TFolder.md) | | +| cb | (file: [`TAbstractFile`](obsidian.TAbstractFile.md)) => any | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/rename.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/rename.md new file mode 100644 index 0000000000000000000000000000000000000000..6568de41d6660725d23c4070e3f1cea0f2f32b1c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/rename.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Vault.rename.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`rename`](obsidian.Vault.rename.md) + +## Vault.rename() method + +Rename or move a file. + +**Signature:** + +```typescript +rename(file: TAbstractFile, newPath: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TAbstractFile`](obsidian.TAbstractFile.md) | the file to rename/move | +| newPath | string | vault absolute path to move file to. | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Vault/trash.md b/docs/obsidian-developer/Reference/TypeScript API/Vault/trash.md new file mode 100644 index 0000000000000000000000000000000000000000..bb1abb5b4740e8f53c78691f7a0969aa132b97c9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Vault/trash.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Vault.trash.md" +cssclasses: hide-title +--- + + + +[`Vault`](obsidian.Vault.md) › [`trash`](obsidian.Vault.trash.md) + +## Vault.trash() method + +Tries to move to system trash. If that isn't successful/allowed, use local trash + +**Signature:** + +```typescript +trash(file: TAbstractFile, system: boolean): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TAbstractFile`](obsidian.TAbstractFile.md) | The file or folder to be deleted | +| system | boolean | Set to false to use local trash by default. | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View.md b/docs/obsidian-developer/Reference/TypeScript API/View.md new file mode 100644 index 0000000000000000000000000000000000000000..f5cb710637ce225f7abece276e32b1238b774eeb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View.md @@ -0,0 +1,51 @@ +--- +aliases: "obsidian.View.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) + +## View class + + +**Signature:** + +```typescript +export abstract class View extends Component +``` +**Extends:** [`Component`](obsidian.Component.md) + +## Constructors + +| Constructor | Modifiers | Description | +| --- | --- | --- | +| [`(constructor)(leaf)`](obsidian.View.(constructor).md) | | Constructs a new instance of the View class | + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`app`](obsidian.View.app.md) | | [`App`](obsidian.App.md) | | +| [`containerEl`](obsidian.View.containerEl.md) | | HTMLElement | | +| [`icon`](obsidian.View.icon.md) | | [`IconName`](obsidian.IconName.md) | | +| [`leaf`](obsidian.View.leaf.md) | | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | +| [`navigation`](obsidian.View.navigation.md) | | boolean | Whether or not the view is intended for navigation. If your view is a static view that is not intended to be navigated away, set this to false. (For example: File explorer, calendar, etc.) If your view opens a file or can be otherwise navigated, set this to true. (For example: Markdown editor view, Kanban view, PDF view, etc.) | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getDisplayText()`](obsidian.View.getDisplayText.md) | abstract | | +| [`getEphemeralState()`](obsidian.View.getEphemeralState.md) | | | +| [`getIcon()`](obsidian.View.getIcon.md) | | | +| [`getState()`](obsidian.View.getState.md) | | | +| [`getViewType()`](obsidian.View.getViewType.md) | abstract | | +| [`onClose()`](obsidian.View.onClose.md) | protected | | +| [`onOpen()`](obsidian.View.onOpen.md) | protected | | +| [`onPaneMenu(menu, source)`](obsidian.View.onPaneMenu.md) | |

Populates the pane menu.

(Replaces the previously removed onHeaderMenu and onMoreOptionsMenu)

| +| [`onResize()`](obsidian.View.onResize.md) | | Called when the size of this view is changed. | +| [`setEphemeralState(state)`](obsidian.View.setEphemeralState.md) | | | +| [`setState(state, result)`](obsidian.View.setState.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/(constructor).md b/docs/obsidian-developer/Reference/TypeScript API/View/(constructor).md new file mode 100644 index 0000000000000000000000000000000000000000..e70cacf7f7b5c11cd1ec3c27f3cf10e01ff11186 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/(constructor).md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.View.(constructor).md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`(constructor)`](obsidian.View.(constructor).md) + +## View.(constructor) + +Constructs a new instance of the `View` class + +**Signature:** + +```typescript +constructor(leaf: WorkspaceLeaf); +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/app.md b/docs/obsidian-developer/Reference/TypeScript API/View/app.md new file mode 100644 index 0000000000000000000000000000000000000000..3027cc189d624e82a85fab6f5789fef3ced9b35b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/app.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.View.app.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`app`](obsidian.View.app.md) + +## View.app property + + +**Signature:** + +```typescript +app: App; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/containerEl.md b/docs/obsidian-developer/Reference/TypeScript API/View/containerEl.md new file mode 100644 index 0000000000000000000000000000000000000000..b773c0314895f0036ca44531eca8b28f4590eb5f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/containerEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.View.containerEl.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`containerEl`](obsidian.View.containerEl.md) + +## View.containerEl property + + +**Signature:** + +```typescript +containerEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/getDisplayText.md b/docs/obsidian-developer/Reference/TypeScript API/View/getDisplayText.md new file mode 100644 index 0000000000000000000000000000000000000000..0c0f476a2e2721248110956978c0fdca58688cd8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/getDisplayText.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.View.getDisplayText.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`getDisplayText`](obsidian.View.getDisplayText.md) + +## View.getDisplayText() method + + +**Signature:** + +```typescript +abstract getDisplayText(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/getEphemeralState.md b/docs/obsidian-developer/Reference/TypeScript API/View/getEphemeralState.md new file mode 100644 index 0000000000000000000000000000000000000000..a972155bb8a4e0906ebb63ae9d9b6a8972397cc4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/getEphemeralState.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.View.getEphemeralState.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`getEphemeralState`](obsidian.View.getEphemeralState.md) + +## View.getEphemeralState() method + + +**Signature:** + +```typescript +getEphemeralState(): any; +``` +**Returns:** + +`any` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/getIcon.md b/docs/obsidian-developer/Reference/TypeScript API/View/getIcon.md new file mode 100644 index 0000000000000000000000000000000000000000..82956a50e675e61bec36c183934ef5d094e16aad --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/getIcon.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.View.getIcon.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`getIcon`](obsidian.View.getIcon.md) + +## View.getIcon() method + + +**Signature:** + +```typescript +getIcon(): IconName; +``` +**Returns:** + +[`IconName`](obsidian.IconName.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/getState.md b/docs/obsidian-developer/Reference/TypeScript API/View/getState.md new file mode 100644 index 0000000000000000000000000000000000000000..612d29704ae786dcc064dcf5437729f46f1fe171 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/getState.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.View.getState.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`getState`](obsidian.View.getState.md) + +## View.getState() method + + +**Signature:** + +```typescript +getState(): any; +``` +**Returns:** + +`any` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/getViewType.md b/docs/obsidian-developer/Reference/TypeScript API/View/getViewType.md new file mode 100644 index 0000000000000000000000000000000000000000..bac6d561514b16565801ca54a17b2330d1bb5375 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/getViewType.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.View.getViewType.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`getViewType`](obsidian.View.getViewType.md) + +## View.getViewType() method + + +**Signature:** + +```typescript +abstract getViewType(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/icon.md b/docs/obsidian-developer/Reference/TypeScript API/View/icon.md new file mode 100644 index 0000000000000000000000000000000000000000..14ec255bc31be9a41b2c7dfda4a56ac3bda9bb05 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/icon.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.View.icon.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`icon`](obsidian.View.icon.md) + +## View.icon property + + +**Signature:** + +```typescript +icon: IconName; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/leaf.md b/docs/obsidian-developer/Reference/TypeScript API/View/leaf.md new file mode 100644 index 0000000000000000000000000000000000000000..ff407353c78d741345beda42f459da2035295203 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/leaf.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.View.leaf.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`leaf`](obsidian.View.leaf.md) + +## View.leaf property + + +**Signature:** + +```typescript +leaf: WorkspaceLeaf; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/navigation.md b/docs/obsidian-developer/Reference/TypeScript API/View/navigation.md new file mode 100644 index 0000000000000000000000000000000000000000..2d048497a7887e2f033e403321512530acbe7711 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/navigation.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.View.navigation.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`navigation`](obsidian.View.navigation.md) + +## View.navigation property + +Whether or not the view is intended for navigation. If your view is a static view that is not intended to be navigated away, set this to false. (For example: File explorer, calendar, etc.) If your view opens a file or can be otherwise navigated, set this to true. (For example: Markdown editor view, Kanban view, PDF view, etc.) + +**Signature:** + +```typescript +navigation: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/onClose.md b/docs/obsidian-developer/Reference/TypeScript API/View/onClose.md new file mode 100644 index 0000000000000000000000000000000000000000..17953008e64d509855ff106db3168a885d4c2133 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/onClose.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.View.onClose.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`onClose`](obsidian.View.onClose.md) + +## View.onClose() method + + +**Signature:** + +```typescript +protected onClose(): Promise; +``` +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/onOpen.md b/docs/obsidian-developer/Reference/TypeScript API/View/onOpen.md new file mode 100644 index 0000000000000000000000000000000000000000..2a234fc822ad6d13fa0ab7b6ea8bb033f4df1af3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/onOpen.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.View.onOpen.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`onOpen`](obsidian.View.onOpen.md) + +## View.onOpen() method + + +**Signature:** + +```typescript +protected onOpen(): Promise; +``` +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/onPaneMenu.md b/docs/obsidian-developer/Reference/TypeScript API/View/onPaneMenu.md new file mode 100644 index 0000000000000000000000000000000000000000..a4140457dc86d909ad3912f6556e150a8259da3c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/onPaneMenu.md @@ -0,0 +1,32 @@ +--- +aliases: "obsidian.View.onPaneMenu.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`onPaneMenu`](obsidian.View.onPaneMenu.md) + +## View.onPaneMenu() method + +Populates the pane menu. + +(Replaces the previously removed `onHeaderMenu` and `onMoreOptionsMenu`) + +**Signature:** + +```typescript +onPaneMenu(menu: Menu, source: 'more-options' | 'tab-header' | string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| menu | [`Menu`](obsidian.Menu.md) | | +| source | 'more-options' | 'tab-header' | string | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/onResize.md b/docs/obsidian-developer/Reference/TypeScript API/View/onResize.md new file mode 100644 index 0000000000000000000000000000000000000000..f2d3c4c6d12b4fbb5ad0938dde22f676541f08f9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/onResize.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.View.onResize.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`onResize`](obsidian.View.onResize.md) + +## View.onResize() method + +Called when the size of this view is changed. + +**Signature:** + +```typescript +onResize(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/setEphemeralState.md b/docs/obsidian-developer/Reference/TypeScript API/View/setEphemeralState.md new file mode 100644 index 0000000000000000000000000000000000000000..e0d83ba65b01826faca3ea0e9643cb17b368e9fa --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/setEphemeralState.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.View.setEphemeralState.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`setEphemeralState`](obsidian.View.setEphemeralState.md) + +## View.setEphemeralState() method + + +**Signature:** + +```typescript +setEphemeralState(state: any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| state | any | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/View/setState.md b/docs/obsidian-developer/Reference/TypeScript API/View/setState.md new file mode 100644 index 0000000000000000000000000000000000000000..c89e82327958fec8f6f540c8b908717e43f378ac --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/View/setState.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.View.setState.md" +cssclasses: hide-title +--- + + + +[`View`](obsidian.View.md) › [`setState`](obsidian.View.setState.md) + +## View.setState() method + + +**Signature:** + +```typescript +setState(state: any, result: ViewStateResult): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| state | any | | +| result | [`ViewStateResult`](obsidian.ViewStateResult.md) | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ViewCreator.md b/docs/obsidian-developer/Reference/TypeScript API/ViewCreator.md new file mode 100644 index 0000000000000000000000000000000000000000..4450261831fdb4ae859a4c660631c39d2fa4df50 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ViewCreator.md @@ -0,0 +1,19 @@ +--- +aliases: "obsidian.ViewCreator.md" +cssclasses: hide-title +--- + + + +[`ViewCreator`](obsidian.ViewCreator.md) + +## ViewCreator type + + +**Signature:** + +```typescript +export type ViewCreator = (leaf: WorkspaceLeaf) => View; +``` +**References:** [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md), [`View`](obsidian.View.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ViewState.md b/docs/obsidian-developer/Reference/TypeScript API/ViewState.md new file mode 100644 index 0000000000000000000000000000000000000000..3921bb32790933be37f50839f55a53fea692f445 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ViewState.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.ViewState.md" +cssclasses: hide-title +--- + + + +[`ViewState`](obsidian.ViewState.md) + +## ViewState interface + + +**Signature:** + +```typescript +export interface ViewState +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`active?`](obsidian.ViewState.active.md) | | boolean | _(Optional)_ | +| [`group?`](obsidian.ViewState.group.md) | | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | _(Optional)_ | +| [`pinned?`](obsidian.ViewState.pinned.md) | | boolean | _(Optional)_ | +| [`state?`](obsidian.ViewState.state.md) | | any | _(Optional)_ | +| [`type`](obsidian.ViewState.type.md) | | string | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ViewState/active.md b/docs/obsidian-developer/Reference/TypeScript API/ViewState/active.md new file mode 100644 index 0000000000000000000000000000000000000000..5d68b8f658ff4d005968700187dc39f49b035751 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ViewState/active.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ViewState.active.md" +cssclasses: hide-title +--- + + + +[`ViewState`](obsidian.ViewState.md) › [`active`](obsidian.ViewState.active.md) + +## ViewState.active property + + +**Signature:** + +```typescript +active?: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ViewState/group.md b/docs/obsidian-developer/Reference/TypeScript API/ViewState/group.md new file mode 100644 index 0000000000000000000000000000000000000000..3900136a9696b43f08ece229d65ab9d706d6e86b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ViewState/group.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ViewState.group.md" +cssclasses: hide-title +--- + + + +[`ViewState`](obsidian.ViewState.md) › [`group`](obsidian.ViewState.group.md) + +## ViewState.group property + + +**Signature:** + +```typescript +group?: WorkspaceLeaf; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ViewState/pinned.md b/docs/obsidian-developer/Reference/TypeScript API/ViewState/pinned.md new file mode 100644 index 0000000000000000000000000000000000000000..a2a9a2b4bb4a061ec99cd1c169ba81aa9190b378 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ViewState/pinned.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ViewState.pinned.md" +cssclasses: hide-title +--- + + + +[`ViewState`](obsidian.ViewState.md) › [`pinned`](obsidian.ViewState.pinned.md) + +## ViewState.pinned property + + +**Signature:** + +```typescript +pinned?: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ViewState/state.md b/docs/obsidian-developer/Reference/TypeScript API/ViewState/state.md new file mode 100644 index 0000000000000000000000000000000000000000..df1b4b72b250e9f3d0e44158f35f31612affe68a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ViewState/state.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ViewState.state.md" +cssclasses: hide-title +--- + + + +[`ViewState`](obsidian.ViewState.md) › [`state`](obsidian.ViewState.state.md) + +## ViewState.state property + + +**Signature:** + +```typescript +state?: any; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ViewState/type.md b/docs/obsidian-developer/Reference/TypeScript API/ViewState/type.md new file mode 100644 index 0000000000000000000000000000000000000000..2de8cfd2dba619c35cdbd5c9952a7bdb661dfdb6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ViewState/type.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.ViewState.type.md" +cssclasses: hide-title +--- + + + +[`ViewState`](obsidian.ViewState.md) › [`type`](obsidian.ViewState.type.md) + +## ViewState.type property + + +**Signature:** + +```typescript +type: string; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/ViewStateResult.md b/docs/obsidian-developer/Reference/TypeScript API/ViewStateResult.md new file mode 100644 index 0000000000000000000000000000000000000000..cd15a5d4f86bb98e3df7fa32ade32267717b6af3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ViewStateResult.md @@ -0,0 +1,24 @@ +--- +aliases: "obsidian.ViewStateResult.md" +cssclasses: hide-title +--- + + + +[`ViewStateResult`](obsidian.ViewStateResult.md) + +## ViewStateResult interface + + +**Signature:** + +```typescript +export interface ViewStateResult +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`history`](obsidian.ViewStateResult.history.md) | | boolean | Set this to true to indicate that there is a state change which should be recorded in the navigation history. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/ViewStateResult/history.md b/docs/obsidian-developer/Reference/TypeScript API/ViewStateResult/history.md new file mode 100644 index 0000000000000000000000000000000000000000..8391ab48c4230678c445211318886877debbf66b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/ViewStateResult/history.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.ViewStateResult.history.md" +cssclasses: hide-title +--- + + + +[`ViewStateResult`](obsidian.ViewStateResult.md) › [`history`](obsidian.ViewStateResult.history.md) + +## ViewStateResult.history property + +Set this to true to indicate that there is a state change which should be recorded in the navigation history. + +**Signature:** + +```typescript +history: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace.md new file mode 100644 index 0000000000000000000000000000000000000000..74f16859365776208fe0ba1fa694cfc4690d2cb8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace.md @@ -0,0 +1,86 @@ +--- +aliases: "obsidian.Workspace.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) + +## Workspace class + + +**Signature:** + +```typescript +export class Workspace extends Events +``` +**Extends:** [`Events`](obsidian.Events.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`activeEditor`](obsidian.Workspace.activeEditor.md) | | [`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md) | null | A component managing the current editor. This can be null if the active view has no editor. | +| [`activeLeaf`](obsidian.Workspace.activeLeaf.md) | | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | null |

Indicates the currently focused leaf, if one exists.

Please avoid using activeLeaf directly, especially without checking whether activeLeaf is null.

The recommended alternatives are: - If you need information about the current view, use [Workspace.getActiveViewOfType()](obsidian.Workspace.getActiveViewOfType.md). - If you need to open a new file or navigate a view, use [Workspace.getLeaf](obsidian.workspace.getleaf_1.md).

| +| [`containerEl`](obsidian.Workspace.containerEl.md) | | HTMLElement | | +| [`layoutReady`](obsidian.Workspace.layoutReady.md) | | boolean | | +| [`leftRibbon`](obsidian.Workspace.leftRibbon.md) | | [`WorkspaceRibbon`](obsidian.WorkspaceRibbon.md) | | +| [`leftSplit`](obsidian.Workspace.leftSplit.md) | | [`WorkspaceSidedock`](obsidian.WorkspaceSidedock.md) | [`WorkspaceMobileDrawer`](obsidian.WorkspaceMobileDrawer.md) | | +| [`requestSaveLayout`](obsidian.Workspace.requestSaveLayout.md) | | [`Debouncer`](obsidian.Debouncer.md)<[], Promise<void>> | | +| [`rightRibbon`](obsidian.Workspace.rightRibbon.md) | | [`WorkspaceRibbon`](obsidian.WorkspaceRibbon.md) | | +| [`rightSplit`](obsidian.Workspace.rightSplit.md) | | [`WorkspaceSidedock`](obsidian.WorkspaceSidedock.md) | [`WorkspaceMobileDrawer`](obsidian.WorkspaceMobileDrawer.md) | | +| [`rootSplit`](obsidian.Workspace.rootSplit.md) | | [`WorkspaceRoot`](obsidian.WorkspaceRoot.md) | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`changeLayout(workspace)`](obsidian.Workspace.changeLayout.md) | | | +| [`createLeafBySplit(leaf, direction, before)`](obsidian.Workspace.createLeafBySplit.md) | | | +| [`createLeafInParent(parent, index)`](obsidian.Workspace.createLeafInParent.md) | | | +| [`detachLeavesOfType(viewType)`](obsidian.Workspace.detachLeavesOfType.md) | | | +| [`duplicateLeaf(leaf, direction)`](obsidian.Workspace.duplicateLeaf.md) | | | +| [`duplicateLeaf(leaf, leafType, direction)`](obsidian.Workspace.duplicateLeaf_1.md) | | | +| [`getActiveFile()`](obsidian.Workspace.getActiveFile.md) | |

Returns the file for the current view if it's a FileView.

Otherwise, it will recent the most recently active file.

| +| [`getActiveViewOfType(type)`](obsidian.Workspace.getActiveViewOfType.md) | | | +| [`getGroupLeaves(group)`](obsidian.Workspace.getGroupLeaves.md) | | | +| [`getLastOpenFiles()`](obsidian.Workspace.getLastOpenFiles.md) | | | +| [`getLayout()`](obsidian.Workspace.getLayout.md) | | | +| [`getLeaf(newLeaf, direction)`](obsidian.Workspace.getLeaf.md) | | Creates a new leaf in a leaf adjacent to the currently active leaf. If direction is 'vertical', the leaf will appear to the right. If direction is 'horizontal', the leaf will appear below the current leaf. | +| [`getLeaf(newLeaf)`](obsidian.Workspace.getLeaf_1.md) | |

If newLeaf is false (or not set) then an existing leaf which can be navigated is returned, or a new leaf will be created if there was no leaf available.

If newLeaf is 'tab' or true then a new leaf will be created in the preferred location within the root split and returned.

If newLeaf is 'split' then a new leaf will be created adjacent to the currently active leaf.

If newLeaf is 'window' then a popout window will be created with a new leaf inside.

| +| [`getLeafById(id)`](obsidian.Workspace.getLeafById.md) | | | +| [`getLeavesOfType(viewType)`](obsidian.Workspace.getLeavesOfType.md) | | | +| [`getLeftLeaf(split)`](obsidian.Workspace.getLeftLeaf.md) | | | +| [`getMostRecentLeaf(root)`](obsidian.Workspace.getMostRecentLeaf.md) | | | +| [`getRightLeaf(split)`](obsidian.Workspace.getRightLeaf.md) | | | +| [`getUnpinnedLeaf()`](obsidian.Workspace.getUnpinnedLeaf.md) | | | +| [`iterateAllLeaves(callback)`](obsidian.Workspace.iterateAllLeaves.md) | | Iterate through all leaves, including main area leaves, floating leaves, and sidebar leaves. | +| [`iterateCodeMirrors(callback)`](obsidian.Workspace.iterateCodeMirrors.md) | | | +| [`iterateRootLeaves(callback)`](obsidian.Workspace.iterateRootLeaves.md) | | Iterate through all leaves in the main area of the workspace. | +| [`moveLeafToPopout(leaf, data)`](obsidian.Workspace.moveLeafToPopout.md) | | Migrates this leaf to a new popout window. Only works on the desktop app. | +| [`on(name, callback, ctx)`](obsidian.Workspace.on.md) | | | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_9.md) | | Triggered when the user opens the context menu with multiple files selected in the File Explorer. | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_10.md) | | Triggered when the user opens the context menu on an editor. | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_11.md) | | Triggered when changes to an editor has been applied, either programmatically or from a user event. | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_12.md) | | Triggered when the editor receives a paste event. Check for evt.defaultPrevented before attempting to handle this event, and return if it has been already handled. Use evt.preventDefault() to indicate that you've handled the event. | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_13.md) | | Triggered when the editor receives a drop event. Check for evt.defaultPrevented before attempting to handle this event, and return if it has been already handled. Use evt.preventDefault() to indicate that you've handled the event. | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_14.md) | | | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_15.md) | | Triggered when the app is about to quit. Not guaranteed to actually run. Perform some best effort cleanup here. | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_1.md) | | | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_2.md) | | | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_3.md) | | | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_4.md) | | | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_5.md) | | | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_6.md) | | | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_7.md) | | Triggered when the CSS of the app has changed. | +| [`on(name, callback, ctx)`](obsidian.Workspace.on_8.md) | | Triggered when the user opens the context menu on a file. | +| [`onLayoutReady(callback)`](obsidian.Workspace.onLayoutReady.md) | | Runs the callback function right away if layout is already ready, or push it to a queue to be called later when layout is ready. | +| [`openLinkText(linktext, sourcePath, newLeaf, openViewState)`](obsidian.Workspace.openLinkText.md) | | | +| [`openPopoutLeaf(data)`](obsidian.Workspace.openPopoutLeaf.md) | | Open a new popout window with a single new leaf and return that leaf. Only works on the desktop app. | +| [`revealLeaf(leaf)`](obsidian.Workspace.revealLeaf.md) | | | +| [`setActiveLeaf(leaf, params)`](obsidian.Workspace.setActiveLeaf.md) | | Sets the active leaf | +| [`setActiveLeaf(leaf, pushHistory, focus)`](obsidian.Workspace.setActiveLeaf_1.md) | | | +| [`splitActiveLeaf(direction)`](obsidian.Workspace.splitActiveLeaf.md) | | | +| [`updateOptions()`](obsidian.Workspace.updateOptions.md) | | Calling this function will update/reconfigure the options of all markdown panes. It is fairly expensive, so it should not be called frequently. | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/activeEditor.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/activeEditor.md new file mode 100644 index 0000000000000000000000000000000000000000..a5af7d523bfbc6c2a68f7b098b2e5172145f75b8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/activeEditor.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.Workspace.activeEditor.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`activeEditor`](obsidian.Workspace.activeEditor.md) + +## Workspace.activeEditor property + +A component managing the current editor. This can be null if the active view has no editor. + +**Signature:** + +```typescript +activeEditor: MarkdownFileInfo | null; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/activeLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/activeLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..056eca477851f4c7c381d94fec24c088b22bde4b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/activeLeaf.md @@ -0,0 +1,27 @@ +--- +aliases: "obsidian.Workspace.activeLeaf.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`activeLeaf`](obsidian.Workspace.activeLeaf.md) + +## Workspace.activeLeaf property + +> Warning: This API is now obsolete. +> +> - The use of this field is discouraged. +> + +Indicates the currently focused leaf, if one exists. + +Please avoid using `activeLeaf` directly, especially without checking whether `activeLeaf` is null. + +The recommended alternatives are: - If you need information about the current view, use [Workspace.getActiveViewOfType()](obsidian.Workspace.getActiveViewOfType.md). - If you need to open a new file or navigate a view, use [Workspace.getLeaf](obsidian.workspace.getleaf_1.md). + +**Signature:** + +```typescript +activeLeaf: WorkspaceLeaf | null; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/changeLayout.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/changeLayout.md new file mode 100644 index 0000000000000000000000000000000000000000..97fece047a579ef6888b75643ff64516a119cbc6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/changeLayout.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Workspace.changeLayout.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`changeLayout`](obsidian.Workspace.changeLayout.md) + +## Workspace.changeLayout() method + + +**Signature:** + +```typescript +changeLayout(workspace: any): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| workspace | any | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/containerEl.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/containerEl.md new file mode 100644 index 0000000000000000000000000000000000000000..3e5cad60e7886fb4f2ec8138360291ec2b68cefc --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/containerEl.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Workspace.containerEl.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`containerEl`](obsidian.Workspace.containerEl.md) + +## Workspace.containerEl property + + +**Signature:** + +```typescript +containerEl: HTMLElement; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/createLeafBySplit.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/createLeafBySplit.md new file mode 100644 index 0000000000000000000000000000000000000000..a84c8a8830e77d6931a40387ae8da27a5f8bd31b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/createLeafBySplit.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.createLeafBySplit.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`createLeafBySplit`](obsidian.Workspace.createLeafBySplit.md) + +## Workspace.createLeafBySplit() method + + +**Signature:** + +```typescript +createLeafBySplit(leaf: WorkspaceLeaf, direction?: SplitDirection, before?: boolean): WorkspaceLeaf; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | +| direction | [`SplitDirection`](obsidian.SplitDirection.md) | _(Optional)_ | +| before | boolean | _(Optional)_ | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/createLeafInParent.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/createLeafInParent.md new file mode 100644 index 0000000000000000000000000000000000000000..33588d97242670f20e18e1152c39e0144833d122 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/createLeafInParent.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Workspace.createLeafInParent.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`createLeafInParent`](obsidian.Workspace.createLeafInParent.md) + +## Workspace.createLeafInParent() method + + +**Signature:** + +```typescript +createLeafInParent(parent: WorkspaceSplit, index: number): WorkspaceLeaf; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| parent | [`WorkspaceSplit`](obsidian.WorkspaceSplit.md) | | +| index | number | | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/detachLeavesOfType.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/detachLeavesOfType.md new file mode 100644 index 0000000000000000000000000000000000000000..96e06e153aec73b7544e3b7c2ec9aad45740117d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/detachLeavesOfType.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Workspace.detachLeavesOfType.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`detachLeavesOfType`](obsidian.Workspace.detachLeavesOfType.md) + +## Workspace.detachLeavesOfType() method + + +**Signature:** + +```typescript +detachLeavesOfType(viewType: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| viewType | string | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/duplicateLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/duplicateLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..dd2619e90a4348f718979a0422d3afee59f95f1f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/duplicateLeaf.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.Workspace.duplicateLeaf.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`duplicateLeaf`](obsidian.Workspace.duplicateLeaf.md) + +## Workspace.duplicateLeaf() method + +> Warning: This API is now obsolete. +> +> - Use the new form of this method instead +> + +**Signature:** + +```typescript +duplicateLeaf(leaf: WorkspaceLeaf, direction?: SplitDirection): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | +| direction | [`SplitDirection`](obsidian.SplitDirection.md) | _(Optional)_ | + +**Returns:** + +`Promise``<`[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md)`>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/duplicateLeaf_1.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/duplicateLeaf_1.md new file mode 100644 index 0000000000000000000000000000000000000000..fcad6b6fcd4711746e16a1ae38a38041881c77de --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/duplicateLeaf_1.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.duplicateLeaf_1.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`duplicateLeaf`](obsidian.Workspace.duplicateLeaf_1.md) + +## Workspace.duplicateLeaf() method + + +**Signature:** + +```typescript +duplicateLeaf(leaf: WorkspaceLeaf, leafType: PaneType | boolean, direction?: SplitDirection): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | +| leafType | [`PaneType`](obsidian.PaneType.md) | boolean | | +| direction | [`SplitDirection`](obsidian.SplitDirection.md) | _(Optional)_ | + +**Returns:** + +`Promise``<`[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md)`>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getActiveFile.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getActiveFile.md new file mode 100644 index 0000000000000000000000000000000000000000..d5996922978122015ad28fa99c83c6a3ebe10adb --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getActiveFile.md @@ -0,0 +1,24 @@ +--- +aliases: "obsidian.Workspace.getActiveFile.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getActiveFile`](obsidian.Workspace.getActiveFile.md) + +## Workspace.getActiveFile() method + +Returns the file for the current view if it's a FileView. + +Otherwise, it will recent the most recently active file. + +**Signature:** + +```typescript +getActiveFile(): TFile | null; +``` +**Returns:** + +[`TFile`](obsidian.TFile.md)` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getActiveViewOfType.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getActiveViewOfType.md new file mode 100644 index 0000000000000000000000000000000000000000..5879cc575b2891d5f08182b02ddc9c4910477c09 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getActiveViewOfType.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Workspace.getActiveViewOfType.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getActiveViewOfType`](obsidian.Workspace.getActiveViewOfType.md) + +## Workspace.getActiveViewOfType() method + + +**Signature:** + +```typescript +getActiveViewOfType(type: Constructor): T | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| type | [`Constructor`](obsidian.Constructor.md)<T> | | + +**Returns:** + +`T | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getGroupLeaves.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getGroupLeaves.md new file mode 100644 index 0000000000000000000000000000000000000000..6df8051899b78375902a61bc0bb3d5a7e4a0f04a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getGroupLeaves.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Workspace.getGroupLeaves.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getGroupLeaves`](obsidian.Workspace.getGroupLeaves.md) + +## Workspace.getGroupLeaves() method + + +**Signature:** + +```typescript +getGroupLeaves(group: string): WorkspaceLeaf[]; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| group | string | | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md)`[]` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLastOpenFiles.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLastOpenFiles.md new file mode 100644 index 0000000000000000000000000000000000000000..614741c16dd4f8e7fb54a5337bdb885174b02b8c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLastOpenFiles.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Workspace.getLastOpenFiles.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getLastOpenFiles`](obsidian.Workspace.getLastOpenFiles.md) + +## Workspace.getLastOpenFiles() method + + +**Signature:** + +```typescript +getLastOpenFiles(): string[]; +``` +**Returns:** + +`string[]` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLayout.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLayout.md new file mode 100644 index 0000000000000000000000000000000000000000..e5a52dd3d1e6e75d9fb1e05077cc7136a014dcea --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLayout.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.Workspace.getLayout.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getLayout`](obsidian.Workspace.getLayout.md) + +## Workspace.getLayout() method + + +**Signature:** + +```typescript +getLayout(): any; +``` +**Returns:** + +`any` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..e487a8ba68206f87fb248d345963778f531bc8e6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeaf.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.getLeaf.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getLeaf`](obsidian.Workspace.getLeaf.md) + +## Workspace.getLeaf() method + +Creates a new leaf in a leaf adjacent to the currently active leaf. If direction is `'vertical'`, the leaf will appear to the right. If direction is `'horizontal'`, the leaf will appear below the current leaf. + +**Signature:** + +```typescript +getLeaf(newLeaf?: 'split', direction?: SplitDirection): WorkspaceLeaf; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| newLeaf | 'split' | _(Optional)_ | +| direction | [`SplitDirection`](obsidian.SplitDirection.md) | _(Optional)_ | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeafById.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeafById.md new file mode 100644 index 0000000000000000000000000000000000000000..09c9f58e5ca7a529ab91230833d9eed7b8d32f4a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeafById.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Workspace.getLeafById.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getLeafById`](obsidian.Workspace.getLeafById.md) + +## Workspace.getLeafById() method + + +**Signature:** + +```typescript +getLeafById(id: string): WorkspaceLeaf; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| id | string | | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeaf_1.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeaf_1.md new file mode 100644 index 0000000000000000000000000000000000000000..3a3ccbc91ef0e11e602f3fc22fbc5b66c9f1cb59 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeaf_1.md @@ -0,0 +1,35 @@ +--- +aliases: "obsidian.Workspace.getLeaf_1.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getLeaf`](obsidian.Workspace.getLeaf_1.md) + +## Workspace.getLeaf() method + +If newLeaf is false (or not set) then an existing leaf which can be navigated is returned, or a new leaf will be created if there was no leaf available. + +If newLeaf is `'tab'` or `true` then a new leaf will be created in the preferred location within the root split and returned. + +If newLeaf is `'split'` then a new leaf will be created adjacent to the currently active leaf. + +If newLeaf is `'window'` then a popout window will be created with a new leaf inside. + +**Signature:** + +```typescript +getLeaf(newLeaf?: PaneType | boolean): WorkspaceLeaf; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| newLeaf | [`PaneType`](obsidian.PaneType.md) | boolean | _(Optional)_ | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeavesOfType.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeavesOfType.md new file mode 100644 index 0000000000000000000000000000000000000000..47b8d4e3871a2861872bf12dff392fadd35573ec --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeavesOfType.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Workspace.getLeavesOfType.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getLeavesOfType`](obsidian.Workspace.getLeavesOfType.md) + +## Workspace.getLeavesOfType() method + + +**Signature:** + +```typescript +getLeavesOfType(viewType: string): WorkspaceLeaf[]; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| viewType | string | | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md)`[]` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeftLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeftLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..43a964045b5e3c489b909bb6e63ac1fa45660d89 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getLeftLeaf.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Workspace.getLeftLeaf.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getLeftLeaf`](obsidian.Workspace.getLeftLeaf.md) + +## Workspace.getLeftLeaf() method + + +**Signature:** + +```typescript +getLeftLeaf(split: boolean): WorkspaceLeaf; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| split | boolean | | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getMostRecentLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getMostRecentLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..001d27df022c7885f8e981b24e964d4b605e9990 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getMostRecentLeaf.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Workspace.getMostRecentLeaf.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getMostRecentLeaf`](obsidian.Workspace.getMostRecentLeaf.md) + +## Workspace.getMostRecentLeaf() method + + +**Signature:** + +```typescript +getMostRecentLeaf(root?: WorkspaceParent): WorkspaceLeaf | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| root | [`WorkspaceParent`](obsidian.WorkspaceParent.md) | _(Optional)_ | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md)` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getRightLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getRightLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..676fcfddda882a2ef5a63bcc9f77a9b9b101f1aa --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getRightLeaf.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Workspace.getRightLeaf.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getRightLeaf`](obsidian.Workspace.getRightLeaf.md) + +## Workspace.getRightLeaf() method + + +**Signature:** + +```typescript +getRightLeaf(split: boolean): WorkspaceLeaf; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| split | boolean | | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/getUnpinnedLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getUnpinnedLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..b6a316d20243f3dd974291d59f2e6ee4871c7ec2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/getUnpinnedLeaf.md @@ -0,0 +1,25 @@ +--- +aliases: "obsidian.Workspace.getUnpinnedLeaf.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`getUnpinnedLeaf`](obsidian.Workspace.getUnpinnedLeaf.md) + +## Workspace.getUnpinnedLeaf() method + +> Warning: This API is now obsolete. +> +> - You should use [ | getLeaf(false)](obsidian.workspace.getleaf_1.md) instead which does the same thing. +> + +**Signature:** + +```typescript +getUnpinnedLeaf(): WorkspaceLeaf; +``` +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/iterateAllLeaves.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/iterateAllLeaves.md new file mode 100644 index 0000000000000000000000000000000000000000..18560a432bcf2fca408e051a5e22e9f824456ff3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/iterateAllLeaves.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Workspace.iterateAllLeaves.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`iterateAllLeaves`](obsidian.Workspace.iterateAllLeaves.md) + +## Workspace.iterateAllLeaves() method + +Iterate through all leaves, including main area leaves, floating leaves, and sidebar leaves. + +**Signature:** + +```typescript +iterateAllLeaves(callback: (leaf: WorkspaceLeaf) => any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (leaf: [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md)) => any | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/iterateCodeMirrors.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/iterateCodeMirrors.md new file mode 100644 index 0000000000000000000000000000000000000000..c8ca152a1e74469632b310f478c8b0f77187e9cf --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/iterateCodeMirrors.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Workspace.iterateCodeMirrors.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`iterateCodeMirrors`](obsidian.Workspace.iterateCodeMirrors.md) + +## Workspace.iterateCodeMirrors() method + + +**Signature:** + +```typescript +iterateCodeMirrors(callback: (cm: CodeMirror.Editor) => any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (cm: CodeMirror.Editor) => any | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/iterateRootLeaves.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/iterateRootLeaves.md new file mode 100644 index 0000000000000000000000000000000000000000..991e9b16e5ecc6a325e347c63e17850ae74790f1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/iterateRootLeaves.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Workspace.iterateRootLeaves.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`iterateRootLeaves`](obsidian.Workspace.iterateRootLeaves.md) + +## Workspace.iterateRootLeaves() method + +Iterate through all leaves in the main area of the workspace. + +**Signature:** + +```typescript +iterateRootLeaves(callback: (leaf: WorkspaceLeaf) => any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | (leaf: [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md)) => any | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/layoutReady.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/layoutReady.md new file mode 100644 index 0000000000000000000000000000000000000000..aec4e464a7c4f7427348b8d0616653eccc943730 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/layoutReady.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Workspace.layoutReady.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`layoutReady`](obsidian.Workspace.layoutReady.md) + +## Workspace.layoutReady property + + +**Signature:** + +```typescript +layoutReady: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/leftRibbon.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/leftRibbon.md new file mode 100644 index 0000000000000000000000000000000000000000..fcff7a00a5f84b410cc789ae7bd4efd83622fddd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/leftRibbon.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Workspace.leftRibbon.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`leftRibbon`](obsidian.Workspace.leftRibbon.md) + +## Workspace.leftRibbon property + + +**Signature:** + +```typescript +leftRibbon: WorkspaceRibbon; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/leftSplit.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/leftSplit.md new file mode 100644 index 0000000000000000000000000000000000000000..4ab5e648f75935ead17661f88388e6c3bc0cee9f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/leftSplit.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Workspace.leftSplit.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`leftSplit`](obsidian.Workspace.leftSplit.md) + +## Workspace.leftSplit property + + +**Signature:** + +```typescript +leftSplit: WorkspaceSidedock | WorkspaceMobileDrawer; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/moveLeafToPopout.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/moveLeafToPopout.md new file mode 100644 index 0000000000000000000000000000000000000000..5591972fc5613ba4edc80cf7122071f4108b92b1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/moveLeafToPopout.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.moveLeafToPopout.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`moveLeafToPopout`](obsidian.Workspace.moveLeafToPopout.md) + +## Workspace.moveLeafToPopout() method + +Migrates this leaf to a new popout window. Only works on the desktop app. + +**Signature:** + +```typescript +moveLeafToPopout(leaf: WorkspaceLeaf, data?: WorkspaceWindowInitData): WorkspaceWindow; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | +| data | [`WorkspaceWindowInitData`](obsidian.WorkspaceWindowInitData.md) | _(Optional)_ | + +**Returns:** + +[`WorkspaceWindow`](obsidian.WorkspaceWindow.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on.md new file mode 100644 index 0000000000000000000000000000000000000000..d4032a72779d123394a9c047aa279425f59f5896 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.on.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on.md) + +## Workspace.on() method + + +**Signature:** + +```typescript +on(name: 'quick-preview', callback: (file: TFile, data: string) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'quick-preview' | | +| callback | (file: [`TFile`](obsidian.TFile.md), data: string) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/onLayoutReady.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/onLayoutReady.md new file mode 100644 index 0000000000000000000000000000000000000000..8638b66e4cf17bcc10f7a7e0c44eefc51b595ef0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/onLayoutReady.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Workspace.onLayoutReady.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`onLayoutReady`](obsidian.Workspace.onLayoutReady.md) + +## Workspace.onLayoutReady() method + +Runs the callback function right away if layout is already ready, or push it to a queue to be called later when layout is ready. + +**Signature:** + +```typescript +onLayoutReady(callback: () => any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callback | () => any | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_1.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_1.md new file mode 100644 index 0000000000000000000000000000000000000000..8f2e79d41c8c3a550ecf475d252e6f973b39ae1d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_1.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.on_1.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_1.md) + +## Workspace.on() method + + +**Signature:** + +```typescript +on(name: 'resize', callback: () => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'resize' | | +| callback | () => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_10.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_10.md new file mode 100644 index 0000000000000000000000000000000000000000..f93b4c7abaf343787f605e9516cfdde38482b8c7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_10.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Workspace.on_10.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_10.md) + +## Workspace.on() method + +Triggered when the user opens the context menu on an editor. + +**Signature:** + +```typescript +on(name: 'editor-menu', callback: (menu: Menu, editor: Editor, info: MarkdownView | MarkdownFileInfo) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'editor-menu' | | +| callback | (menu: [`Menu`](obsidian.Menu.md), editor: [`Editor`](obsidian.Editor.md), info: [`MarkdownView`](obsidian.MarkdownView.md) | [`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_11.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_11.md new file mode 100644 index 0000000000000000000000000000000000000000..104c22220c295710d013b1364fa3f665e242b50a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_11.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Workspace.on_11.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_11.md) + +## Workspace.on() method + +Triggered when changes to an editor has been applied, either programmatically or from a user event. + +**Signature:** + +```typescript +on(name: 'editor-change', callback: (editor: Editor, info: MarkdownView | MarkdownFileInfo) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'editor-change' | | +| callback | (editor: [`Editor`](obsidian.Editor.md), info: [`MarkdownView`](obsidian.MarkdownView.md) | [`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_12.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_12.md new file mode 100644 index 0000000000000000000000000000000000000000..edff52c9d7eb45e43b83cf720827ef3ce5277a95 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_12.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Workspace.on_12.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_12.md) + +## Workspace.on() method + +Triggered when the editor receives a paste event. Check for `evt.defaultPrevented` before attempting to handle this event, and return if it has been already handled. Use `evt.preventDefault()` to indicate that you've handled the event. + +**Signature:** + +```typescript +on(name: 'editor-paste', callback: (evt: ClipboardEvent, editor: Editor, info: MarkdownView | MarkdownFileInfo) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'editor-paste' | | +| callback | (evt: ClipboardEvent, editor: [`Editor`](obsidian.Editor.md), info: [`MarkdownView`](obsidian.MarkdownView.md) | [`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_13.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_13.md new file mode 100644 index 0000000000000000000000000000000000000000..8ecd35677d1cd13fa9d93aa64e51d4640bef344f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_13.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Workspace.on_13.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_13.md) + +## Workspace.on() method + +Triggered when the editor receives a drop event. Check for `evt.defaultPrevented` before attempting to handle this event, and return if it has been already handled. Use `evt.preventDefault()` to indicate that you've handled the event. + +**Signature:** + +```typescript +on(name: 'editor-drop', callback: (evt: DragEvent, editor: Editor, info: MarkdownView | MarkdownFileInfo) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'editor-drop' | | +| callback | (evt: DragEvent, editor: [`Editor`](obsidian.Editor.md), info: [`MarkdownView`](obsidian.MarkdownView.md) | [`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_14.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_14.md new file mode 100644 index 0000000000000000000000000000000000000000..518ef2d5a159a44be414a0a06a18d29687d2b72c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_14.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.on_14.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_14.md) + +## Workspace.on() method + + +**Signature:** + +```typescript +on(name: 'codemirror', callback: (cm: CodeMirror.Editor) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'codemirror' | | +| callback | (cm: CodeMirror.Editor) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_15.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_15.md new file mode 100644 index 0000000000000000000000000000000000000000..825b6dfc4c9dc619c739a498a21e7b88565fc75c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_15.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Workspace.on_15.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_15.md) + +## Workspace.on() method + +Triggered when the app is about to quit. Not guaranteed to actually run. Perform some best effort cleanup here. + +**Signature:** + +```typescript +on(name: 'quit', callback: (tasks: Tasks) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'quit' | | +| callback | (tasks: [`Tasks`](obsidian.Tasks.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_2.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_2.md new file mode 100644 index 0000000000000000000000000000000000000000..03dd61bed6cad632fe1cf5b3590f65c24c7dd063 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_2.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.on_2.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_2.md) + +## Workspace.on() method + + +**Signature:** + +```typescript +on(name: 'active-leaf-change', callback: (leaf: WorkspaceLeaf | null) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'active-leaf-change' | | +| callback | (leaf: [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | null) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_3.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_3.md new file mode 100644 index 0000000000000000000000000000000000000000..28b117e9e102b2f542d2c13679d8e4644a473e49 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_3.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.on_3.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_3.md) + +## Workspace.on() method + + +**Signature:** + +```typescript +on(name: 'file-open', callback: (file: TFile | null) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'file-open' | | +| callback | (file: [`TFile`](obsidian.TFile.md) | null) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_4.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_4.md new file mode 100644 index 0000000000000000000000000000000000000000..c3860401a0bc1580ed76883598ffc7fbc7ff6e5b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_4.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.on_4.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_4.md) + +## Workspace.on() method + + +**Signature:** + +```typescript +on(name: 'layout-change', callback: () => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'layout-change' | | +| callback | () => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_5.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_5.md new file mode 100644 index 0000000000000000000000000000000000000000..fa0d16a6589923c5db8269188c6937bbd02a9ba1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_5.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.on_5.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_5.md) + +## Workspace.on() method + + +**Signature:** + +```typescript +on(name: 'window-open', callback: (win: WorkspaceWindow, window: Window) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'window-open' | | +| callback | (win: [`WorkspaceWindow`](obsidian.WorkspaceWindow.md), window: Window) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_6.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_6.md new file mode 100644 index 0000000000000000000000000000000000000000..7820f662e04acbeba587135fde939caf004a5ae5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_6.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.Workspace.on_6.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_6.md) + +## Workspace.on() method + + +**Signature:** + +```typescript +on(name: 'window-close', callback: (win: WorkspaceWindow, window: Window) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'window-close' | | +| callback | (win: [`WorkspaceWindow`](obsidian.WorkspaceWindow.md), window: Window) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_7.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_7.md new file mode 100644 index 0000000000000000000000000000000000000000..ffa026f4270b65f6a95c48c68e9108c96791d762 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_7.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Workspace.on_7.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_7.md) + +## Workspace.on() method + +Triggered when the CSS of the app has changed. + +**Signature:** + +```typescript +on(name: 'css-change', callback: () => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'css-change' | | +| callback | () => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_8.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_8.md new file mode 100644 index 0000000000000000000000000000000000000000..04fc2f447d1cab1fc121ac9239698ff47bfabe9d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_8.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Workspace.on_8.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_8.md) + +## Workspace.on() method + +Triggered when the user opens the context menu on a file. + +**Signature:** + +```typescript +on(name: 'file-menu', callback: (menu: Menu, file: TAbstractFile, source: string, leaf?: WorkspaceLeaf) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'file-menu' | | +| callback | (menu: [`Menu`](obsidian.Menu.md), file: [`TAbstractFile`](obsidian.TAbstractFile.md), source: string, leaf?: [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_9.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_9.md new file mode 100644 index 0000000000000000000000000000000000000000..af20d039490a89181c98fbb02646aa760343e129 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/on_9.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Workspace.on_9.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`on`](obsidian.Workspace.on_9.md) + +## Workspace.on() method + +Triggered when the user opens the context menu with multiple files selected in the File Explorer. + +**Signature:** + +```typescript +on(name: 'files-menu', callback: (menu: Menu, files: TAbstractFile[], source: string, leaf?: WorkspaceLeaf) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'files-menu' | | +| callback | (menu: [`Menu`](obsidian.Menu.md), files: [`TAbstractFile`](obsidian.TAbstractFile.md)[], source: string, leaf?: [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md)) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/openLinkText.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/openLinkText.md new file mode 100644 index 0000000000000000000000000000000000000000..5c73b512533f8be2f980213066e22b9b5e4fefcd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/openLinkText.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.Workspace.openLinkText.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`openLinkText`](obsidian.Workspace.openLinkText.md) + +## Workspace.openLinkText() method + + +**Signature:** + +```typescript +openLinkText(linktext: string, sourcePath: string, newLeaf?: PaneType | boolean, openViewState?: OpenViewState): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| linktext | string | | +| sourcePath | string | | +| newLeaf | [`PaneType`](obsidian.PaneType.md) | boolean | _(Optional)_ | +| openViewState | [`OpenViewState`](obsidian.OpenViewState.md) | _(Optional)_ | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/openPopoutLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/openPopoutLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..ec6ee4326272c6e7624e42a8791cad6005d1ec68 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/openPopoutLeaf.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.Workspace.openPopoutLeaf.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`openPopoutLeaf`](obsidian.Workspace.openPopoutLeaf.md) + +## Workspace.openPopoutLeaf() method + +Open a new popout window with a single new leaf and return that leaf. Only works on the desktop app. + +**Signature:** + +```typescript +openPopoutLeaf(data?: WorkspaceWindowInitData): WorkspaceLeaf; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| data | [`WorkspaceWindowInitData`](obsidian.WorkspaceWindowInitData.md) | _(Optional)_ | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/requestSaveLayout.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/requestSaveLayout.md new file mode 100644 index 0000000000000000000000000000000000000000..46116293c2ef3b49d71dce15608e74810c87cef7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/requestSaveLayout.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Workspace.requestSaveLayout.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`requestSaveLayout`](obsidian.Workspace.requestSaveLayout.md) + +## Workspace.requestSaveLayout property + + +**Signature:** + +```typescript +requestSaveLayout: Debouncer<[], Promise>; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/revealLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/revealLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..baaf95306b2ee9cd3613627f705e7d809ae3a518 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/revealLeaf.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.Workspace.revealLeaf.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`revealLeaf`](obsidian.Workspace.revealLeaf.md) + +## Workspace.revealLeaf() method + + +**Signature:** + +```typescript +revealLeaf(leaf: WorkspaceLeaf): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/rightRibbon.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/rightRibbon.md new file mode 100644 index 0000000000000000000000000000000000000000..b19542d0dbcd7698b8c1fb7d26697e03843032ab --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/rightRibbon.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Workspace.rightRibbon.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`rightRibbon`](obsidian.Workspace.rightRibbon.md) + +## Workspace.rightRibbon property + + +**Signature:** + +```typescript +rightRibbon: WorkspaceRibbon; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/rightSplit.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/rightSplit.md new file mode 100644 index 0000000000000000000000000000000000000000..e17532f8eca5ab45395a3ee25aef5e51ec6c37c0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/rightSplit.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Workspace.rightSplit.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`rightSplit`](obsidian.Workspace.rightSplit.md) + +## Workspace.rightSplit property + + +**Signature:** + +```typescript +rightSplit: WorkspaceSidedock | WorkspaceMobileDrawer; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/rootSplit.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/rootSplit.md new file mode 100644 index 0000000000000000000000000000000000000000..f1dc551b1fe1d694d072dbf8441f45b16371df55 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/rootSplit.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.Workspace.rootSplit.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`rootSplit`](obsidian.Workspace.rootSplit.md) + +## Workspace.rootSplit property + + +**Signature:** + +```typescript +rootSplit: WorkspaceRoot; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/setActiveLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/setActiveLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..9cd12cfa246d80f89c8be9e2e9561256f3ad6f82 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/setActiveLeaf.md @@ -0,0 +1,32 @@ +--- +aliases: "obsidian.Workspace.setActiveLeaf.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`setActiveLeaf`](obsidian.Workspace.setActiveLeaf.md) + +## Workspace.setActiveLeaf() method + +Sets the active leaf + +**Signature:** + +```typescript +setActiveLeaf(leaf: WorkspaceLeaf, params?: { + focus?: boolean; + }): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | The new active leaf | +| params | { focus?: boolean; } | _(Optional)_ Parameter object of whether to set the focus. | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/setActiveLeaf_1.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/setActiveLeaf_1.md new file mode 100644 index 0000000000000000000000000000000000000000..afdef63ff3572828036d8741b32746cae64a7057 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/setActiveLeaf_1.md @@ -0,0 +1,34 @@ +--- +aliases: "obsidian.Workspace.setActiveLeaf_1.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`setActiveLeaf`](obsidian.Workspace.setActiveLeaf_1.md) + +## Workspace.setActiveLeaf() method + +> Warning: This API is now obsolete. +> +> - function signature changed. Use other form instead +> + +**Signature:** + +```typescript +setActiveLeaf(leaf: WorkspaceLeaf, pushHistory: boolean, focus: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| leaf | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | +| pushHistory | boolean | | +| focus | boolean | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/splitActiveLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/splitActiveLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..2907a31f765e7e59f1f18448e18cf8237ee0b796 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/splitActiveLeaf.md @@ -0,0 +1,32 @@ +--- +aliases: "obsidian.Workspace.splitActiveLeaf.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`splitActiveLeaf`](obsidian.Workspace.splitActiveLeaf.md) + +## Workspace.splitActiveLeaf() method + +> Warning: This API is now obsolete. +> +> - You should use [ | getLeaf(true)](obsidian.workspace.getleaf_1.md) instead which does the same thing. +> + +**Signature:** + +```typescript +splitActiveLeaf(direction?: SplitDirection): WorkspaceLeaf; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| direction | [`SplitDirection`](obsidian.SplitDirection.md) | _(Optional)_ | + +**Returns:** + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/Workspace/updateOptions.md b/docs/obsidian-developer/Reference/TypeScript API/Workspace/updateOptions.md new file mode 100644 index 0000000000000000000000000000000000000000..5793a9e5d6e0082d4a60415e016b8ae880deaa5d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/Workspace/updateOptions.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.Workspace.updateOptions.md" +cssclasses: hide-title +--- + + + +[`Workspace`](obsidian.Workspace.md) › [`updateOptions`](obsidian.Workspace.updateOptions.md) + +## Workspace.updateOptions() method + +Calling this function will update/reconfigure the options of all markdown panes. It is fairly expensive, so it should not be called frequently. + +**Signature:** + +```typescript +updateOptions(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceContainer.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceContainer.md new file mode 100644 index 0000000000000000000000000000000000000000..950f5a483597fb9d8ed4562f01e6c203689e5b56 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceContainer.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.WorkspaceContainer.md" +cssclasses: hide-title +--- + + + +[`WorkspaceContainer`](obsidian.WorkspaceContainer.md) + +## WorkspaceContainer class + + +**Signature:** + +```typescript +export abstract class WorkspaceContainer extends WorkspaceSplit +``` +**Extends:** [`WorkspaceSplit`](obsidian.WorkspaceSplit.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`doc`](obsidian.WorkspaceContainer.doc.md) | abstract | Document | | +| [`win`](obsidian.WorkspaceContainer.win.md) | abstract | Window | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceContainer/doc.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceContainer/doc.md new file mode 100644 index 0000000000000000000000000000000000000000..15e807be0ceb65b9d8a6fcffa1d7bb097d3493a0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceContainer/doc.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.WorkspaceContainer.doc.md" +cssclasses: hide-title +--- + + + +[`WorkspaceContainer`](obsidian.WorkspaceContainer.md) › [`doc`](obsidian.WorkspaceContainer.doc.md) + +## WorkspaceContainer.doc property + + +**Signature:** + +```typescript +abstract doc: Document; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceContainer/win.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceContainer/win.md new file mode 100644 index 0000000000000000000000000000000000000000..9d2a372c21dea3d89b4c441659a1ff90e29bd2d6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceContainer/win.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.WorkspaceContainer.win.md" +cssclasses: hide-title +--- + + + +[`WorkspaceContainer`](obsidian.WorkspaceContainer.md) › [`win`](obsidian.WorkspaceContainer.win.md) + +## WorkspaceContainer.win property + + +**Signature:** + +```typescript +abstract win: Window; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceFloating.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceFloating.md new file mode 100644 index 0000000000000000000000000000000000000000..c2af562f3b5acc71d2c4fb440df59829d47c79e9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceFloating.md @@ -0,0 +1,19 @@ +--- +aliases: "obsidian.WorkspaceFloating.md" +cssclasses: hide-title +--- + + + +[`WorkspaceFloating`](obsidian.WorkspaceFloating.md) + +## WorkspaceFloating class + + +**Signature:** + +```typescript +export class WorkspaceFloating extends WorkspaceParent +``` +**Extends:** [`WorkspaceParent`](obsidian.WorkspaceParent.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceItem.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceItem.md new file mode 100644 index 0000000000000000000000000000000000000000..7c8283c860de5bbfb9b4c45507049fcb56b86e7c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceItem.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.WorkspaceItem.md" +cssclasses: hide-title +--- + + + +[`WorkspaceItem`](obsidian.WorkspaceItem.md) + +## WorkspaceItem class + + +**Signature:** + +```typescript +export abstract class WorkspaceItem extends Events +``` +**Extends:** [`Events`](obsidian.Events.md) + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`getContainer()`](obsidian.WorkspaceItem.getContainer.md) | | Get the root container parent item, which can be one of: - [WorkspaceRoot](obsidian.WorkspaceRoot.md) - [WorkspaceWindow](obsidian.WorkspaceWindow.md) | +| [`getRoot()`](obsidian.WorkspaceItem.getRoot.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceItem/getContainer.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceItem/getContainer.md new file mode 100644 index 0000000000000000000000000000000000000000..d27fa6ea7a919bafa3b079e2d1ae21c34342f733 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceItem/getContainer.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.WorkspaceItem.getContainer.md" +cssclasses: hide-title +--- + + + +[`WorkspaceItem`](obsidian.WorkspaceItem.md) › [`getContainer`](obsidian.WorkspaceItem.getContainer.md) + +## WorkspaceItem.getContainer() method + +Get the root container parent item, which can be one of: - [WorkspaceRoot](obsidian.WorkspaceRoot.md) - [WorkspaceWindow](obsidian.WorkspaceWindow.md) + +**Signature:** + +```typescript +getContainer(): WorkspaceContainer; +``` +**Returns:** + +[`WorkspaceContainer`](obsidian.WorkspaceContainer.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceItem/getRoot.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceItem/getRoot.md new file mode 100644 index 0000000000000000000000000000000000000000..b89ea7d1db5d61ecbdbbf2e4e7541345e521a54d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceItem/getRoot.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceItem.getRoot.md" +cssclasses: hide-title +--- + + + +[`WorkspaceItem`](obsidian.WorkspaceItem.md) › [`getRoot`](obsidian.WorkspaceItem.getRoot.md) + +## WorkspaceItem.getRoot() method + + +**Signature:** + +```typescript +getRoot(): WorkspaceItem; +``` +**Returns:** + +[`WorkspaceItem`](obsidian.WorkspaceItem.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf.md new file mode 100644 index 0000000000000000000000000000000000000000..e6352cf584fba0b1a3a26542f2f8a5b36106be79 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf.md @@ -0,0 +1,46 @@ +--- +aliases: "obsidian.WorkspaceLeaf.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) + +## WorkspaceLeaf class + + +**Signature:** + +```typescript +export class WorkspaceLeaf extends WorkspaceItem +``` +**Extends:** [`WorkspaceItem`](obsidian.WorkspaceItem.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`view`](obsidian.WorkspaceLeaf.view.md) | | [`View`](obsidian.View.md) | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`detach()`](obsidian.WorkspaceLeaf.detach.md) | | | +| [`getDisplayText()`](obsidian.WorkspaceLeaf.getDisplayText.md) | | | +| [`getEphemeralState()`](obsidian.WorkspaceLeaf.getEphemeralState.md) | | | +| [`getIcon()`](obsidian.WorkspaceLeaf.getIcon.md) | | | +| [`getViewState()`](obsidian.WorkspaceLeaf.getViewState.md) | | | +| [`on(name, callback, ctx)`](obsidian.WorkspaceLeaf.on.md) | | | +| [`on(name, callback, ctx)`](obsidian.WorkspaceLeaf.on_1.md) | | | +| [`onResize()`](obsidian.WorkspaceLeaf.onResize.md) | | | +| [`open(view)`](obsidian.WorkspaceLeaf.open.md) | | | +| [`openFile(file, openState)`](obsidian.WorkspaceLeaf.openFile.md) | | By default, openFile will also make the leaf active. Pass in { active: false } to override. | +| [`setEphemeralState(state)`](obsidian.WorkspaceLeaf.setEphemeralState.md) | | | +| [`setGroup(group)`](obsidian.WorkspaceLeaf.setGroup.md) | | | +| [`setGroupMember(other)`](obsidian.WorkspaceLeaf.setGroupMember.md) | | | +| [`setPinned(pinned)`](obsidian.WorkspaceLeaf.setPinned.md) | | | +| [`setViewState(viewState, eState)`](obsidian.WorkspaceLeaf.setViewState.md) | | | +| [`togglePinned()`](obsidian.WorkspaceLeaf.togglePinned.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/detach.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/detach.md new file mode 100644 index 0000000000000000000000000000000000000000..22ab6e712ee3001b00b0ca6a5c00cc99da13e32e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/detach.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceLeaf.detach.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`detach`](obsidian.WorkspaceLeaf.detach.md) + +## WorkspaceLeaf.detach() method + + +**Signature:** + +```typescript +detach(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getDisplayText.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getDisplayText.md new file mode 100644 index 0000000000000000000000000000000000000000..350627ec7f20662c395cc09f3ba034dddafdb904 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getDisplayText.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceLeaf.getDisplayText.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`getDisplayText`](obsidian.WorkspaceLeaf.getDisplayText.md) + +## WorkspaceLeaf.getDisplayText() method + + +**Signature:** + +```typescript +getDisplayText(): string; +``` +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getEphemeralState.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getEphemeralState.md new file mode 100644 index 0000000000000000000000000000000000000000..c82039208aaee692af8c5f0cdcc1da74dc53da70 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getEphemeralState.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceLeaf.getEphemeralState.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`getEphemeralState`](obsidian.WorkspaceLeaf.getEphemeralState.md) + +## WorkspaceLeaf.getEphemeralState() method + + +**Signature:** + +```typescript +getEphemeralState(): any; +``` +**Returns:** + +`any` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getIcon.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getIcon.md new file mode 100644 index 0000000000000000000000000000000000000000..153f35cf9ae6c11153a93e6ec9f04ea4c0e6b45d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getIcon.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceLeaf.getIcon.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`getIcon`](obsidian.WorkspaceLeaf.getIcon.md) + +## WorkspaceLeaf.getIcon() method + + +**Signature:** + +```typescript +getIcon(): IconName; +``` +**Returns:** + +[`IconName`](obsidian.IconName.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getViewState.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getViewState.md new file mode 100644 index 0000000000000000000000000000000000000000..1721b6d6bc5023e09e56946815f3df0efd4cbccd --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/getViewState.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceLeaf.getViewState.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`getViewState`](obsidian.WorkspaceLeaf.getViewState.md) + +## WorkspaceLeaf.getViewState() method + + +**Signature:** + +```typescript +getViewState(): ViewState; +``` +**Returns:** + +[`ViewState`](obsidian.ViewState.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/on.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/on.md new file mode 100644 index 0000000000000000000000000000000000000000..64417b9dc0ae6ee16e1f8936157b6a0a5410b646 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/on.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.WorkspaceLeaf.on.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`on`](obsidian.WorkspaceLeaf.on.md) + +## WorkspaceLeaf.on() method + + +**Signature:** + +```typescript +on(name: 'pinned-change', callback: (pinned: boolean) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'pinned-change' | | +| callback | (pinned: boolean) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/onResize.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/onResize.md new file mode 100644 index 0000000000000000000000000000000000000000..37caa23943f839097929f7f2788772a105a5505c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/onResize.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceLeaf.onResize.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`onResize`](obsidian.WorkspaceLeaf.onResize.md) + +## WorkspaceLeaf.onResize() method + + +**Signature:** + +```typescript +onResize(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/on_1.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/on_1.md new file mode 100644 index 0000000000000000000000000000000000000000..4cc32c7a13a37f39ee94ea23947a21fa1b6fa034 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/on_1.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.WorkspaceLeaf.on_1.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`on`](obsidian.WorkspaceLeaf.on_1.md) + +## WorkspaceLeaf.on() method + + +**Signature:** + +```typescript +on(name: 'group-change', callback: (group: string) => any, ctx?: any): EventRef; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | 'group-change' | | +| callback | (group: string) => any | | +| ctx | any | _(Optional)_ | + +**Returns:** + +[`EventRef`](obsidian.EventRef.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/open.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/open.md new file mode 100644 index 0000000000000000000000000000000000000000..6a6ecb476f578f7ff84193713e8d56744754ce3a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/open.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.WorkspaceLeaf.open.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`open`](obsidian.WorkspaceLeaf.open.md) + +## WorkspaceLeaf.open() method + + +**Signature:** + +```typescript +open(view: View): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| view | [`View`](obsidian.View.md) | | + +**Returns:** + +`Promise``<`[`View`](obsidian.View.md)`>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/openFile.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/openFile.md new file mode 100644 index 0000000000000000000000000000000000000000..704539cefd3d58684dce353b0c66173e07994ae4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/openFile.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.WorkspaceLeaf.openFile.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`openFile`](obsidian.WorkspaceLeaf.openFile.md) + +## WorkspaceLeaf.openFile() method + +By default, `openFile` will also make the leaf active. Pass in `{ active: false }` to override. + +**Signature:** + +```typescript +openFile(file: TFile, openState?: OpenViewState): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| file | [`TFile`](obsidian.TFile.md) | | +| openState | [`OpenViewState`](obsidian.OpenViewState.md) | _(Optional)_ | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setEphemeralState.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setEphemeralState.md new file mode 100644 index 0000000000000000000000000000000000000000..bf3a56caaa394a214ca61e49d268878ecd198509 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setEphemeralState.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.WorkspaceLeaf.setEphemeralState.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`setEphemeralState`](obsidian.WorkspaceLeaf.setEphemeralState.md) + +## WorkspaceLeaf.setEphemeralState() method + + +**Signature:** + +```typescript +setEphemeralState(state: any): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| state | any | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setGroup.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setGroup.md new file mode 100644 index 0000000000000000000000000000000000000000..14fc59411a8034862336b7ea4a697236f1a60f1b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setGroup.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.WorkspaceLeaf.setGroup.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`setGroup`](obsidian.WorkspaceLeaf.setGroup.md) + +## WorkspaceLeaf.setGroup() method + + +**Signature:** + +```typescript +setGroup(group: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| group | string | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setGroupMember.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setGroupMember.md new file mode 100644 index 0000000000000000000000000000000000000000..4446739de196b83834143a0f521ca1c176ce4893 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setGroupMember.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.WorkspaceLeaf.setGroupMember.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`setGroupMember`](obsidian.WorkspaceLeaf.setGroupMember.md) + +## WorkspaceLeaf.setGroupMember() method + + +**Signature:** + +```typescript +setGroupMember(other: WorkspaceLeaf): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| other | [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setPinned.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setPinned.md new file mode 100644 index 0000000000000000000000000000000000000000..c35d676917f52131ded24c0ce2b27a51e1dc20b4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setPinned.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.WorkspaceLeaf.setPinned.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`setPinned`](obsidian.WorkspaceLeaf.setPinned.md) + +## WorkspaceLeaf.setPinned() method + + +**Signature:** + +```typescript +setPinned(pinned: boolean): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| pinned | boolean | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setViewState.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setViewState.md new file mode 100644 index 0000000000000000000000000000000000000000..87f29547433aff09dbf6aaffe99ec45de0a24dde --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/setViewState.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.WorkspaceLeaf.setViewState.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`setViewState`](obsidian.WorkspaceLeaf.setViewState.md) + +## WorkspaceLeaf.setViewState() method + + +**Signature:** + +```typescript +setViewState(viewState: ViewState, eState?: any): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| viewState | [`ViewState`](obsidian.ViewState.md) | | +| eState | any | _(Optional)_ | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/togglePinned.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/togglePinned.md new file mode 100644 index 0000000000000000000000000000000000000000..563697f5e604e9ddf501b071483012c1cb43057b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/togglePinned.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceLeaf.togglePinned.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`togglePinned`](obsidian.WorkspaceLeaf.togglePinned.md) + +## WorkspaceLeaf.togglePinned() method + + +**Signature:** + +```typescript +togglePinned(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/view.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/view.md new file mode 100644 index 0000000000000000000000000000000000000000..499a61d664ab2e121be963f535adead9b2c03b26 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceLeaf/view.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.WorkspaceLeaf.view.md" +cssclasses: hide-title +--- + + + +[`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) › [`view`](obsidian.WorkspaceLeaf.view.md) + +## WorkspaceLeaf.view property + + +**Signature:** + +```typescript +view: View; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer.md new file mode 100644 index 0000000000000000000000000000000000000000..c0d049d7d4a33be86556f3ba8593b0426f31c78a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.WorkspaceMobileDrawer.md" +cssclasses: hide-title +--- + + + +[`WorkspaceMobileDrawer`](obsidian.WorkspaceMobileDrawer.md) + +## WorkspaceMobileDrawer class + + +**Signature:** + +```typescript +export class WorkspaceMobileDrawer extends WorkspaceParent +``` +**Extends:** [`WorkspaceParent`](obsidian.WorkspaceParent.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`collapsed`](obsidian.WorkspaceMobileDrawer.collapsed.md) | | boolean | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`collapse()`](obsidian.WorkspaceMobileDrawer.collapse.md) | | | +| [`expand()`](obsidian.WorkspaceMobileDrawer.expand.md) | | | +| [`toggle()`](obsidian.WorkspaceMobileDrawer.toggle.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/collapse.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/collapse.md new file mode 100644 index 0000000000000000000000000000000000000000..5f002ddc8bce48db1888a5c8a987de2c122fced2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/collapse.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceMobileDrawer.collapse.md" +cssclasses: hide-title +--- + + + +[`WorkspaceMobileDrawer`](obsidian.WorkspaceMobileDrawer.md) › [`collapse`](obsidian.WorkspaceMobileDrawer.collapse.md) + +## WorkspaceMobileDrawer.collapse() method + + +**Signature:** + +```typescript +collapse(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/collapsed.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/collapsed.md new file mode 100644 index 0000000000000000000000000000000000000000..df356d92182eb62843548067c42d4961e6081b90 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/collapsed.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.WorkspaceMobileDrawer.collapsed.md" +cssclasses: hide-title +--- + + + +[`WorkspaceMobileDrawer`](obsidian.WorkspaceMobileDrawer.md) › [`collapsed`](obsidian.WorkspaceMobileDrawer.collapsed.md) + +## WorkspaceMobileDrawer.collapsed property + + +**Signature:** + +```typescript +collapsed: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/expand.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/expand.md new file mode 100644 index 0000000000000000000000000000000000000000..ae13f64d1d364dd28ec56e8377f6a2d3a444e0d8 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/expand.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceMobileDrawer.expand.md" +cssclasses: hide-title +--- + + + +[`WorkspaceMobileDrawer`](obsidian.WorkspaceMobileDrawer.md) › [`expand`](obsidian.WorkspaceMobileDrawer.expand.md) + +## WorkspaceMobileDrawer.expand() method + + +**Signature:** + +```typescript +expand(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/toggle.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/toggle.md new file mode 100644 index 0000000000000000000000000000000000000000..9bcdc0806fa095a59692316b0c64bf58894c3cf6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceMobileDrawer/toggle.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceMobileDrawer.toggle.md" +cssclasses: hide-title +--- + + + +[`WorkspaceMobileDrawer`](obsidian.WorkspaceMobileDrawer.md) › [`toggle`](obsidian.WorkspaceMobileDrawer.toggle.md) + +## WorkspaceMobileDrawer.toggle() method + + +**Signature:** + +```typescript +toggle(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceParent.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceParent.md new file mode 100644 index 0000000000000000000000000000000000000000..b0a129d4af2a5f03f80ed84fea0435df01bafb1c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceParent.md @@ -0,0 +1,19 @@ +--- +aliases: "obsidian.WorkspaceParent.md" +cssclasses: hide-title +--- + + + +[`WorkspaceParent`](obsidian.WorkspaceParent.md) + +## WorkspaceParent class + + +**Signature:** + +```typescript +export abstract class WorkspaceParent extends WorkspaceItem +``` +**Extends:** [`WorkspaceItem`](obsidian.WorkspaceItem.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRibbon.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRibbon.md new file mode 100644 index 0000000000000000000000000000000000000000..0e5e2a1af330d6ef434a1068d88292033bfafcab --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRibbon.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.WorkspaceRibbon.md" +cssclasses: hide-title +--- + + + +[`WorkspaceRibbon`](obsidian.WorkspaceRibbon.md) + +## WorkspaceRibbon class + + +**Signature:** + +```typescript +export class WorkspaceRibbon +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRoot.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRoot.md new file mode 100644 index 0000000000000000000000000000000000000000..c5a6eeeaff3470948185406d08134e7bc1353f55 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRoot.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.WorkspaceRoot.md" +cssclasses: hide-title +--- + + + +[`WorkspaceRoot`](obsidian.WorkspaceRoot.md) + +## WorkspaceRoot class + + +**Signature:** + +```typescript +export class WorkspaceRoot extends WorkspaceContainer +``` +**Extends:** [`WorkspaceContainer`](obsidian.WorkspaceContainer.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`doc`](obsidian.WorkspaceRoot.doc.md) | | Document | | +| [`win`](obsidian.WorkspaceRoot.win.md) | | Window | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRoot/doc.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRoot/doc.md new file mode 100644 index 0000000000000000000000000000000000000000..42997cd5bfc92ff71a261b1d9f640a227319909b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRoot/doc.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.WorkspaceRoot.doc.md" +cssclasses: hide-title +--- + + + +[`WorkspaceRoot`](obsidian.WorkspaceRoot.md) › [`doc`](obsidian.WorkspaceRoot.doc.md) + +## WorkspaceRoot.doc property + + +**Signature:** + +```typescript +doc: Document; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRoot/win.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRoot/win.md new file mode 100644 index 0000000000000000000000000000000000000000..5ef387329016114abaaed96fd9f0638391c2f33b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceRoot/win.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.WorkspaceRoot.win.md" +cssclasses: hide-title +--- + + + +[`WorkspaceRoot`](obsidian.WorkspaceRoot.md) › [`win`](obsidian.WorkspaceRoot.win.md) + +## WorkspaceRoot.win property + + +**Signature:** + +```typescript +win: Window; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock.md new file mode 100644 index 0000000000000000000000000000000000000000..858e0c4a98aa02a01789399445b4c7ac3a083c53 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock.md @@ -0,0 +1,33 @@ +--- +aliases: "obsidian.WorkspaceSidedock.md" +cssclasses: hide-title +--- + + + +[`WorkspaceSidedock`](obsidian.WorkspaceSidedock.md) + +## WorkspaceSidedock class + + +**Signature:** + +```typescript +export class WorkspaceSidedock extends WorkspaceSplit +``` +**Extends:** [`WorkspaceSplit`](obsidian.WorkspaceSplit.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`collapsed`](obsidian.WorkspaceSidedock.collapsed.md) | | boolean | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [`collapse()`](obsidian.WorkspaceSidedock.collapse.md) | | | +| [`expand()`](obsidian.WorkspaceSidedock.expand.md) | | | +| [`toggle()`](obsidian.WorkspaceSidedock.toggle.md) | | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/collapse.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/collapse.md new file mode 100644 index 0000000000000000000000000000000000000000..ed1e48e1c1a41026be26b1c9cbf4c3812f8056f3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/collapse.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceSidedock.collapse.md" +cssclasses: hide-title +--- + + + +[`WorkspaceSidedock`](obsidian.WorkspaceSidedock.md) › [`collapse`](obsidian.WorkspaceSidedock.collapse.md) + +## WorkspaceSidedock.collapse() method + + +**Signature:** + +```typescript +collapse(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/collapsed.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/collapsed.md new file mode 100644 index 0000000000000000000000000000000000000000..a06d6e9e551214e054f249832f7c2037c8c3153a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/collapsed.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.WorkspaceSidedock.collapsed.md" +cssclasses: hide-title +--- + + + +[`WorkspaceSidedock`](obsidian.WorkspaceSidedock.md) › [`collapsed`](obsidian.WorkspaceSidedock.collapsed.md) + +## WorkspaceSidedock.collapsed property + + +**Signature:** + +```typescript +collapsed: boolean; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/expand.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/expand.md new file mode 100644 index 0000000000000000000000000000000000000000..285205c141421672a3cd9ee79e81ebc6b6f9bff6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/expand.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceSidedock.expand.md" +cssclasses: hide-title +--- + + + +[`WorkspaceSidedock`](obsidian.WorkspaceSidedock.md) › [`expand`](obsidian.WorkspaceSidedock.expand.md) + +## WorkspaceSidedock.expand() method + + +**Signature:** + +```typescript +expand(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/toggle.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/toggle.md new file mode 100644 index 0000000000000000000000000000000000000000..5a3829177f2ddb6556f21b8a3ec6e644033cda5a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSidedock/toggle.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceSidedock.toggle.md" +cssclasses: hide-title +--- + + + +[`WorkspaceSidedock`](obsidian.WorkspaceSidedock.md) › [`toggle`](obsidian.WorkspaceSidedock.toggle.md) + +## WorkspaceSidedock.toggle() method + + +**Signature:** + +```typescript +toggle(): void; +``` +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSplit.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSplit.md new file mode 100644 index 0000000000000000000000000000000000000000..3939ef67416cfacdc36d3a35167599236e92eb6c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceSplit.md @@ -0,0 +1,19 @@ +--- +aliases: "obsidian.WorkspaceSplit.md" +cssclasses: hide-title +--- + + + +[`WorkspaceSplit`](obsidian.WorkspaceSplit.md) + +## WorkspaceSplit class + + +**Signature:** + +```typescript +export class WorkspaceSplit extends WorkspaceParent +``` +**Extends:** [`WorkspaceParent`](obsidian.WorkspaceParent.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceTabs.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceTabs.md new file mode 100644 index 0000000000000000000000000000000000000000..34797253d61b29f14f843cfb91ba84740b2926a5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceTabs.md @@ -0,0 +1,19 @@ +--- +aliases: "obsidian.WorkspaceTabs.md" +cssclasses: hide-title +--- + + + +[`WorkspaceTabs`](obsidian.WorkspaceTabs.md) + +## WorkspaceTabs class + + +**Signature:** + +```typescript +export class WorkspaceTabs extends WorkspaceParent +``` +**Extends:** [`WorkspaceParent`](obsidian.WorkspaceParent.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindow.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindow.md new file mode 100644 index 0000000000000000000000000000000000000000..8c3d1dc3053251542383a9670546f7affe514428 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindow.md @@ -0,0 +1,26 @@ +--- +aliases: "obsidian.WorkspaceWindow.md" +cssclasses: hide-title +--- + + + +[`WorkspaceWindow`](obsidian.WorkspaceWindow.md) + +## WorkspaceWindow class + + +**Signature:** + +```typescript +export class WorkspaceWindow extends WorkspaceContainer +``` +**Extends:** [`WorkspaceContainer`](obsidian.WorkspaceContainer.md) + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`doc`](obsidian.WorkspaceWindow.doc.md) | | Document | | +| [`win`](obsidian.WorkspaceWindow.win.md) | | Window | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindow/doc.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindow/doc.md new file mode 100644 index 0000000000000000000000000000000000000000..5a56b809735dfb3e79916e695a31727df8592eb2 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindow/doc.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.WorkspaceWindow.doc.md" +cssclasses: hide-title +--- + + + +[`WorkspaceWindow`](obsidian.WorkspaceWindow.md) › [`doc`](obsidian.WorkspaceWindow.doc.md) + +## WorkspaceWindow.doc property + + +**Signature:** + +```typescript +doc: Document; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindow/win.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindow/win.md new file mode 100644 index 0000000000000000000000000000000000000000..356a1219338e39e166f34de8f430ff312711363d --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindow/win.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.WorkspaceWindow.win.md" +cssclasses: hide-title +--- + + + +[`WorkspaceWindow`](obsidian.WorkspaceWindow.md) › [`win`](obsidian.WorkspaceWindow.win.md) + +## WorkspaceWindow.win property + + +**Signature:** + +```typescript +win: Window; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindowInitData.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindowInitData.md new file mode 100644 index 0000000000000000000000000000000000000000..d91bc37ca1efb53cfb96c5c5eb363b232a115f25 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindowInitData.md @@ -0,0 +1,24 @@ +--- +aliases: "obsidian.WorkspaceWindowInitData.md" +cssclasses: hide-title +--- + + + +[`WorkspaceWindowInitData`](obsidian.WorkspaceWindowInitData.md) + +## WorkspaceWindowInitData interface + + +**Signature:** + +```typescript +export interface WorkspaceWindowInitData +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [`size?`](obsidian.WorkspaceWindowInitData.size.md) | | { width: number; height: number; } | _(Optional)_ The suggested size | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindowInitData/size.md b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindowInitData/size.md new file mode 100644 index 0000000000000000000000000000000000000000..9204e9f1857876cf457805d25ab5201f0352d157 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/WorkspaceWindowInitData/size.md @@ -0,0 +1,21 @@ +--- +aliases: "obsidian.WorkspaceWindowInitData.size.md" +cssclasses: hide-title +--- + + + +[`WorkspaceWindowInitData`](obsidian.WorkspaceWindowInitData.md) › [`size`](obsidian.WorkspaceWindowInitData.size.md) + +## WorkspaceWindowInitData.size property + +The suggested size + +**Signature:** + +```typescript +size?: { + width: number; + height: number; + }; +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/addIcon.md b/docs/obsidian-developer/Reference/TypeScript API/addIcon.md new file mode 100644 index 0000000000000000000000000000000000000000..b179b24547c01f293d3011a5244a2e2797d55849 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/addIcon.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.addIcon.md" +cssclasses: hide-title +--- + + + +[`addIcon`](obsidian.addIcon.md) + +## addIcon() function + +Adds an icon to the library. + +**Signature:** + +```typescript +export function addIcon(iconId: string, svgContent: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| iconId | string | the icon ID | +| svgContent | string | the content of the SVG. | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/apiVersion.md b/docs/obsidian-developer/Reference/TypeScript API/apiVersion.md new file mode 100644 index 0000000000000000000000000000000000000000..8c54fcd7481e55d2c10913ee2bd32478a799c98b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/apiVersion.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.apiVersion.md" +cssclasses: hide-title +--- + + + +[`apiVersion`](obsidian.apiVersion.md) + +## apiVersion variable + +This is the API version of the app, which follows the release cycle of the desktop app. Example: "0.13.21" + +**Signature:** + +```typescript +apiVersion: string +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/arrayBufferToBase64.md b/docs/obsidian-developer/Reference/TypeScript API/arrayBufferToBase64.md new file mode 100644 index 0000000000000000000000000000000000000000..c38c1295f0524811e01fe3fdf7ea2a30d34df264 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/arrayBufferToBase64.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.arrayBufferToBase64.md" +cssclasses: hide-title +--- + + + +[`arrayBufferToBase64`](obsidian.arrayBufferToBase64.md) + +## arrayBufferToBase64() function + + +**Signature:** + +```typescript +export function arrayBufferToBase64(buffer: ArrayBuffer): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| buffer | ArrayBuffer | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/arrayBufferToHex.md b/docs/obsidian-developer/Reference/TypeScript API/arrayBufferToHex.md new file mode 100644 index 0000000000000000000000000000000000000000..042ad2b616c737d56b8eb6343d2620fd841492ec --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/arrayBufferToHex.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.arrayBufferToHex.md" +cssclasses: hide-title +--- + + + +[`arrayBufferToHex`](obsidian.arrayBufferToHex.md) + +## arrayBufferToHex() function + + +**Signature:** + +```typescript +export function arrayBufferToHex(data: ArrayBuffer): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| data | ArrayBuffer | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/base64ToArrayBuffer.md b/docs/obsidian-developer/Reference/TypeScript API/base64ToArrayBuffer.md new file mode 100644 index 0000000000000000000000000000000000000000..7272e9ceb335857118eb9d05d966dee664d6e551 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/base64ToArrayBuffer.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.base64ToArrayBuffer.md" +cssclasses: hide-title +--- + + + +[`base64ToArrayBuffer`](obsidian.base64ToArrayBuffer.md) + +## base64ToArrayBuffer() function + + +**Signature:** + +```typescript +export function base64ToArrayBuffer(base64: string): ArrayBuffer; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| base64 | string | | + +**Returns:** + +`ArrayBuffer` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/debounce.md b/docs/obsidian-developer/Reference/TypeScript API/debounce.md new file mode 100644 index 0000000000000000000000000000000000000000..11fb77bc6d8d2185d494d9015bd494b74d23f2e0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/debounce.md @@ -0,0 +1,45 @@ +--- +aliases: "obsidian.debounce.md" +cssclasses: hide-title +--- + + + +[`debounce`](obsidian.debounce.md) + +## debounce() function + +A standard debounce function. Use this to have a time-delayed function only be called once in a given timeframe. + +**Signature:** + +```typescript +export function debounce(cb: (...args: [...T]) => V, timeout?: number, resetTimer?: boolean): Debouncer; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cb | (...args: [...T]) => V | The function to call. | +| timeout | number | _(Optional)_ The timeout to wait, in milliseconds | +| resetTimer | boolean | _(Optional)_ Whether to reset the timeout when the debouncer is called again. | + +**Returns:** + +[`Debouncer`](obsidian.Debouncer.md)`` + +a debounced function that takes the same parameter as the original function. + +## Example + + +```ts +const debounced = debounce((text: string) => { + console.log(text); +}, 1000, true); +debounced("Hello world"); // this will not be printed +sleep(500); +debounced("World, hello"); // this will be printed to the console. +``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/editorEditorField.md b/docs/obsidian-developer/Reference/TypeScript API/editorEditorField.md new file mode 100644 index 0000000000000000000000000000000000000000..089ad8f62d783f966960d3d33d8f5da3830cfde6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/editorEditorField.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.editorEditorField.md" +cssclasses: hide-title +--- + + + +[`editorEditorField`](obsidian.editorEditorField.md) + +## editorEditorField variable + +Use this StateField to get a reference to the EditorView + +**Signature:** + +```typescript +editorEditorField: StateField +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/editorInfoField.md b/docs/obsidian-developer/Reference/TypeScript API/editorInfoField.md new file mode 100644 index 0000000000000000000000000000000000000000..46f4514db147feba063e709e35e9a623bff3a554 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/editorInfoField.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.editorInfoField.md" +cssclasses: hide-title +--- + + + +[`editorInfoField`](obsidian.editorInfoField.md) + +## editorInfoField variable + +Use this StateField to get information about this markdown editor, such as the associated file, or the Editor. + +**Signature:** + +```typescript +editorInfoField: StateField +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/editorLivePreviewField.md b/docs/obsidian-developer/Reference/TypeScript API/editorLivePreviewField.md new file mode 100644 index 0000000000000000000000000000000000000000..49f5d21abbfa5dcc481f4376f6d54fcf269f35c7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/editorLivePreviewField.md @@ -0,0 +1,18 @@ +--- +aliases: "obsidian.editorLivePreviewField.md" +cssclasses: hide-title +--- + + + +[`editorLivePreviewField`](obsidian.editorLivePreviewField.md) + +## editorLivePreviewField variable + +Use this StateField to check whether Live Preview is active + +**Signature:** + +```typescript +editorLivePreviewField: StateField +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/editorViewField.md b/docs/obsidian-developer/Reference/TypeScript API/editorViewField.md new file mode 100644 index 0000000000000000000000000000000000000000..04186b3e16637fc987a0d7d5125bf54c7c46f4f7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/editorViewField.md @@ -0,0 +1,23 @@ +--- +aliases: "obsidian.editorViewField.md" +cssclasses: hide-title +--- + + + +[`editorViewField`](obsidian.editorViewField.md) + +## editorViewField variable + +> Warning: This API is now obsolete. +> +> use [editorInfoField](obsidian.editorInfoField.md) instead. +> + +Use this StateField to get a reference to the MarkdownView. This is now deprecated because it is possible for an editor to not be associated with a MarkdownView. + +**Signature:** + +```typescript +editorViewField: StateField +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/finishRenderMath.md b/docs/obsidian-developer/Reference/TypeScript API/finishRenderMath.md new file mode 100644 index 0000000000000000000000000000000000000000..003e10e1af72b136843005af23226b9388236eba --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/finishRenderMath.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.finishRenderMath.md" +cssclasses: hide-title +--- + + + +[`finishRenderMath`](obsidian.finishRenderMath.md) + +## finishRenderMath() function + +Flush the MathJax stylesheet. + +**Signature:** + +```typescript +export function finishRenderMath(): Promise; +``` +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/fuzzySearch.md b/docs/obsidian-developer/Reference/TypeScript API/fuzzySearch.md new file mode 100644 index 0000000000000000000000000000000000000000..e9c97f28d3130f9ab2c5a101d62cdf4bd6dbf4b5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/fuzzySearch.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.fuzzySearch.md" +cssclasses: hide-title +--- + + + +[`fuzzySearch`](obsidian.fuzzySearch.md) + +## fuzzySearch() function + + +**Signature:** + +```typescript +export function fuzzySearch(q: PreparedQuery, text: string): SearchResult | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| q | [`PreparedQuery`](obsidian.PreparedQuery.md) | | +| text | string | | + +**Returns:** + +[`SearchResult`](obsidian.SearchResult.md)` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/getAllTags.md b/docs/obsidian-developer/Reference/TypeScript API/getAllTags.md new file mode 100644 index 0000000000000000000000000000000000000000..aa7ac2aba71c05841721565ce00153f9ff1dd88c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/getAllTags.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.getAllTags.md" +cssclasses: hide-title +--- + + + +[`getAllTags`](obsidian.getAllTags.md) + +## getAllTags() function + + +**Signature:** + +```typescript +export function getAllTags(cache: CachedMetadata): string[] | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cache | [`CachedMetadata`](obsidian.CachedMetadata.md) | | + +**Returns:** + +`string[] | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/getBlobArrayBuffer.md b/docs/obsidian-developer/Reference/TypeScript API/getBlobArrayBuffer.md new file mode 100644 index 0000000000000000000000000000000000000000..f507f58f76ef3ed013d2a0153912772261582ce1 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/getBlobArrayBuffer.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.getBlobArrayBuffer.md" +cssclasses: hide-title +--- + + + +[`getBlobArrayBuffer`](obsidian.getBlobArrayBuffer.md) + +## getBlobArrayBuffer() function + + +**Signature:** + +```typescript +export function getBlobArrayBuffer(blob: Blob): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| blob | Blob | | + +**Returns:** + +`Promise``<``ArrayBuffer``>` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/getIcon.md b/docs/obsidian-developer/Reference/TypeScript API/getIcon.md new file mode 100644 index 0000000000000000000000000000000000000000..dcbca049e0e71bbfa89692f46cd6b20f7047d428 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/getIcon.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.getIcon.md" +cssclasses: hide-title +--- + + + +[`getIcon`](obsidian.getIcon.md) + +## getIcon() function + +Create an SVG from an iconId. Returns null if no icon associated with the iconId. + +**Signature:** + +```typescript +export function getIcon(iconId: string): SVGSVGElement | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| iconId | string | the icon ID | + +**Returns:** + +`SVGSVGElement`` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/getIconIds.md b/docs/obsidian-developer/Reference/TypeScript API/getIconIds.md new file mode 100644 index 0000000000000000000000000000000000000000..a6e5adcd5fa54f3ca32bb15665ce0738b7eef463 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/getIconIds.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.getIconIds.md" +cssclasses: hide-title +--- + + + +[`getIconIds`](obsidian.getIconIds.md) + +## getIconIds() function + +Get the list of registered icons. + +**Signature:** + +```typescript +export function getIconIds(): IconName[]; +``` +**Returns:** + +[`IconName`](obsidian.IconName.md)`[]` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/getLinkpath.md b/docs/obsidian-developer/Reference/TypeScript API/getLinkpath.md new file mode 100644 index 0000000000000000000000000000000000000000..6c0cfc885b61ac68e2cce73dabb1f7170af552ce --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/getLinkpath.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.getLinkpath.md" +cssclasses: hide-title +--- + + + +[`getLinkpath`](obsidian.getLinkpath.md) + +## getLinkpath() function + + +**Signature:** + +```typescript +export function getLinkpath(linktext: string): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| linktext | string | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/hexToArrayBuffer.md b/docs/obsidian-developer/Reference/TypeScript API/hexToArrayBuffer.md new file mode 100644 index 0000000000000000000000000000000000000000..490427a448bfb0a4d82dfb3b124e628d18b1d004 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/hexToArrayBuffer.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.hexToArrayBuffer.md" +cssclasses: hide-title +--- + + + +[`hexToArrayBuffer`](obsidian.hexToArrayBuffer.md) + +## hexToArrayBuffer() function + + +**Signature:** + +```typescript +export function hexToArrayBuffer(hex: string): ArrayBuffer; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| hex | string | | + +**Returns:** + +`ArrayBuffer` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/htmlToMarkdown.md b/docs/obsidian-developer/Reference/TypeScript API/htmlToMarkdown.md new file mode 100644 index 0000000000000000000000000000000000000000..65aecc6d273f1abb87999429ece04499228fde9c --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/htmlToMarkdown.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.htmlToMarkdown.md" +cssclasses: hide-title +--- + + + +[`htmlToMarkdown`](obsidian.htmlToMarkdown.md) + +## htmlToMarkdown() function + +Converts HTML to Markdown using Turndown Service. + +**Signature:** + +```typescript +export function htmlToMarkdown(html: string | HTMLElement | Document | DocumentFragment): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| html | string | HTMLElement | Document | DocumentFragment | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/iterateCacheRefs.md b/docs/obsidian-developer/Reference/TypeScript API/iterateCacheRefs.md new file mode 100644 index 0000000000000000000000000000000000000000..ce143ead5cdc8b7a0bc4eb5f46e4c454e2a16d77 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/iterateCacheRefs.md @@ -0,0 +1,36 @@ +--- +aliases: "obsidian.iterateCacheRefs.md" +cssclasses: hide-title +--- + + + +[`iterateCacheRefs`](obsidian.iterateCacheRefs.md) + +## iterateCacheRefs() function + +> Warning: This API is now obsolete. +> +> + +Iterate links and embeds. If callback returns true, the iteration process will be interrupted. + +**Signature:** + +```typescript +export function iterateCacheRefs(cache: CachedMetadata, cb: (ref: ReferenceCache) => boolean | void): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cache | [`CachedMetadata`](obsidian.CachedMetadata.md) | | +| cb | (ref: [`ReferenceCache`](obsidian.ReferenceCache.md)) => boolean | void | | + +**Returns:** + +`boolean` + +true if callback ever returns true, false otherwise. + diff --git a/docs/obsidian-developer/Reference/TypeScript API/iterateRefs.md b/docs/obsidian-developer/Reference/TypeScript API/iterateRefs.md new file mode 100644 index 0000000000000000000000000000000000000000..832cd8535635d47f0129684c44a2bc65b979c79b --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/iterateRefs.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.iterateRefs.md" +cssclasses: hide-title +--- + + + +[`iterateRefs`](obsidian.iterateRefs.md) + +## iterateRefs() function + +**Signature:** + +```typescript +export function iterateRefs(refs: Reference[], cb: (ref: Reference) => boolean | void): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| refs | [`Reference`](obsidian.Reference.md)[] | | +| cb | (ref: [`Reference`](obsidian.Reference.md)) => boolean | void | | + +**Returns:** + +`boolean` + +true if callback ever returns true, false otherwise. + diff --git a/docs/obsidian-developer/Reference/TypeScript API/livePreviewState.md b/docs/obsidian-developer/Reference/TypeScript API/livePreviewState.md new file mode 100644 index 0000000000000000000000000000000000000000..eb73786a37a45fa9c241b9a2c24bd8e66c9a6b49 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/livePreviewState.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.livePreviewState.md" +cssclasses: hide-title +--- + + + +[`livePreviewState`](obsidian.livePreviewState.md) + +## livePreviewState variable + + +**Signature:** + +```typescript +livePreviewState: ViewPlugin +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/loadMathJax.md b/docs/obsidian-developer/Reference/TypeScript API/loadMathJax.md new file mode 100644 index 0000000000000000000000000000000000000000..6b2bf983edb0ecb719513b1275fe48e081455322 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/loadMathJax.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.loadMathJax.md" +cssclasses: hide-title +--- + + + +[`loadMathJax`](obsidian.loadMathJax.md) + +## loadMathJax() function + +Load MathJax. + +**Signature:** + +```typescript +export function loadMathJax(): Promise; +``` +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/loadMermaid.md b/docs/obsidian-developer/Reference/TypeScript API/loadMermaid.md new file mode 100644 index 0000000000000000000000000000000000000000..474ef0bc0fda438e48f8c115dbbb5d1747502fc9 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/loadMermaid.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.loadMermaid.md" +cssclasses: hide-title +--- + + + +[`loadMermaid`](obsidian.loadMermaid.md) + +## loadMermaid() function + +Load Mermaid and return a promise to the global mermaid object. Can also use `mermaid` after this promise resolves to get the same reference. + +**Signature:** + +```typescript +export function loadMermaid(): Promise; +``` +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/loadPdfJs.md b/docs/obsidian-developer/Reference/TypeScript API/loadPdfJs.md new file mode 100644 index 0000000000000000000000000000000000000000..434721a12b7703097609935e2e56f44311878128 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/loadPdfJs.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.loadPdfJs.md" +cssclasses: hide-title +--- + + + +[`loadPdfJs`](obsidian.loadPdfJs.md) + +## loadPdfJs() function + +Load PDF.js and return a promise to the global pdfjsLib object. Can also use `window.pdfjsLib` after this promise resolves to get the same reference. + +**Signature:** + +```typescript +export function loadPdfJs(): Promise; +``` +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/loadPrism.md b/docs/obsidian-developer/Reference/TypeScript API/loadPrism.md new file mode 100644 index 0000000000000000000000000000000000000000..a3be48e08b9ed2f66c0f29b90532d0986e98485e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/loadPrism.md @@ -0,0 +1,22 @@ +--- +aliases: "obsidian.loadPrism.md" +cssclasses: hide-title +--- + + + +[`loadPrism`](obsidian.loadPrism.md) + +## loadPrism() function + +Load Prism.js and return a promise to the global Prism object. Can also use `Prism` after this promise resolves to get the same reference. + +**Signature:** + +```typescript +export function loadPrism(): Promise; +``` +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/md b/docs/obsidian-developer/Reference/TypeScript API/md new file mode 100644 index 0000000000000000000000000000000000000000..cce5f0f9cc36627036d5ec9e957ce8b41a6ccc5f --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/md @@ -0,0 +1,252 @@ +--- +aliases: "obsidian.md" +cssclasses: hide-title +--- + + + + +## obsidian package + +## Classes + +| Class | Description | +| --- | --- | +| [`AbstractTextComponent`](obsidian.AbstractTextComponent.md) | | +| [`App`](obsidian.App.md) | | +| [`ButtonComponent`](obsidian.ButtonComponent.md) | | +| [`ColorComponent`](obsidian.ColorComponent.md) | Color picker component. Values are by default 6-digit hash-prefixed hex strings like #000000. | +| [`Component`](obsidian.Component.md) | | +| [`DropdownComponent`](obsidian.DropdownComponent.md) | | +| [`Events`](obsidian.Events.md) | | +| [`ExtraButtonComponent`](obsidian.ExtraButtonComponent.md) | | +| [`FileManager`](obsidian.FileManager.md) | Manage the creation, deletion and renaming of files from the UI. | +| [`FileSystemAdapter`](obsidian.FileSystemAdapter.md) | | +| [`HoverPopover`](obsidian.HoverPopover.md) | | +| [`Keymap`](obsidian.Keymap.md) | | +| [`MarkdownEditView`](obsidian.MarkdownEditView.md) | This is the editor for Obsidian Mobile as well as the upcoming WYSIWYG editor. | +| [`MarkdownPreviewRenderer`](obsidian.MarkdownPreviewRenderer.md) | | +| [`MarkdownPreviewView`](obsidian.MarkdownPreviewView.md) | | +| [`MarkdownRenderChild`](obsidian.MarkdownRenderChild.md) | | +| [`MarkdownSourceView`](obsidian.MarkdownSourceView.md) | | +| [`MarkdownView`](obsidian.MarkdownView.md) | | +| [`Menu`](obsidian.Menu.md) | | +| [`MenuItem`](obsidian.MenuItem.md) | | +| [`MenuSeparator`](obsidian.MenuSeparator.md) | | +| [`MetadataCache`](obsidian.MetadataCache.md) | Linktext is any internal link that is composed of a path and a subpath, such as "My note\#Heading" Linkpath (or path) is the path part of a linktext Subpath is the heading/block ID part of a linktext. | +| [`Modal`](obsidian.Modal.md) | | +| [`MomentFormatComponent`](obsidian.MomentFormatComponent.md) | | +| [`Notice`](obsidian.Notice.md) | Notification component. Use to present timely, high-value information. | +| [`ProgressBarComponent`](obsidian.ProgressBarComponent.md) | | +| [`Scope`](obsidian.Scope.md) | | +| [`SearchComponent`](obsidian.SearchComponent.md) | | +| [`Setting`](obsidian.Setting.md) | | +| [`SliderComponent`](obsidian.SliderComponent.md) | | +| [`Tasks`](obsidian.Tasks.md) | | +| [`TextAreaComponent`](obsidian.TextAreaComponent.md) | | +| [`TextComponent`](obsidian.TextComponent.md) | | +| [`TFile`](obsidian.TFile.md) | | +| [`TFolder`](obsidian.TFolder.md) | | +| [`ToggleComponent`](obsidian.ToggleComponent.md) | | +| [`Vault`](obsidian.Vault.md) | Work with files and folders stored inside a vault. | +| [`Workspace`](obsidian.Workspace.md) | | +| [`WorkspaceFloating`](obsidian.WorkspaceFloating.md) | | +| [`WorkspaceLeaf`](obsidian.WorkspaceLeaf.md) | | +| [`WorkspaceMobileDrawer`](obsidian.WorkspaceMobileDrawer.md) | | +| [`WorkspaceRibbon`](obsidian.WorkspaceRibbon.md) | | +| [`WorkspaceRoot`](obsidian.WorkspaceRoot.md) | | +| [`WorkspaceSidedock`](obsidian.WorkspaceSidedock.md) | | +| [`WorkspaceSplit`](obsidian.WorkspaceSplit.md) | | +| [`WorkspaceTabs`](obsidian.WorkspaceTabs.md) | | +| [`WorkspaceWindow`](obsidian.WorkspaceWindow.md) | | + +## Abstract Classes + +| Abstract Class | Description | +| --- | --- | +| [`AbstractInputSuggest`](obsidian.AbstractInputSuggest.md) | Attach to an element or a <div contentEditable> to add type-ahead support. | +| [`BaseComponent`](obsidian.BaseComponent.md) | | +| [`EditableFileView`](obsidian.EditableFileView.md) | | +| [`Editor`](obsidian.Editor.md) | A common interface that bridges the gap between CodeMirror 5 and CodeMirror 6. | +| [`EditorSuggest`](obsidian.EditorSuggest.md) | | +| [`FileView`](obsidian.FileView.md) | | +| [`FuzzySuggestModal`](obsidian.FuzzySuggestModal.md) | | +| [`ItemView`](obsidian.ItemView.md) | | +| [`MarkdownRenderer`](obsidian.MarkdownRenderer.md) | | +| [`Plugin\_2`](obsidian.Plugin.md) | | +| [`PluginSettingTab`](obsidian.PluginSettingTab.md) | Provides a unified interface for users to configure the plugin. | +| [`PopoverSuggest`](obsidian.PopoverSuggest.md) | Base class for adding a type-ahead popover. | +| [`SettingTab`](obsidian.SettingTab.md) | | +| [`SuggestModal`](obsidian.SuggestModal.md) | | +| [`TAbstractFile`](obsidian.TAbstractFile.md) | This can be either a TFile or a TFolder. | +| [`TextFileView`](obsidian.TextFileView.md) |

This class implements a plaintext-based editable file view, which can be loaded and saved given an editor.

Note that by default, this view only saves when it's closing. To implement auto-save, your editor should call this.requestSave() when the content is changed.

| +| [`ValueComponent`](obsidian.ValueComponent.md) | | +| [`View`](obsidian.View.md) | | +| [`WorkspaceContainer`](obsidian.WorkspaceContainer.md) | | +| [`WorkspaceItem`](obsidian.WorkspaceItem.md) | | +| [`WorkspaceParent`](obsidian.WorkspaceParent.md) | | + +## Enumerations + +| Enumeration | Description | +| --- | --- | +| [`PopoverState`](obsidian.PopoverState.md) | | + +## Functions + +| Function | Description | +| --- | --- | +| [`addIcon(iconId, svgContent)`](obsidian.addIcon.md) | Adds an icon to the library. | +| [`arrayBufferToBase64(buffer)`](obsidian.arrayBufferToBase64.md) | | +| [`arrayBufferToHex(data)`](obsidian.arrayBufferToHex.md) | | +| [`base64ToArrayBuffer(base64)`](obsidian.base64ToArrayBuffer.md) | | +| [`debounce(cb, timeout, resetTimer)`](obsidian.debounce.md) | A standard debounce function. Use this to have a time-delayed function only be called once in a given timeframe. | +| [`finishRenderMath()`](obsidian.finishRenderMath.md) | Flush the MathJax stylesheet. | +| [`fuzzySearch(q, text)`](obsidian.fuzzySearch.md) | | +| [`getAllTags(cache)`](obsidian.getAllTags.md) | | +| [`getBlobArrayBuffer(blob)`](obsidian.getBlobArrayBuffer.md) | | +| [`getIcon(iconId)`](obsidian.getIcon.md) | Create an SVG from an iconId. Returns null if no icon associated with the iconId. | +| [`getIconIds()`](obsidian.getIconIds.md) | Get the list of registered icons. | +| [`getLinkpath(linktext)`](obsidian.getLinkpath.md) | | +| [`hexToArrayBuffer(hex)`](obsidian.hexToArrayBuffer.md) | | +| [`htmlToMarkdown(html)`](obsidian.htmlToMarkdown.md) | Converts HTML to Markdown using Turndown Service. | +| [`iterateCacheRefs(cache, cb)`](obsidian.iterateCacheRefs.md) | Iterate links and embeds. If callback returns true, the iteration process will be interrupted. | +| [`iterateRefs(refs, cb)`](obsidian.iterateRefs.md) | | +| [`loadMathJax()`](obsidian.loadMathJax.md) | Load MathJax. | +| [`loadMermaid()`](obsidian.loadMermaid.md) | Load Mermaid and return a promise to the global mermaid object. Can also use mermaid after this promise resolves to get the same reference. | +| [`loadPdfJs()`](obsidian.loadPdfJs.md) | Load PDF.js and return a promise to the global pdfjsLib object. Can also use window.pdfjsLib after this promise resolves to get the same reference. | +| [`loadPrism()`](obsidian.loadPrism.md) | Load Prism.js and return a promise to the global Prism object. Can also use Prism after this promise resolves to get the same reference. | +| [`normalizePath(path)`](obsidian.normalizePath.md) | | +| [`parseFrontMatterAliases(frontmatter)`](obsidian.parseFrontMatterAliases.md) | | +| [`parseFrontMatterEntry(frontmatter, key)`](obsidian.parseFrontMatterEntry.md) | | +| [`parseFrontMatterStringArray(frontmatter, key, nospaces)`](obsidian.parseFrontMatterStringArray.md) | | +| [`parseFrontMatterTags(frontmatter)`](obsidian.parseFrontMatterTags.md) | | +| [`parseLinktext(linktext)`](obsidian.parseLinktext.md) | | +| [`parseYaml(yaml)`](obsidian.parseYaml.md) | | +| [`prepareFuzzySearch(query)`](obsidian.prepareFuzzySearch.md) | Construct a fuzzy search callback that runs on a target string. Performance may be an issue if you are running the search for more than a few thousand times. If performance is a problem, consider using prepareSimpleSearch instead. | +| [`prepareQuery(query)`](obsidian.prepareQuery.md) | | +| [`prepareSimpleSearch(query)`](obsidian.prepareSimpleSearch.md) | Construct a simple search callback that runs on a target string. | +| [`removeIcon(iconId)`](obsidian.removeIcon.md) | Remove a custom icon from the library. | +| [`renderMatches(el, text, matches, offset)`](obsidian.renderMatches.md) | | +| [`renderMath(source, display)`](obsidian.renderMath.md) | Render some LaTeX math using the MathJax engine. Returns an HTMLElement. Requires calling finishRenderMath when rendering is all done to flush the MathJax stylesheet. | +| [`renderResults(el, text, result, offset)`](obsidian.renderResults.md) | | +| [`request(request)`](obsidian.request.md) | Similar to fetch(), request a URL using HTTP/HTTPS, without any CORS restrictions. Returns the text value of the response. | +| [`requestUrl(request)`](obsidian.requestUrl.md) | Similar to fetch(), request a URL using HTTP/HTTPS, without any CORS restrictions. | +| [`requireApiVersion(version)`](obsidian.requireApiVersion.md) | Returns true if the API version is equal or higher than the requested version. Use this to limit functionality that require specific API versions to avoid crashing on older Obsidian builds. | +| [`resolveSubpath(cache, subpath)`](obsidian.resolveSubpath.md) | | +| [`sanitizeHTMLToDom(html)`](obsidian.sanitizeHTMLToDom.md) | | +| [`setIcon(parent, iconId)`](obsidian.setIcon.md) | Insert an SVG into the element from an iconId. Does nothing if no icon associated with the iconId. | +| [`setTooltip(el, tooltip, options)`](obsidian.setTooltip.md) | | +| [`sortSearchResults(results)`](obsidian.sortSearchResults.md) | | +| [`stringifyYaml(obj)`](obsidian.stringifyYaml.md) | | +| [`stripHeading(heading)`](obsidian.stripHeading.md) | This function normalizes headings for link matching by stripping out special characters and shrinking consecutive spaces. | +| [`stripHeadingForLink(heading)`](obsidian.stripHeadingForLink.md) | This function prepares headings for linking. It strips out some bad combinations of special characters that could break links. | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [`BlockCache`](obsidian.BlockCache.md) | | +| [`BlockSubpathResult`](obsidian.BlockSubpathResult.md) | | +| [`CachedMetadata`](obsidian.CachedMetadata.md) | | +| [`CacheItem`](obsidian.CacheItem.md) | | +| [`CloseableComponent`](obsidian.CloseableComponent.md) | | +| [`Command`](obsidian.Command.md) | | +| [`DataAdapter`](obsidian.DataAdapter.md) | Work directly with files and folders inside a vault. If possible prefer using the [Vault](obsidian.Vault.md) API over this. | +| [`DataWriteOptions`](obsidian.DataWriteOptions.md) | | +| [`Debouncer`](obsidian.Debouncer.md) | | +| [`EditorChange`](obsidian.EditorChange.md) | | +| [`EditorPosition`](obsidian.EditorPosition.md) | | +| [`EditorRange`](obsidian.EditorRange.md) | | +| [`EditorRangeOrCaret`](obsidian.EditorRangeOrCaret.md) | | +| [`EditorScrollInfo`](obsidian.EditorScrollInfo.md) | | +| [`EditorSelection`](obsidian.EditorSelection.md) | | +| [`EditorSelectionOrCaret`](obsidian.EditorSelectionOrCaret.md) | | +| [`EditorSuggestContext`](obsidian.EditorSuggestContext.md) | | +| [`EditorSuggestTriggerInfo`](obsidian.EditorSuggestTriggerInfo.md) | | +| [`EditorTransaction`](obsidian.EditorTransaction.md) | | +| [`EmbedCache`](obsidian.EmbedCache.md) | | +| [`EventRef`](obsidian.EventRef.md) | | +| [`FileStats`](obsidian.FileStats.md) | | +| [`FrontMatterCache`](obsidian.FrontMatterCache.md) | | +| [`FrontmatterLinkCache`](obsidian.FrontmatterLinkCache.md) | | +| [`FuzzyMatch`](obsidian.FuzzyMatch.md) | | +| [`HeadingCache`](obsidian.HeadingCache.md) | | +| [`HeadingSubpathResult`](obsidian.HeadingSubpathResult.md) | | +| [`Hotkey`](obsidian.Hotkey.md) | | +| [`HoverLinkSource`](obsidian.HoverLinkSource.md) | | +| [`HoverParent`](obsidian.HoverParent.md) | | +| [`HSL`](obsidian.HSL.md) | | +| [`Instruction`](obsidian.Instruction.md) | | +| [`ISuggestOwner`](obsidian.ISuggestOwner.md) | | +| [`KeymapContext`](obsidian.KeymapContext.md) | | +| [`KeymapEventHandler`](obsidian.KeymapEventHandler.md) | | +| [`KeymapInfo`](obsidian.KeymapInfo.md) | | +| [`LinkCache`](obsidian.LinkCache.md) | | +| [`ListedFiles`](obsidian.ListedFiles.md) | | +| [`ListItemCache`](obsidian.ListItemCache.md) | | +| [`LivePreviewState`](obsidian.LivePreviewState.md) | | +| [`Loc`](obsidian.Loc.md) | | +| [`MarkdownFileInfo`](obsidian.MarkdownFileInfo.md) | | +| [`MarkdownPostProcessor`](obsidian.MarkdownPostProcessor.md) |

A post processor receives an element which is a section of the preview.

Post processors can mutate the DOM to render various things, such as mermaid graphs, latex equations, or custom controls.

If your post processor requires lifecycle management, for example, to clear an interval, kill a subprocess, etc when this element is removed from the app, look into

| +| [`MarkdownPostProcessorContext`](obsidian.MarkdownPostProcessorContext.md) | | +| [`MarkdownPreviewEvents`](obsidian.MarkdownPreviewEvents.md) | \* | +| [`MarkdownSectionInformation`](obsidian.MarkdownSectionInformation.md) | | +| [`MarkdownSubView`](obsidian.MarkdownSubView.md) | | +| [`MenuPositionDef`](obsidian.MenuPositionDef.md) | | +| [`ObsidianProtocolData`](obsidian.ObsidianProtocolData.md) | | +| [`OpenViewState`](obsidian.OpenViewState.md) | | +| [`PluginManifest`](obsidian.PluginManifest.md) | Metadata about a Community plugin. | +| [`Point`](obsidian.Point.md) | | +| [`Pos`](obsidian.Pos.md) | | +| [`PreparedQuery`](obsidian.PreparedQuery.md) | | +| [`Reference`](obsidian.Reference.md) | | +| [`ReferenceCache`](obsidian.ReferenceCache.md) | | +| [`RequestUrlParam`](obsidian.RequestUrlParam.md) | | +| [`RequestUrlResponse`](obsidian.RequestUrlResponse.md) | | +| [`RequestUrlResponsePromise`](obsidian.RequestUrlResponsePromise.md) | | +| [`RGB`](obsidian.RGB.md) | | +| [`SearchResult`](obsidian.SearchResult.md) | | +| [`SearchResultContainer`](obsidian.SearchResultContainer.md) | | +| [`SectionCache`](obsidian.SectionCache.md) | | +| [`Stat`](obsidian.Stat.md) | | +| [`SubpathResult`](obsidian.SubpathResult.md) | | +| [`TagCache`](obsidian.TagCache.md) | | +| [`TooltipOptions`](obsidian.TooltipOptions.md) | | +| [`ViewState`](obsidian.ViewState.md) | | +| [`ViewStateResult`](obsidian.ViewStateResult.md) | | +| [`WorkspaceWindowInitData`](obsidian.WorkspaceWindowInitData.md) | | + +## Variables + +| Variable | Description | +| --- | --- | +| [`apiVersion`](obsidian.apiVersion.md) | This is the API version of the app, which follows the release cycle of the desktop app. Example: "0.13.21" | +| [`editorEditorField`](obsidian.editorEditorField.md) | Use this StateField to get a reference to the EditorView | +| [`editorInfoField`](obsidian.editorInfoField.md) | Use this StateField to get information about this markdown editor, such as the associated file, or the Editor. | +| [`editorLivePreviewField`](obsidian.editorLivePreviewField.md) | Use this StateField to check whether Live Preview is active | +| [`editorViewField`](obsidian.editorViewField.md) | Use this StateField to get a reference to the MarkdownView. This is now deprecated because it is possible for an editor to not be associated with a MarkdownView. | +| [`livePreviewState`](obsidian.livePreviewState.md) | | +| [`moment`](obsidian.moment.md) | | +| [`Platform`](obsidian.Platform.md) | | + +## Type Aliases + +| Type Alias | Description | +| --- | --- | +| [`Constructor`](obsidian.Constructor.md) | | +| [`EditorCommandName`](obsidian.EditorCommandName.md) | | +| [`HexString`](obsidian.HexString.md) | Hex strings are 6-digit hash-prefixed rgb strings in lowercase form. Example: \#ffffff | +| [`IconName`](obsidian.IconName.md) | | +| [`KeymapEventListener`](obsidian.KeymapEventListener.md) | Return false to automatically preventDefault | +| [`MarkdownViewModeType`](obsidian.MarkdownViewModeType.md) | | +| [`Modifier`](obsidian.Modifier.md) | Mod = Cmd on MacOS and Ctrl on other OS Ctrl = Ctrl key for every OS Meta = Cmd on MacOS and Win key on other OS | +| [`ObsidianProtocolHandler`](obsidian.ObsidianProtocolHandler.md) | | +| [`PaneType`](obsidian.PaneType.md) | | +| [`SearchMatches`](obsidian.SearchMatches.md) | | +| [`SearchMatchPart`](obsidian.SearchMatchPart.md) | Text position offsets within text file. Represents a text range \[from offset, to offset\]. | +| [`SplitDirection`](obsidian.SplitDirection.md) | | +| [`TooltipPlacement`](obsidian.TooltipPlacement.md) | | +| [`UserEvent`](obsidian.UserEvent.md) | | +| [`ViewCreator`](obsidian.ViewCreator.md) | | + diff --git a/docs/obsidian-developer/Reference/TypeScript API/moment.md b/docs/obsidian-developer/Reference/TypeScript API/moment.md new file mode 100644 index 0000000000000000000000000000000000000000..9a227305b202530851c1b1cef5c97beed648b8a3 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/moment.md @@ -0,0 +1,17 @@ +--- +aliases: "obsidian.moment.md" +cssclasses: hide-title +--- + + + +[`moment`](obsidian.moment.md) + +## moment variable + + +**Signature:** + +```typescript +moment: typeof Moment +``` diff --git a/docs/obsidian-developer/Reference/TypeScript API/normalizePath.md b/docs/obsidian-developer/Reference/TypeScript API/normalizePath.md new file mode 100644 index 0000000000000000000000000000000000000000..f23ea06a8ca9fe473f3c943f2569f052eee15fee --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/normalizePath.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.normalizePath.md" +cssclasses: hide-title +--- + + + +[`normalizePath`](obsidian.normalizePath.md) + +## normalizePath() function + + +**Signature:** + +```typescript +export function normalizePath(path: string): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| path | string | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterAliases.md b/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterAliases.md new file mode 100644 index 0000000000000000000000000000000000000000..827cbbaf385ac3816a54087caa7d42bf31814b1a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterAliases.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.parseFrontMatterAliases.md" +cssclasses: hide-title +--- + + + +[`parseFrontMatterAliases`](obsidian.parseFrontMatterAliases.md) + +## parseFrontMatterAliases() function + + +**Signature:** + +```typescript +export function parseFrontMatterAliases(frontmatter: any | null): string[] | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| frontmatter | any | null | | + +**Returns:** + +`string[] | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterEntry.md b/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterEntry.md new file mode 100644 index 0000000000000000000000000000000000000000..4a148795dea84fbc2d48d984bd463ba8e1136f1e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterEntry.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.parseFrontMatterEntry.md" +cssclasses: hide-title +--- + + + +[`parseFrontMatterEntry`](obsidian.parseFrontMatterEntry.md) + +## parseFrontMatterEntry() function + + +**Signature:** + +```typescript +export function parseFrontMatterEntry(frontmatter: any | null, key: string | RegExp): any | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| frontmatter | any | null | | +| key | string | RegExp | | + +**Returns:** + +`any | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterStringArray.md b/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterStringArray.md new file mode 100644 index 0000000000000000000000000000000000000000..663968a99ea2a36539f26d3255c95c0da95a7838 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterStringArray.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.parseFrontMatterStringArray.md" +cssclasses: hide-title +--- + + + +[`parseFrontMatterStringArray`](obsidian.parseFrontMatterStringArray.md) + +## parseFrontMatterStringArray() function + + +**Signature:** + +```typescript +export function parseFrontMatterStringArray(frontmatter: any | null, key: string | RegExp, nospaces?: boolean): string[] | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| frontmatter | any | null | | +| key | string | RegExp | | +| nospaces | boolean | _(Optional)_ | + +**Returns:** + +`string[] | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterTags.md b/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterTags.md new file mode 100644 index 0000000000000000000000000000000000000000..c9e4f30cdc0417cac495283422a6423b2aab2528 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/parseFrontMatterTags.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.parseFrontMatterTags.md" +cssclasses: hide-title +--- + + + +[`parseFrontMatterTags`](obsidian.parseFrontMatterTags.md) + +## parseFrontMatterTags() function + + +**Signature:** + +```typescript +export function parseFrontMatterTags(frontmatter: any | null): string[] | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| frontmatter | any | null | | + +**Returns:** + +`string[] | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/parseLinktext.md b/docs/obsidian-developer/Reference/TypeScript API/parseLinktext.md new file mode 100644 index 0000000000000000000000000000000000000000..effcebf6274b8b0308c76d1dd1e0746db837a2b7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/parseLinktext.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.parseLinktext.md" +cssclasses: hide-title +--- + + + +[`parseLinktext`](obsidian.parseLinktext.md) + +## parseLinktext() function + + +**Signature:** + +```typescript +export function parseLinktext(linktext: string): { + path: string; + subpath: string; +}; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| linktext | string | | + +**Returns:** + +`{ path: string; subpath: string; }` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/parseYaml.md b/docs/obsidian-developer/Reference/TypeScript API/parseYaml.md new file mode 100644 index 0000000000000000000000000000000000000000..da214c08cfbfd12e7feac83eaf9ed970a24b8d45 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/parseYaml.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.parseYaml.md" +cssclasses: hide-title +--- + + + +[`parseYaml`](obsidian.parseYaml.md) + +## parseYaml() function + + +**Signature:** + +```typescript +export function parseYaml(yaml: string): any; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| yaml | string | | + +**Returns:** + +`any` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/prepareFuzzySearch.md b/docs/obsidian-developer/Reference/TypeScript API/prepareFuzzySearch.md new file mode 100644 index 0000000000000000000000000000000000000000..42b10a36e453faed03eb8a5c40c561d7aeeed9f6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/prepareFuzzySearch.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.prepareFuzzySearch.md" +cssclasses: hide-title +--- + + + +[`prepareFuzzySearch`](obsidian.prepareFuzzySearch.md) + +## prepareFuzzySearch() function + +Construct a fuzzy search callback that runs on a target string. Performance may be an issue if you are running the search for more than a few thousand times. If performance is a problem, consider using `prepareSimpleSearch` instead. + +**Signature:** + +```typescript +export function prepareFuzzySearch(query: string): (text: string) => SearchResult | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| query | string | the fuzzy query. fn - the callback function to apply the search on. | + +**Returns:** + +`(text: string) => `[`SearchResult`](obsidian.SearchResult.md)` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/prepareQuery.md b/docs/obsidian-developer/Reference/TypeScript API/prepareQuery.md new file mode 100644 index 0000000000000000000000000000000000000000..1200429c4953c9e88b62d244bc5979784e10d645 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/prepareQuery.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.prepareQuery.md" +cssclasses: hide-title +--- + + + +[`prepareQuery`](obsidian.prepareQuery.md) + +## prepareQuery() function + + +**Signature:** + +```typescript +export function prepareQuery(query: string): PreparedQuery; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| query | string | | + +**Returns:** + +[`PreparedQuery`](obsidian.PreparedQuery.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/prepareSimpleSearch.md b/docs/obsidian-developer/Reference/TypeScript API/prepareSimpleSearch.md new file mode 100644 index 0000000000000000000000000000000000000000..7fbbb566beef19a606cad22aee86a8683f4d2360 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/prepareSimpleSearch.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.prepareSimpleSearch.md" +cssclasses: hide-title +--- + + + +[`prepareSimpleSearch`](obsidian.prepareSimpleSearch.md) + +## prepareSimpleSearch() function + +Construct a simple search callback that runs on a target string. + +**Signature:** + +```typescript +export function prepareSimpleSearch(query: string): (text: string) => SearchResult | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| query | string | the space-separated words fn - the callback function to apply the search on | + +**Returns:** + +`(text: string) => `[`SearchResult`](obsidian.SearchResult.md)` | null` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/removeIcon.md b/docs/obsidian-developer/Reference/TypeScript API/removeIcon.md new file mode 100644 index 0000000000000000000000000000000000000000..bce7862ecea7da4fa22e802f109028743ead4fd4 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/removeIcon.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.removeIcon.md" +cssclasses: hide-title +--- + + + +[`removeIcon`](obsidian.removeIcon.md) + +## removeIcon() function + +Remove a custom icon from the library. + +**Signature:** + +```typescript +export function removeIcon(iconId: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| iconId | string | the icon ID | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/renderMatches.md b/docs/obsidian-developer/Reference/TypeScript API/renderMatches.md new file mode 100644 index 0000000000000000000000000000000000000000..445f03b2582734b1fa14c7332b637eaff9038191 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/renderMatches.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.renderMatches.md" +cssclasses: hide-title +--- + + + +[`renderMatches`](obsidian.renderMatches.md) + +## renderMatches() function + + +**Signature:** + +```typescript +export function renderMatches(el: HTMLElement | DocumentFragment, text: string, matches: SearchMatches | null, offset?: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| el | HTMLElement | DocumentFragment | | +| text | string | | +| matches | [`SearchMatches`](obsidian.SearchMatches.md) | null | | +| offset | number | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/renderMath.md b/docs/obsidian-developer/Reference/TypeScript API/renderMath.md new file mode 100644 index 0000000000000000000000000000000000000000..cec78baa00b00e74c47271a399d322c626294e43 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/renderMath.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.renderMath.md" +cssclasses: hide-title +--- + + + +[`renderMath`](obsidian.renderMath.md) + +## renderMath() function + +Render some LaTeX math using the MathJax engine. Returns an HTMLElement. Requires calling `finishRenderMath` when rendering is all done to flush the MathJax stylesheet. + +**Signature:** + +```typescript +export function renderMath(source: string, display: boolean): HTMLElement; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| source | string | | +| display | boolean | | + +**Returns:** + +`HTMLElement` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/renderResults.md b/docs/obsidian-developer/Reference/TypeScript API/renderResults.md new file mode 100644 index 0000000000000000000000000000000000000000..b3e5e8647a242663e548d64566da568b329f0d77 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/renderResults.md @@ -0,0 +1,31 @@ +--- +aliases: "obsidian.renderResults.md" +cssclasses: hide-title +--- + + + +[`renderResults`](obsidian.renderResults.md) + +## renderResults() function + + +**Signature:** + +```typescript +export function renderResults(el: HTMLElement, text: string, result: SearchResult, offset?: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| el | HTMLElement | | +| text | string | | +| result | [`SearchResult`](obsidian.SearchResult.md) | | +| offset | number | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/request.md b/docs/obsidian-developer/Reference/TypeScript API/request.md new file mode 100644 index 0000000000000000000000000000000000000000..0e8e6c12976cf36d379d4cd1a3b7feaf060f72f0 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/request.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.request.md" +cssclasses: hide-title +--- + + + +[`request`](obsidian.request.md) + +## request() function + +Similar to `fetch()`, request a URL using HTTP/HTTPS, without any CORS restrictions. Returns the text value of the response. + +**Signature:** + +```typescript +export function request(request: RequestUrlParam | string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| request | [`RequestUrlParam`](obsidian.RequestUrlParam.md) | string | | + +**Returns:** + +`Promise``` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/requestUrl.md b/docs/obsidian-developer/Reference/TypeScript API/requestUrl.md new file mode 100644 index 0000000000000000000000000000000000000000..00a544d8a2abdb05fc387214df7fe95f84db9af6 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/requestUrl.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.requestUrl.md" +cssclasses: hide-title +--- + + + +[`requestUrl`](obsidian.requestUrl.md) + +## requestUrl() function + +Similar to `fetch()`, request a URL using HTTP/HTTPS, without any CORS restrictions. + +**Signature:** + +```typescript +export function requestUrl(request: RequestUrlParam | string): RequestUrlResponsePromise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| request | [`RequestUrlParam`](obsidian.RequestUrlParam.md) | string | | + +**Returns:** + +[`RequestUrlResponsePromise`](obsidian.RequestUrlResponsePromise.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/requireApiVersion.md b/docs/obsidian-developer/Reference/TypeScript API/requireApiVersion.md new file mode 100644 index 0000000000000000000000000000000000000000..b1249183124eefc7359a3a943f6aa0cdd5d4e63e --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/requireApiVersion.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.requireApiVersion.md" +cssclasses: hide-title +--- + + + +[`requireApiVersion`](obsidian.requireApiVersion.md) + +## requireApiVersion() function + +Returns true if the API version is equal or higher than the requested version. Use this to limit functionality that require specific API versions to avoid crashing on older Obsidian builds. + +**Signature:** + +```typescript +export function requireApiVersion(version: string): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| version | string | | + +**Returns:** + +`boolean` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/resolveSubpath.md b/docs/obsidian-developer/Reference/TypeScript API/resolveSubpath.md new file mode 100644 index 0000000000000000000000000000000000000000..1916b44666a7eb97de4a58f220d454a16bb8694a --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/resolveSubpath.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.resolveSubpath.md" +cssclasses: hide-title +--- + + + +[`resolveSubpath`](obsidian.resolveSubpath.md) + +## resolveSubpath() function + + +**Signature:** + +```typescript +export function resolveSubpath(cache: CachedMetadata, subpath: string): HeadingSubpathResult | BlockSubpathResult; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| cache | [`CachedMetadata`](obsidian.CachedMetadata.md) | | +| subpath | string | | + +**Returns:** + +[`HeadingSubpathResult`](obsidian.HeadingSubpathResult.md)` | `[`BlockSubpathResult`](obsidian.BlockSubpathResult.md) + diff --git a/docs/obsidian-developer/Reference/TypeScript API/sanitizeHTMLToDom.md b/docs/obsidian-developer/Reference/TypeScript API/sanitizeHTMLToDom.md new file mode 100644 index 0000000000000000000000000000000000000000..8bbd563cdf6b93832bee196077a2da93fbabae19 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/sanitizeHTMLToDom.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.sanitizeHTMLToDom.md" +cssclasses: hide-title +--- + + + +[`sanitizeHTMLToDom`](obsidian.sanitizeHTMLToDom.md) + +## sanitizeHTMLToDom() function + + +**Signature:** + +```typescript +export function sanitizeHTMLToDom(html: string): DocumentFragment; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| html | string | | + +**Returns:** + +`DocumentFragment` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/setIcon.md b/docs/obsidian-developer/Reference/TypeScript API/setIcon.md new file mode 100644 index 0000000000000000000000000000000000000000..4f0173eadd5bea6a4d045584aba70644432aa744 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/setIcon.md @@ -0,0 +1,30 @@ +--- +aliases: "obsidian.setIcon.md" +cssclasses: hide-title +--- + + + +[`setIcon`](obsidian.setIcon.md) + +## setIcon() function + +Insert an SVG into the element from an iconId. Does nothing if no icon associated with the iconId. + +**Signature:** + +```typescript +export function setIcon(parent: HTMLElement, iconId: IconName): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| parent | HTMLElement | the HTML element to insert the icon | +| iconId | [`IconName`](obsidian.IconName.md) | the icon ID | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/setTooltip.md b/docs/obsidian-developer/Reference/TypeScript API/setTooltip.md new file mode 100644 index 0000000000000000000000000000000000000000..b62d283f0ddbbaa36c0a34913e20b9273c6a4168 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/setTooltip.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.setTooltip.md" +cssclasses: hide-title +--- + + + +[`setTooltip`](obsidian.setTooltip.md) + +## setTooltip() function + +**Signature:** + +```typescript +export function setTooltip(el: HTMLElement, tooltip: string, options?: TooltipOptions): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| el | HTMLElement | The element to show the tooltip on | +| tooltip | string | The tooltip text to show | +| options | [`TooltipOptions`](obsidian.TooltipOptions.md) | _(Optional)_ | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/sortSearchResults.md b/docs/obsidian-developer/Reference/TypeScript API/sortSearchResults.md new file mode 100644 index 0000000000000000000000000000000000000000..d1978ac1e96591ce680a2e981d67f7a21bcc7995 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/sortSearchResults.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.sortSearchResults.md" +cssclasses: hide-title +--- + + + +[`sortSearchResults`](obsidian.sortSearchResults.md) + +## sortSearchResults() function + + +**Signature:** + +```typescript +export function sortSearchResults(results: SearchResultContainer[]): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| results | [`SearchResultContainer`](obsidian.SearchResultContainer.md)[] | | + +**Returns:** + +`void` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/stringifyYaml.md b/docs/obsidian-developer/Reference/TypeScript API/stringifyYaml.md new file mode 100644 index 0000000000000000000000000000000000000000..87d9ed7a54b07044b66dd49bb8abdb73e4c0d8c7 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/stringifyYaml.md @@ -0,0 +1,28 @@ +--- +aliases: "obsidian.stringifyYaml.md" +cssclasses: hide-title +--- + + + +[`stringifyYaml`](obsidian.stringifyYaml.md) + +## stringifyYaml() function + + +**Signature:** + +```typescript +export function stringifyYaml(obj: any): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| obj | any | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/stripHeading.md b/docs/obsidian-developer/Reference/TypeScript API/stripHeading.md new file mode 100644 index 0000000000000000000000000000000000000000..2b01fc46c30ce0a3e7f236d4f52f1994bc1285b5 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/stripHeading.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.stripHeading.md" +cssclasses: hide-title +--- + + + +[`stripHeading`](obsidian.stripHeading.md) + +## stripHeading() function + +This function normalizes headings for link matching by stripping out special characters and shrinking consecutive spaces. + +**Signature:** + +```typescript +export function stripHeading(heading: string): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| heading | string | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/TypeScript API/stripHeadingForLink.md b/docs/obsidian-developer/Reference/TypeScript API/stripHeadingForLink.md new file mode 100644 index 0000000000000000000000000000000000000000..4b10ec3d24a479456bf268732c5e8eb3b461b344 --- /dev/null +++ b/docs/obsidian-developer/Reference/TypeScript API/stripHeadingForLink.md @@ -0,0 +1,29 @@ +--- +aliases: "obsidian.stripHeadingForLink.md" +cssclasses: hide-title +--- + + + +[`stripHeadingForLink`](obsidian.stripHeadingForLink.md) + +## stripHeadingForLink() function + +This function prepares headings for linking. It strips out some bad combinations of special characters that could break links. + +**Signature:** + +```typescript +export function stripHeadingForLink(heading: string): string; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| heading | string | | + +**Returns:** + +`string` + diff --git a/docs/obsidian-developer/Reference/Versions.md b/docs/obsidian-developer/Reference/Versions.md new file mode 100644 index 0000000000000000000000000000000000000000..36e22da88fba19ac9e6a419e60ded665aa895b0c --- /dev/null +++ b/docs/obsidian-developer/Reference/Versions.md @@ -0,0 +1,38 @@ +--- +cssClass: reference +--- + +Every new version of Obsidian may introduce new capabilities for plugins. Unfortunately, using a recently introduced plugin capability in your plugin may break installations for users that haven't yet updated to the latest version of Obsidian. To avoid this, `versions.json` lets you control the plugin version based on the version of the user's Obsidian app. + +`versions.json` contains a JSON object, where the key is the plugin version, and the value is the corresponding `minAppVersion`. + +If a user attempts to install a plugin where the Obsidian app version is lower than the `minAppVersion` in [[Reference/Manifest|Manifest]], then Obsidian looks for a `versions.json` file at the root of the plugin repository. + +In the following example, the user has Obsidian 1.1.0 installed, but the plugin `minAppVersion` is 1.2.0. + +**manifest.json**: + +```json +{ + // ... + + "version": "1.0.0", + "minAppVersion": "1.2.0" +} +``` + +If the user runs version 1.1.0 of the Obsidian app, Obsidian then consults the `versions.json` to determine whether a fallback is available. + +**versions.json**: + +```json +{ + "0.1.0": "1.0.0", + "0.12.0": "1.1.0", +} +``` + +In this case, the most recent plugin version for 1.1.0 is 0.12.0. + +> [!important] +> You don't need to list every plugin relese in the `versions.json`. You only need to update `versions.json` if you change the `minAppVersion` for your plugin. diff --git a/docs/obsidian-developer/Themes/App themes/Build a theme.md b/docs/obsidian-developer/Themes/App themes/Build a theme.md new file mode 100644 index 0000000000000000000000000000000000000000..775b5fd5db3cada68dec2c3ed25e5a4163e8e63e --- /dev/null +++ b/docs/obsidian-developer/Themes/App themes/Build a theme.md @@ -0,0 +1,177 @@ +In this tutorial, you'll learn how to start developing a theme for Obsidian. Themes let you customize how Obsidian looks and feels, using CSS. + +## What you'll learn + +After you've completed this tutorial, you'll be able to: + +- Configure an environment for developing Obsidian themes. +- Use CSS variables to change how Obsidian looks. +- Create a theme that supports both light and dark color schemes. + +## Prerequisites + +To complete this tutorial, you'll need: + +- [Git](https://git-scm.com/) installed on your local machine. +- A code editor, such as [Visual Studio Code](https://code.visualstudio.com/). + +## Step 1: Download the sample theme + +In this step, you'll download a sample theme to the `themes` directory in your vault's [`.obsidian` directory](https://help.obsidian.md/Advanced+topics/How+Obsidian+stores+data#Per+vault+data) so that Obsidian can find it. + +The sample theme you'll use in this tutorial is available in a [GitHub repository](https://github.com/obsidianmd/obsidian-sample-theme). + +1. Open a terminal window and change the project directory to the `themes` directory. + + ```bash + cd path/to/vault/.obsidian/themes + ``` + +2. Clone the sample theme using Git. + + ```bash + git clone https://github.com/obsidianmd/obsidian-sample-theme.git "Sample Theme" + ``` + +> [!tip] GitHub template repository +> The repository for the sample theme is a GitHub template repository, which means you can create your own repository from the sample theme. To learn how, refer to [Creating a repository from a template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template). +> +> Remember to use the URL to your own repository when cloning the sample theme. + +## Step 2: Enable the theme + +1. In Obsidian, open **Settings**. +2. In the side menu, select **Appearance**. +3. Next to **Themes**, select **Sample Theme** from the dropdown list. + +You've enabled the sample theme. Next, we'll make some changes to it. + +## Step 3: Update the manifest + +In this step, you'll rename the theme by updating the manifest, `manifest.json`. The manifest contains information about your theme, such as its name and description. + +1. Open `manifest.json` in your code editor. +2. Change `name` to a human-friendly name, such as `"Disco Lights"`. +3. Rename the theme directory under `themes` to the same name. The name of the theme directory must exactly match the `name` property in `manifest.json`. + + ```bash + mv "Sample Theme" "Disco Lights" + ``` + +4. Restart Obsidian to load the new changes to the manifest. + +Go back to **Settings → Appearance → Themes** and notice that the name of the theme has been changed. + +Remember to restart Obsidian whenever you make changes to `manifest.json`. + +## Step 4: Change the font + +Obsidian uses [CSS variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) to style the user interface. In this step, you'll use a CSS variable to change the font in the editor. + +1. Create a new note, for example "Theme Development". +2. Enter the following text into the note: + + ```md + Themes let you make [Obsidian](https://obsidian.md) look the way **you** want it. + ``` + +3. In `theme.css`, add the following: + + ```css + body { + --font-text-theme: Georgia, serif; + } + ``` + +The editor displays the note using the font you defined. + +## Step 5: Change the background color + +Themes can support both light and dark color schemes. Define your CSS variables under `.theme-dark` or `.theme-light`. + +1. In `theme.css`, add the following: + + ```css + .theme-dark { + --background-primary: #18004F; + --background-secondary: #220070; + } + + .theme-light { + --background-primary: #ECE4FF; + --background-secondary: #D9C9FF; + } + ``` + +2. In Obsidian, open **Settings**. +3. Under **Appearance**, toggle **Base color scheme** between "Light" and "Dark". + +You'll see that Obsidian picks the colors based on the color scheme you've selected. Try changing the colors to `red`, `green`, or `blue` for a more dramatic change. + +## Step 6: Change the input hover border color + +The `:root` selector is commonly used when you want a variable to be accessible by every child element within the theme. This selector is often filled with Plugin variables. + +Here's an example to illustrate its usage: + +> [!example] +> Let's consider an input field that can be found in various places within Obsidian, such as settings and note content. To define the variables specific to this input field, we can use the `:root` selector. +> +> ```css +> :root { +> --input-focus-border-color: Highlight; +> --input-focus-outline: 1px solid Canvas; +> --input-unfocused-border-color: transparent; +> --input-disabled-border-color: transparent; +> --input-hover-border-color: black; +> /* Default Input Variables for Root */ + > } + > ``` + + +Now, let's modify the hover border color in our CSS: + +```css +:root { + --input-hover-border-color: red; +/* Change from Black to Red */ +} +``` + +With this update, when you hover over any input field, the border color will change to a bright red. + +> [!tip] +> When defining styles that should remain the same for both light and dark themes, it is recommended to use the `body` selector. +> +> Only use `.theme-dark` or `.theme-light` selectors if you want the styles to change when switching between light and dark themes. +> +> It's also important to use `:root` with caution and consideration. If your variable can be placed within `body`, `.theme-dark`, or `.theme-light` selectors instead, it is recommended to do so. + +## Step 7: Discover CSS variables in use + +Obsidian exposes more than 400 different CSS variables for customizing different parts of the user interface. In this step, you'll find the CSS variable for changing the ribbon background. + +1. In Obsidian, open the **Developer Tools** by pressing `Ctrl`+`Shift`+`I` (or `Cmd`+`Option`+`I` on macOS). +2. Open the **Sources** tab. +3. Under **Page → top → obsidian.md**, select **app.css**. +4. Scroll to the top of `app.css` to find all available CSS variables. +5. Search for variables related to the ribbon by pressing `Ctrl`+`F` (or `Cmd`+`F` on macOS) and typing " --ribbon-". Notice the two blank spaces, which return the definitions rather than their uses. + +One of the results is `--ribbon-background`, which sounds promising. To be sure, you can also inspect the HTML to find the CSS variable used by a specific element. + +1. In the upper-left corner of the **Developer Tool**, select the icon that looks like a cursor on top of a rectangle. +2. Select the middle of the ribbon on the left side of the Obsidian window. + +In the **Styles** tab, on the right side of the **Developer Tools**, you can now see the CSS that is applied to the element you selected, such as `background-color: var(--ribbon-background)`. + +Now that you know `--ribbon-background` controls the ribbon background color, add the following to `theme.css`: + +```css +body { + --ribbon-background: magenta; +} +``` + +## Conclusion + +In this tutorial, you've built your first Obsidian theme. You've modified the theme and reloaded it to reflect the changes inside Obsidian. You've also seen how you can find the CSS variables to style specific parts of the user interface. diff --git a/docs/obsidian-developer/Themes/App themes/Embed fonts and images in your theme.md b/docs/obsidian-developer/Themes/App themes/Embed fonts and images in your theme.md new file mode 100644 index 0000000000000000000000000000000000000000..8c284cb4515d55a0274c4aaadc914a5df18d11b1 --- /dev/null +++ b/docs/obsidian-developer/Themes/App themes/Embed fonts and images in your theme.md @@ -0,0 +1,52 @@ +Learn how to include assets, such as fonts and images, in your theme. + +> [!warning] Loading remote content +> For Obsidian to work offline and to preserve user privacy, themes [[Developer policies|aren't allowed]] to load remote content over the network. For more information, refer to [[Theme guidelines#Keep resources local]] + +## Use data URLs + +To include assets such as fonts, icons, and images in your theme, you need to _embed_ them in the CSS file by passing a [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs) to the [url()](https://developer.mozilla.org/en-US/docs/Web/CSS/url) function. + +To create a data URL for your assets, create a URL using the following format: + +```css +url("data:;base64,") +``` + +- Replace `` with the MIME type for your asset. If you don't know it, refer to [Common MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types). +- Replace `` with the [Base64](https://en.wikipedia.org/wiki/Base64) encoded representation of your asset. + +The following example embeds a GIF file as a background image: + +```css +h1 { + background-image: url("data:image/gif;base64,R0lGODdhAQADAPABAP////8AACwAAAAAAQADAAACAgxQADs=") +} +``` + + +## Encode your assets + +For instructions on how to encode an asset into base64, refer to [Encoding data into base64 format](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs#encoding_data_into_base64_format). + +You can also use one of the many free online tools for encoding. + +For fonts: + +- [Woff2Base](https://hellogreg.github.io/woff2base/) for WOFF2 font files +- [Aspose](https://products.aspose.app/font/base64) supports a wide variety of font formats + +For images: + +- [WebSemantics](https://websemantics.uk/tools/image-to-data-uri-converter/) converts JPEG, JPG, GIF, PNG, SVG +- [Base64 Guru](https://base64.guru/converter/encode/image) supports a wide variety of image formats +- [Yoksel URL-encoder for SVG](https://yoksel.github.io/url-encoder/) optimized for SVG files + + +## Consider file size + +Embedding assets increases the file size of your theme, which may lead to poor performance in the following situations: + +- Downloading and updating your theme from the community theme directory. +- Loading and using your theme in the Obsidian app. +- Editing your theme in a code editor. Consider breaking up your theme into multiple files using a CSS preprocessor, such as [Sass](https://sass-lang.com/) or [Less](https://lesscss.org/). \ No newline at end of file diff --git a/docs/obsidian-developer/Themes/App themes/Release your theme with GitHub Actions.md b/docs/obsidian-developer/Themes/App themes/Release your theme with GitHub Actions.md new file mode 100644 index 0000000000000000000000000000000000000000..28c17ef5cefff9ebf8a62de847e9fbade6841cd5 --- /dev/null +++ b/docs/obsidian-developer/Themes/App themes/Release your theme with GitHub Actions.md @@ -0,0 +1,62 @@ +Manually releasing your theme can be time-consuming and error-prone. In this guide, you'll configure your theme to use [GitHub Actions](https://github.com/features/actions) to automatically create a release when you create a new tag. + +1. In the root directory of your theme, create a file called `release.yml` under `.github/workflows` with the following content: + + ```yml + name: Release Obsidian theme + + on: + push: + tags: + - "*" + + jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + tag="${GITHUB_REF#refs/tags/}" + + gh release create "$tag" \ + --title="$tag" \ + --generate-notes \ + --draft \ + manifest.json theme.css + ``` + +2. In your terminal, commit the workflow. + + ```bash + git add .github/workflows/release.yml + git commit -m "Add release workflow" + git push origin main + ``` + +3. Create a tag that matches the version in the `manifest.json` file. + + ```bash + git tag -a 1.0.1 -m "1.0.1" + git push origin 1.0.1 + ``` + + - `-a` creates an [annotated tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging#_creating_tags). + - `-m` specifies the name of your release. For Obsidian plugins, this must be the same as the version. + +4. Browse to your repository on GitHub and select the **Actions** tab. Your workflow might still be running, or it might have finished already. + +5. When the workflow finishes, go back to the main page for your repository and select **Releases** in the sidebar on the right side. The workflow has created a draft GitHub release and uploaded the required assets as binary attachments. + +6. Select **Edit** (pencil icon) on the right side of the release name. + +7. Add release notes to let users know what happened in this release, and then select **Publish release**. + +You've successfully set up your theme to automatically create a GitHub release whenever you create a new tag. + +- If this is the first release for this theme, you're now ready to [[Submit your theme]]. +- If this is an update to an already published theme, your users can now update to the latest version. diff --git a/docs/obsidian-developer/Themes/App themes/Submit your theme.md b/docs/obsidian-developer/Themes/App themes/Submit your theme.md new file mode 100644 index 0000000000000000000000000000000000000000..d02c8300911e9972766f010b7a7e994c4fa057de --- /dev/null +++ b/docs/obsidian-developer/Themes/App themes/Submit your theme.md @@ -0,0 +1,80 @@ +If you want to share your theme with the Obsidian community, the best way is to submit it to the [official list of themes](https://github.com/obsidianmd/obsidian-releases/blob/master/community-css-themes.json). Once we've reviewed and published your theme, users can install it directly from within Obsidian. It'll also be featured in the [plugin directory](https://obsidian.md/plugins) on the Obsidian website. + +You only need to submit the initial version of your theme. After your theme has been published, users can automatically download new releases from GitHub directly from within Obsidian. + +## Prerequisites + +To complete this guide, you'll need: + +- A [GitHub](https://github.com/signup) account. + +## Before you begin + +Before you submit your theme, make sure you have the following files in the root folder of your repository: + +- A `README.md` that describes the theme. +- A `LICENSE` that determines how others are allowed to use the theme and its source code. If you need help to pick a license for your theme, refer to [Choose a License](https://choosealicense.com/). +- A screenshot of your theme to be displayed in the community theme store. Recommended image dimensions: 512 x 288 pixels. +- A `manifest.json` that describes your theme. For more information, refer to [[Manifest]]. + +## Step 1: Publish your theme to GitHub + +> [!note] Template repositories +> If you created your theme from one of our template repositories, you may skip this step. + +To review your theme, we need to access to the source code on GitHub. If you're unfamiliar with GitHub, refer to the GitHub docs for how to [Create a new repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository). + +## Step 2: Submit your theme for review + +In this step, you'll submit your theme to the Obsidian team for review. + +1. In [community-css-themes.json](https://github.com/obsidianmd/obsidian-releases/edit/master/community-css-themes.json), add a new entry at the end of the JSON array. The following example shows the entry for the [Minimal](https://github.com/kepano/obsidian-minimal) theme. + + ```json + { + "name": "Minimal", + "author": "kepano", + "repo": "kepano/obsidian-minimal", + "screenshot": "dark-simple.png", + "modes": ["dark", "light"] + }, + ``` + + - `name` and `author` determines how your plugin appears to the user, and should match the corresponding properties in your [[Manifest]]. + - `repo` is the path to your GitHub repository. For example, if your GitHub repo is located at https://github.com/your-username/your-repo-name, the path is `your-username/your-repo-name`. + - `screenshot` is the path to a screenshot of your theme. The screenshot looks best with a 16:9 aspect ratio. Recommended image dimensions: 512 x 288 pixels. + - `modes` lists the color modes that your theme supports. + + Remember to add a comma after the closing brace, `}`, of the previous entry. + +2. Select **Commit changes...** in the upper-right corner. +3. Select **Propose changes**. +4. Select **Create pull request**. +5. Select **Preview**, and then select **Community Theme**. +6. Click **Create pull request**. +7. In the name of the pull request, enter "Add [...] theme", where [...] is the name of your theme. +8. Fill in the details in the description for the pull request. For the checkboxes, insert an `x` between the brackets, `[x]`, to mark them as done. +9. Click **Create pull request** (for the last time 🤞). + +You've now submitted your theme to the Obsidian theme directory. Sit back and wait for us to review your submission. + +> [!question] How long does it take to review my theme? +> The time it takes to review your submission depends on the current workload of the Obsidian team. The team is still small, so please be patient while you wait for your theme to be reviewed. We're currently unable to give any estimates on when we'll be able to review your submission. + +## Step 4: Address review comments + +Once a reviewer has reviewed your theme, they'll add a comment to your pull request with the result of the review. The reviewer may require that you update your theme, or they can offer suggestions on how you can improve it. + +Address any required changes and update the GitHub release with the new changes. Leave a comment on the PR to let us know you've addressed the feedback. Don't open a new PR. + +We'll publish the theme as soon we've verified that all required changes have been addressed. + +> [!note] +> While only Obsidian team members can publish your theme, other community members may also offer to review your submission in the meantime. + +## Next steps + +Once we've reviewed and published your theme, it's time to announce it to the community: + +- Announce in [Share & showcase](https://forum.obsidian.md/c/share-showcase/9) in the forums. +- Announce in the `#updates` channel on [Discord](https://discord.gg/veuWUTm). You need the [`developer` role](https://discord.com/channels/686053708261228577/702717892533157999/830492034807758859) to post in `#updates`. diff --git a/docs/obsidian-developer/Themes/App themes/Theme guidelines.md b/docs/obsidian-developer/Themes/App themes/Theme guidelines.md new file mode 100644 index 0000000000000000000000000000000000000000..d21345f21f27bf7dc08484a5c809fb35395f44ba --- /dev/null +++ b/docs/obsidian-developer/Themes/App themes/Theme guidelines.md @@ -0,0 +1,43 @@ +This page lists our recommendations for building themes that are both reliable and maintainable. By following these guidelines, you can minimize the maintenance work to keep your theme updated with future versions of Obsidian. + +For more information about general guidelines for developers, refer to [[Developer policies]]. + +## Use CSS variables + +Since most of Obsidian's user interface uses CSS variables, you can create highly expressive themes by merely overriding the built-in CSS variables. + +Override general variables under `body`, and colors under `.theme-light` or `.theme-dark`. + +```css +:root { + --input-focus-border-color: Highlight; +} + +body { + --font-text-size: 18px; +} + +.theme-light { + --background-primary: white; +} + +.theme-dark { + --background-primary: black; +} +``` + +## Use selectors with low specificity + +Avoid overly complex selectors targeting specific classes. [[#Use CSS variables]] to keep your selectors simple. + +The most common issues when maintaining a theme are due to broken selectors as a result of new versions of Obsidian, which may change class names and how elements are nested. + +## Keep assets local + +Per [[Developer policies]] community themes must not load remote assets, such as fonts and images, that are unavailable when the user is offline. Even if the user has access to the internet, loading remote assets may violate user privacy. + +If you wish to submit your theme to the official Community Themes directory, your theme must not make network calls, and therefore all resources must be bundled into your theme. See our guide [[Embed fonts and images in your theme]]. + +## Avoid `!important` declarations + +Declaring styles as `!important` prevents users from overriding styles from your theme using snippets. diff --git a/docs/obsidian-developer/Themes/Obsidian Publish themes/About Obsidian Publish themes.md b/docs/obsidian-developer/Themes/Obsidian Publish themes/About Obsidian Publish themes.md new file mode 100644 index 0000000000000000000000000000000000000000..4b5a4a6d27f7697151237cc4789faafbb633e8a6 --- /dev/null +++ b/docs/obsidian-developer/Themes/Obsidian Publish themes/About Obsidian Publish themes.md @@ -0,0 +1,28 @@ +Obsidian Publish gives you several options for customizing how your Publish site looks. + +Obsidian Publish allows you to customize the look of your site using CSS. + +The following elements can be turned on or off in the Publish site settings and influence the layout of the site. + +#### Reading experience + +- **Readable line length** sets a maximum width for notes and centers the content on wide screens. +- **Theme toggle** displays a switch for light and dark mode. +- **Stacked notes** enables notes to stack and scroll horizontally when links are clicked, similar to [Tab stacks](https://help.obsidian.md/User+interface/Use+tabs+in+Obsidian#Stack+tab+groups) in the Obsidian app. + +#### Components + +- **Navigation** adds a left sidebar similar with a list of folders and files. +- **Search** displays a search input field, it may be positioned in the left sidebar, right sidebar or top navigation depending on which UI elements are active. +- **Backlinks** displays a list of backlinks at the bottom of the page. +- **Graph** displays the local graph in the right sidebar. +- **Table of contents** displays an outline of headings in the current page in the right sidebar. + +## CSS variables + +Theming for Obsidian Publish is made simple with CSS variables. [Learn more about CSS variables and how to use them.](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) + +The list of [[CSS variables]] available for customization fall into two groups: + +- **App variables** are inherited from the Obsidian app theme. These primarily control the colors and styling of the content. +- **Publish-specific variables** control the elements specific to Obsidian Publish. diff --git a/docs/obsidian-developer/Themes/Obsidian Publish themes/Best practices for Publish themes.md b/docs/obsidian-developer/Themes/Obsidian Publish themes/Best practices for Publish themes.md new file mode 100644 index 0000000000000000000000000000000000000000..4cb8886a6555260314a8866207ed06e8c4d1516e --- /dev/null +++ b/docs/obsidian-developer/Themes/Obsidian Publish themes/Best practices for Publish themes.md @@ -0,0 +1,51 @@ +--- +cssClass: reference +--- + +### Obsidian App and Obsidian Publish are different contexts + +Obsidian Publish shares common code and UI principles with Obsidian App, but also has some important differences that you should consider when creating themes. A few rules of thumb to keep in mind: + +- Avoid complex selectors, use the available [[CSS variables]] instead. +- Avoid including CSS selectors and rules that are specific to Obsidian App. +- Keep CSS file size small so it loads fast for visitors. +- Consider compatibility across browsers and screen sizes. + +### App-specific and Publish-specific CSS rules + +While Obsidian App and Obsidian Publish share some common code, most App themes are designed to target CSS classes that are not present in the Publish context. For this reason, we recommend building Publish themes from the ground up, to minimize the amount of unnecessary code. + +### File size + +Obsidian App themes are stored locally on the user's device, whereas Obsidian Publish themes are loaded each time a user vists the site. For this reason, Obsidian Publish themes should be mindful of file size. + +Keeping your theme file small will avoid [flashes of unstyled content](https://en.wikipedia.org/wiki/Flash_of_unstyled_content), and load faster on a variety of devices and internet connections. Ideally your `publish.css` file should be as small as possible. + +In the App context it is acceptable to embed fonts and images in the CSS file using base64 encoding. In the Publish context, we recommend that you avoid this approach, especially if it leads to larger file sizes (multiple megabytes) that may block rendering when a visitor accesses the site. + +### Browser compatibility + +Visitors to Publish sites may use older browsers that are not compatible with new CSS features. For this reason we recommend being conservative with advanced CSS features in the Publish context. This is in contrast to Obsidian App themes which target a narrow scope of rendering engines (recent versions of Chromium/Blink) that support newer browser features. Try searching [caniuse.com](https://caniuse.com/) to see which CSS features are broadly available across browsers. + +### Small screens and mobile devices + +Obsidian Publish has two breakpoints by default: + +| Breakpoint | Device | Effect | +| ----------- | - | - | +| 1000px | Tablet | Right sidebar is hidden | +| 750px | Mobile | Left and right sidebars are hidden. If enabled, navigation is accessible via hamburger menu in the top left corner | + +You can target these devices using CSS. Any rules defined outside of the `@media` query will apply to all devices. + +```css +@media screen and (min-width: 1000px) { + /* ... rules and variables for screens larger than tablet */ +} +@media screen and (max-width: 1000px) { + /* ... rules and variables for tablet devices and smaller */ +} +@media screen and (max-width: 750px) { + /* ... rules and variables for mobile devices and smaller */ +} +``` diff --git a/docs/obsidian-developer/Themes/Obsidian Publish themes/Build a Publish theme.md b/docs/obsidian-developer/Themes/Obsidian Publish themes/Build a Publish theme.md new file mode 100644 index 0000000000000000000000000000000000000000..fa7579e137802670b15092182c49ab33bafed57d --- /dev/null +++ b/docs/obsidian-developer/Themes/Obsidian Publish themes/Build a Publish theme.md @@ -0,0 +1,47 @@ +You can build themes for your [Obsidian Publish](https://help.obsidian.md/Obsidian+Publish/Introduction+to+Obsidian+Publish) site. Themes for Obsidian Publish use the same [[CSS variables]] as the Obsidian app along with [[CSS variables#Obsidian Publish|Publish-specific CSS variables]]. + +> [!tip] See [[Build a theme]] for more in-depth information on the `body`, `:root`, `.theme-dark`, and `.theme-light` selectors. + +To build a theme for your site: + +1. Add a file called `publish.css` to the root folder of your vault. +2. Publish `publish.css` to enable the theme on your live Publish site. + +**Example:** + +```css +:root { + --input-unfocused-border-color: transparent; + --input-disabled-border-color: transparent; + --input-hover-border-color: black; + + /* ... By default, nothing is placed within :root in Publish. However, CSS variables here are considered global, and accessible to all sub-elements such as body and .theme-light. */ +} + +.published-container { + --page-width: 800px; + --page-side-padding: 48px; + + /* ... CSS variables for Publish that do not change when light or dark mode is enabled. They sometimes link to color variables in .theme-light or .theme-dark */ +} +.body { + --inline-title-color: var(--h1-color); + --h2-color: red; + + /* ... CSS variables that do not change when light or dark mode is enabled. They sometimes link to color variables in .theme-light or .theme-dark */ +} +.theme-light { + --background-primary: #ebf2ff; + --h1-color: #000000; + + /* ... CSS color variables for when light mode is enabled */ +} +.theme-dark { + --background-primary: #1f2a3f; + --h1-color: #ffffff; + + /* ... CSS color variables for when dark mode is enabled */ +} +``` + +For more information on how to customize your site, refer to [Customize your site](https://help.obsidian.md/Obsidian+Publish/Customize+your+site). diff --git a/docs/obsidian-developer/favicon-96x96.png b/docs/obsidian-developer/favicon-96x96.png new file mode 100644 index 0000000000000000000000000000000000000000..6f994895ad3e76b539e659c86aad09372807a548 Binary files /dev/null and b/docs/obsidian-developer/favicon-96x96.png differ diff --git a/docs/obsidian-developer/favicon.ico b/docs/obsidian-developer/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..8aad7e4619e74ee78fee5b73a622a978f8b6a3c3 Binary files /dev/null and b/docs/obsidian-developer/favicon.ico differ diff --git a/docs/obsidian-developer/publish.css b/docs/obsidian-developer/publish.css new file mode 100644 index 0000000000000000000000000000000000000000..c3736de994717b3611c100ef6ef1fda783017843 --- /dev/null +++ b/docs/obsidian-developer/publish.css @@ -0,0 +1,87 @@ +body { + --popover-width: 600px; + --popover-height: 600px; +} +.theme-dark { + --color-base-00:#151515; + --color-base-20:#222222; +} + +.reference { + --table-column-first-border-width: 0; + --table-column-last-border-width: 0; + --table-row-last-border-width: 0; + --table-header-border-width: 0; + --table-row-background-hover: var(--background-secondary); +} + +.reference .HyperMD-table-row, +.reference table { + --code-background: transparent; +} + +.reference table { + width: 100%; +} + +.reference .HyperMD-table-row, +.reference table td:first-child { + --code-normal: var(--color-cyan); +} + +.reference table th { + --table-white-space: nowrap; +} +.reference table th:first-child { + min-width: 200px; +} + +.hide-title .page-header { + display:none; +} +.hide-title.markdown-preview-view div:nth-child(4) h1 { + margin-top: 0.25em; + font-variant: var(--page-title-variant); + letter-spacing: -0.015em; + line-height: var(--page-title-line-height); + font-size: var(--page-title-size); + color: var(--page-title-color); + font-weight: var(--page-title-weight); + font-style: var(--page-title-style); + font-family: var(--page-title-font); + border: none; +} + +.internal-link code { + font-size: 0.95em; + color: var(--link-color); + background-color: transparent; +} + + +/* Same lockup as Obsidian Help */ +/* Hide site name and display logo instead */ +.site-body-left-column-site-logo { + text-align: left; + margin-bottom: 24px; +} +.site-header-logo { + display: flex; + align-items: center; +} +.site-header-logo img, +.site-body-left-column-site-logo img { + height: 25px; +} +.theme-light .site-header-logo, +.theme-light .site-body-left-column-site-logo { + filter: invert(1) hue-rotate(180deg); +} +.site-body-left-column-site-name { + display: none; +} +@media screen and (max-width: 750px) { + .site-header-text { + display: none; + } +} diff --git a/docs/obsidian-help/Attachments/Backlinks.png b/docs/obsidian-help/Attachments/Backlinks.png new file mode 100644 index 0000000000000000000000000000000000000000..9943e5b36c5cc101f9cbd2ef057195a742fe7c3f Binary files /dev/null and b/docs/obsidian-help/Attachments/Backlinks.png differ diff --git a/docs/obsidian-help/Attachments/Editor update chart.png b/docs/obsidian-help/Attachments/Editor update chart.png new file mode 100644 index 0000000000000000000000000000000000000000..91a29c05ddaffb023e1ea5f16a3b6022eacd073e Binary files /dev/null and b/docs/obsidian-help/Attachments/Editor update chart.png differ diff --git a/docs/obsidian-help/Attachments/Engelbart.jpg b/docs/obsidian-help/Attachments/Engelbart.jpg new file mode 100644 index 0000000000000000000000000000000000000000..92bb538b8028cb1a1f895252d3a2a8db54513b63 Binary files /dev/null and b/docs/obsidian-help/Attachments/Engelbart.jpg differ diff --git a/docs/obsidian-help/Attachments/Insert alises.png b/docs/obsidian-help/Attachments/Insert alises.png new file mode 100644 index 0000000000000000000000000000000000000000..5dda2668a035a1b4c9fa7a791dc6ff137870db6d Binary files /dev/null and b/docs/obsidian-help/Attachments/Insert alises.png differ diff --git a/docs/obsidian-help/Attachments/Insider.png b/docs/obsidian-help/Attachments/Insider.png new file mode 100644 index 0000000000000000000000000000000000000000..e56ab91cb550c1697c10d461e400c2f85fde029e Binary files /dev/null and b/docs/obsidian-help/Attachments/Insider.png differ diff --git a/docs/obsidian-help/Attachments/Live preview.gif b/docs/obsidian-help/Attachments/Live preview.gif new file mode 100644 index 0000000000000000000000000000000000000000..b48ef0cdeadfbc74c18338ac8092ba9804430a32 Binary files /dev/null and b/docs/obsidian-help/Attachments/Live preview.gif differ diff --git a/docs/obsidian-help/Attachments/Mac-OS-DateTime.png b/docs/obsidian-help/Attachments/Mac-OS-DateTime.png new file mode 100644 index 0000000000000000000000000000000000000000..30fe90de56e46fd3e7ad4ae2130a62618434a1c5 Binary files /dev/null and b/docs/obsidian-help/Attachments/Mac-OS-DateTime.png differ diff --git a/docs/obsidian-help/Attachments/OneNote-Importer-Open-Link.png b/docs/obsidian-help/Attachments/OneNote-Importer-Open-Link.png new file mode 100644 index 0000000000000000000000000000000000000000..acfbce8e0f54d36cb5bbd53a0b1dbc8c63a34ae0 Binary files /dev/null and b/docs/obsidian-help/Attachments/OneNote-Importer-Open-Link.png differ diff --git a/docs/obsidian-help/Attachments/OneNote-Importer-Select-Sections.png b/docs/obsidian-help/Attachments/OneNote-Importer-Select-Sections.png new file mode 100644 index 0000000000000000000000000000000000000000..2066540ae236374fd95b9b23b4ec4576e3899b42 Binary files /dev/null and b/docs/obsidian-help/Attachments/OneNote-Importer-Select-Sections.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 1.png b/docs/obsidian-help/Attachments/Pasted image 1.png new file mode 100644 index 0000000000000000000000000000000000000000..dd6b1e1c5d306d0abe30dcca03af5957a8a8f9d9 Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 1.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 11.png b/docs/obsidian-help/Attachments/Pasted image 11.png new file mode 100644 index 0000000000000000000000000000000000000000..987931af969ad82005f8eab2f8592de6c172a21e Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 11.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 13.png b/docs/obsidian-help/Attachments/Pasted image 13.png new file mode 100644 index 0000000000000000000000000000000000000000..c7798d605116c9124de87b70aeafbabe914b5e20 Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 13.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 14.png b/docs/obsidian-help/Attachments/Pasted image 14.png new file mode 100644 index 0000000000000000000000000000000000000000..30052f067340b60cf9f82918c9184c1ee9d5d4f4 Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 14.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 15.png b/docs/obsidian-help/Attachments/Pasted image 15.png new file mode 100644 index 0000000000000000000000000000000000000000..d0b89abcd7140aee4a7fb6d917f6f728661ff16a Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 15.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 16.png b/docs/obsidian-help/Attachments/Pasted image 16.png new file mode 100644 index 0000000000000000000000000000000000000000..1a1621f49aaa9368c1a9af8bbfc7ce8d791af5db Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 16.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 17.png b/docs/obsidian-help/Attachments/Pasted image 17.png new file mode 100644 index 0000000000000000000000000000000000000000..2a3d4d1004e2c20379f6d006677017ebaba27e41 Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 17.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 18.png b/docs/obsidian-help/Attachments/Pasted image 18.png new file mode 100644 index 0000000000000000000000000000000000000000..e2d4808dc16d0e76ea1cc0fb455ed5a70258147b Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 18.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 19.png b/docs/obsidian-help/Attachments/Pasted image 19.png new file mode 100644 index 0000000000000000000000000000000000000000..fc6af0972df1dc70c245e5582f8d10a1da3bef02 Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 19.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 3.png b/docs/obsidian-help/Attachments/Pasted image 3.png new file mode 100644 index 0000000000000000000000000000000000000000..64efd65db02fd368aef13d1965fcb8591cddb9b9 Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 3.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 4.png b/docs/obsidian-help/Attachments/Pasted image 4.png new file mode 100644 index 0000000000000000000000000000000000000000..2c99f4ef541e8589c51f9c407a9c4e94887b2b55 Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 4.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 5.png b/docs/obsidian-help/Attachments/Pasted image 5.png new file mode 100644 index 0000000000000000000000000000000000000000..95f40bb7ebc7252302c6ccd7b653318210823aa9 Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 5.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 6.png b/docs/obsidian-help/Attachments/Pasted image 6.png new file mode 100644 index 0000000000000000000000000000000000000000..85d45870b431efe010d8d0416b6acbf5e1b5102a Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 6.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 7.png b/docs/obsidian-help/Attachments/Pasted image 7.png new file mode 100644 index 0000000000000000000000000000000000000000..632d21eea49fe551474f0e3c5ff47444b6acfa62 Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 7.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 8.png b/docs/obsidian-help/Attachments/Pasted image 8.png new file mode 100644 index 0000000000000000000000000000000000000000..c663bee9b5c76f7d10f57a95e57deacd8bf21c3f Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 8.png differ diff --git a/docs/obsidian-help/Attachments/Pasted image 9.png b/docs/obsidian-help/Attachments/Pasted image 9.png new file mode 100644 index 0000000000000000000000000000000000000000..0ca6105872c04a123d49bc98c6085d50395badd4 Binary files /dev/null and b/docs/obsidian-help/Attachments/Pasted image 9.png differ diff --git a/docs/obsidian-help/Attachments/Roam-Importer-importing.png b/docs/obsidian-help/Attachments/Roam-Importer-importing.png new file mode 100644 index 0000000000000000000000000000000000000000..6960e804e0277c285cbe03277fb20779d326f61e Binary files /dev/null and b/docs/obsidian-help/Attachments/Roam-Importer-importing.png differ diff --git a/docs/obsidian-help/Attachments/Roam-exporting.png b/docs/obsidian-help/Attachments/Roam-exporting.png new file mode 100644 index 0000000000000000000000000000000000000000..aa8b869c263b30ec67b85ebf793ff702e011af71 Binary files /dev/null and b/docs/obsidian-help/Attachments/Roam-exporting.png differ diff --git a/docs/obsidian-help/Attachments/Search.png b/docs/obsidian-help/Attachments/Search.png new file mode 100644 index 0000000000000000000000000000000000000000..4a4a468a6849bf1fe32243b6dd2bc6b4844226f7 Binary files /dev/null and b/docs/obsidian-help/Attachments/Search.png differ diff --git a/docs/obsidian-help/Attachments/Source view.png b/docs/obsidian-help/Attachments/Source view.png new file mode 100644 index 0000000000000000000000000000000000000000..a7a7071d77e5951eae80d7fef04fe0dfc54ddef5 Binary files /dev/null and b/docs/obsidian-help/Attachments/Source view.png differ diff --git a/docs/obsidian-help/Attachments/Style-guide-modal-example.png b/docs/obsidian-help/Attachments/Style-guide-modal-example.png new file mode 100644 index 0000000000000000000000000000000000000000..5a34400efa1953f2f4f705338452bbce4a132184 Binary files /dev/null and b/docs/obsidian-help/Attachments/Style-guide-modal-example.png differ diff --git a/docs/obsidian-help/Attachments/Style-guide-zoomed-example.png b/docs/obsidian-help/Attachments/Style-guide-zoomed-example.png new file mode 100644 index 0000000000000000000000000000000000000000..81903bac0d3357824d399b8413149219686f01e4 Binary files /dev/null and b/docs/obsidian-help/Attachments/Style-guide-zoomed-example.png differ diff --git a/docs/obsidian-help/Attachments/Vault picker.png b/docs/obsidian-help/Attachments/Vault picker.png new file mode 100644 index 0000000000000000000000000000000000000000..ee449994b6d2b20a6e8aa66370f5b3aecca83e5b Binary files /dev/null and b/docs/obsidian-help/Attachments/Vault picker.png differ diff --git a/docs/obsidian-help/Attachments/Windows-OS-DateTime.png b/docs/obsidian-help/Attachments/Windows-OS-DateTime.png new file mode 100644 index 0000000000000000000000000000000000000000..94ab50e6d17121d63f4e0105ff90fdc49a84960d Binary files /dev/null and b/docs/obsidian-help/Attachments/Windows-OS-DateTime.png differ diff --git a/docs/obsidian-help/Attachments/application-installer-current-version.png b/docs/obsidian-help/Attachments/application-installer-current-version.png new file mode 100644 index 0000000000000000000000000000000000000000..50cbed2a432bf82b98cc5777da9767256337d6f3 Binary files /dev/null and b/docs/obsidian-help/Attachments/application-installer-current-version.png differ diff --git a/docs/obsidian-help/Attachments/audio/Excerpt from Mother of All Demos (1968).ogg b/docs/obsidian-help/Attachments/audio/Excerpt from Mother of All Demos (1968).ogg new file mode 100644 index 0000000000000000000000000000000000000000..cb98218bbd3cc6cae134b9c3f795341982363689 Binary files /dev/null and b/docs/obsidian-help/Attachments/audio/Excerpt from Mother of All Demos (1968).ogg differ diff --git a/docs/obsidian-help/Attachments/daily-notes-and-date-properties.png b/docs/obsidian-help/Attachments/daily-notes-and-date-properties.png new file mode 100644 index 0000000000000000000000000000000000000000..e5a43762ffd9721347d73c2e3262e765bf878d56 Binary files /dev/null and b/docs/obsidian-help/Attachments/daily-notes-and-date-properties.png differ diff --git a/docs/obsidian-help/Attachments/help-support-console-menu.png b/docs/obsidian-help/Attachments/help-support-console-menu.png new file mode 100644 index 0000000000000000000000000000000000000000..30ea7fd6be381fe3c78463aa86a3b858df7cefa4 Binary files /dev/null and b/docs/obsidian-help/Attachments/help-support-console-menu.png differ diff --git a/docs/obsidian-help/Attachments/icons/lucide-cog.svg b/docs/obsidian-help/Attachments/icons/lucide-cog.svg new file mode 100644 index 0000000000000000000000000000000000000000..974e74fe89e19f70b70efce00ddde37b09f6acd1 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-cog.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-file-search.svg b/docs/obsidian-help/Attachments/icons/lucide-file-search.svg new file mode 100644 index 0000000000000000000000000000000000000000..385463df174326153116fb1e90165aee04e62e15 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-file-search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-folder-open.svg b/docs/obsidian-help/Attachments/icons/lucide-folder-open.svg new file mode 100644 index 0000000000000000000000000000000000000000..81523819fef05ca63230ddb1f848cf42b5a095e6 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-folder-open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-git-fork.svg b/docs/obsidian-help/Attachments/icons/lucide-git-fork.svg new file mode 100644 index 0000000000000000000000000000000000000000..d0b1f93218dd69d6dfb77e82486c768f6550e014 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-git-fork.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-help-circle.svg b/docs/obsidian-help/Attachments/icons/lucide-help-circle.svg new file mode 100644 index 0000000000000000000000000000000000000000..2f55726191b8674c07abc760bc7aa5e6c21730e0 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-help-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-layout-dashboard.svg b/docs/obsidian-help/Attachments/icons/lucide-layout-dashboard.svg new file mode 100644 index 0000000000000000000000000000000000000000..07e06f35d587268807161786c059d370e01a595f --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-layout-dashboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-menu.svg b/docs/obsidian-help/Attachments/icons/lucide-menu.svg new file mode 100644 index 0000000000000000000000000000000000000000..6789b7c89ec7659a089292a233c41d3260eb13ba --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-menu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-minus-circle.svg b/docs/obsidian-help/Attachments/icons/lucide-minus-circle.svg new file mode 100644 index 0000000000000000000000000000000000000000..faf40a8f9fb503914793b48b257dbb9b2dd90bd5 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-minus-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-more-horizontal.svg b/docs/obsidian-help/Attachments/icons/lucide-more-horizontal.svg new file mode 100644 index 0000000000000000000000000000000000000000..ac12ce22bb81e102449e1977b37b4b425fafa0ac --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-more-horizontal.svg @@ -0,0 +1 @@ + diff --git a/docs/obsidian-help/Attachments/icons/lucide-pencil.svg b/docs/obsidian-help/Attachments/icons/lucide-pencil.svg new file mode 100644 index 0000000000000000000000000000000000000000..8b77e324c2b39c076da4d0f089a90a001b3226e5 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-pencil.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-plus-circle.svg b/docs/obsidian-help/Attachments/icons/lucide-plus-circle.svg new file mode 100644 index 0000000000000000000000000000000000000000..5ace3c5f524c40c7eb61856478dbda338797faf0 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-plus-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-search.svg b/docs/obsidian-help/Attachments/icons/lucide-search.svg new file mode 100644 index 0000000000000000000000000000000000000000..840a4d4ba1fb97dcd2d66f1f3bad583d20a6c959 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-search.svg @@ -0,0 +1 @@ + diff --git a/docs/obsidian-help/Attachments/icons/lucide-send.svg b/docs/obsidian-help/Attachments/icons/lucide-send.svg new file mode 100644 index 0000000000000000000000000000000000000000..c76b347a35223cde24107faafe439e3f831fba0d --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-send.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-settings.svg b/docs/obsidian-help/Attachments/icons/lucide-settings.svg new file mode 100644 index 0000000000000000000000000000000000000000..0d201fad26130bbe456ec0e15ae1c64c2c86612a --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-settings.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-terminal.svg b/docs/obsidian-help/Attachments/icons/lucide-terminal.svg new file mode 100644 index 0000000000000000000000000000000000000000..8579f5569905a96adc29db620a513903434bcfa1 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-terminal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-users.svg b/docs/obsidian-help/Attachments/icons/lucide-users.svg new file mode 100644 index 0000000000000000000000000000000000000000..070f86c2b43bfe7dc89a38b8f807da472b26d00d --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-users.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/lucide-wrench.svg b/docs/obsidian-help/Attachments/icons/lucide-wrench.svg new file mode 100644 index 0000000000000000000000000000000000000000..4b4c76c74d9ee74b385cdc7cad2faf9d04cd25ba --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-wrench.svg @@ -0,0 +1 @@ + diff --git a/docs/obsidian-help/Attachments/icons/lucide-x.svg b/docs/obsidian-help/Attachments/icons/lucide-x.svg new file mode 100644 index 0000000000000000000000000000000000000000..cfc748c0b982b31fc36cb667eb266899b43c1a00 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/lucide-x.svg @@ -0,0 +1 @@ + diff --git a/docs/obsidian-help/Attachments/icons/obsidian-side-bar-left.svg b/docs/obsidian-help/Attachments/icons/obsidian-side-bar-left.svg new file mode 100644 index 0000000000000000000000000000000000000000..2767fccdb484b855c81342d03af79e5eb2bd705c --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/obsidian-side-bar-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/obsidian-side-bar-right.svg b/docs/obsidian-help/Attachments/icons/obsidian-side-bar-right.svg new file mode 100644 index 0000000000000000000000000000000000000000..5316dd7dc24fea949f0189726da9907d0d866d90 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/obsidian-side-bar-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/icons/obsidian-vault-switcher.svg b/docs/obsidian-help/Attachments/icons/obsidian-vault-switcher.svg new file mode 100644 index 0000000000000000000000000000000000000000..56e96952b1cafae23e1b61bd8ae2c9d30e135e97 --- /dev/null +++ b/docs/obsidian-help/Attachments/icons/obsidian-vault-switcher.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/internal-links-header.png b/docs/obsidian-help/Attachments/internal-links-header.png new file mode 100644 index 0000000000000000000000000000000000000000..1ec1af8fd3d04e6a096f7f5c21bd29bf39790bc3 Binary files /dev/null and b/docs/obsidian-help/Attachments/internal-links-header.png differ diff --git a/docs/obsidian-help/Attachments/link-block-heading.png b/docs/obsidian-help/Attachments/link-block-heading.png new file mode 100644 index 0000000000000000000000000000000000000000..0edb1c063f4566a620ca7acf5b70da4230a42003 Binary files /dev/null and b/docs/obsidian-help/Attachments/link-block-heading.png differ diff --git a/docs/obsidian-help/Attachments/link-to-a-double-block.png b/docs/obsidian-help/Attachments/link-to-a-double-block.png new file mode 100644 index 0000000000000000000000000000000000000000..f07c00586fdd47b82db21e5492a504a8f3f7a436 Binary files /dev/null and b/docs/obsidian-help/Attachments/link-to-a-double-block.png differ diff --git a/docs/obsidian-help/Attachments/linking-to-a-header-with-double-hashtags.png b/docs/obsidian-help/Attachments/linking-to-a-header-with-double-hashtags.png new file mode 100644 index 0000000000000000000000000000000000000000..e1c40fcbc4a88cf5827e05c1cf7ca58f050affd0 Binary files /dev/null and b/docs/obsidian-help/Attachments/linking-to-a-header-with-double-hashtags.png differ diff --git a/docs/obsidian-help/Attachments/notion-export.png b/docs/obsidian-help/Attachments/notion-export.png new file mode 100644 index 0000000000000000000000000000000000000000..fba6e98309ad9ce0e8a9faa72a2fec32fee86233 Binary files /dev/null and b/docs/obsidian-help/Attachments/notion-export.png differ diff --git a/docs/obsidian-help/Attachments/obsidian-graph-view.png b/docs/obsidian-help/Attachments/obsidian-graph-view.png new file mode 100644 index 0000000000000000000000000000000000000000..2a58e38f6309c5a18d0463da2291a1f1bb094b4f Binary files /dev/null and b/docs/obsidian-help/Attachments/obsidian-graph-view.png differ diff --git a/docs/obsidian-help/Attachments/obsidian-lockup-help.svg b/docs/obsidian-help/Attachments/obsidian-lockup-help.svg new file mode 100644 index 0000000000000000000000000000000000000000..947f216399f5cae7d0ee9a9b5aa05db61f1cc435 --- /dev/null +++ b/docs/obsidian-help/Attachments/obsidian-lockup-help.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/obsidian-help/Attachments/ribbon-rearrange-visibility.jpeg b/docs/obsidian-help/Attachments/ribbon-rearrange-visibility.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..5897b428717ab3de00489b36ea3dae62278d9547 Binary files /dev/null and b/docs/obsidian-help/Attachments/ribbon-rearrange-visibility.jpeg differ diff --git a/docs/obsidian-help/Attachments/status-bar-desktop.png b/docs/obsidian-help/Attachments/status-bar-desktop.png new file mode 100644 index 0000000000000000000000000000000000000000..88f5279d069354583ee7168b398f82cfd79c650f Binary files /dev/null and b/docs/obsidian-help/Attachments/status-bar-desktop.png differ diff --git a/docs/obsidian-help/Attachments/status-bar-mobile.jpeg b/docs/obsidian-help/Attachments/status-bar-mobile.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..53e6d63a01e30a7e5bbce95d42af3b4b895e93e5 Binary files /dev/null and b/docs/obsidian-help/Attachments/status-bar-mobile.jpeg differ diff --git a/docs/obsidian-help/Attachments/style-guide-pointing-out-word-count.png b/docs/obsidian-help/Attachments/style-guide-pointing-out-word-count.png new file mode 100644 index 0000000000000000000000000000000000000000..a424bb12196d2dfaba030eda30cfaba8a7640496 Binary files /dev/null and b/docs/obsidian-help/Attachments/style-guide-pointing-out-word-count.png differ diff --git a/docs/obsidian-help/Attachments/sync-regional-sync-servers.png b/docs/obsidian-help/Attachments/sync-regional-sync-servers.png new file mode 100644 index 0000000000000000000000000000000000000000..8456179785bae2800dddd71891825eaabf9dfc55 Binary files /dev/null and b/docs/obsidian-help/Attachments/sync-regional-sync-servers.png differ diff --git a/docs/obsidian-help/Attachments/version-history-collaboration.png b/docs/obsidian-help/Attachments/version-history-collaboration.png new file mode 100644 index 0000000000000000000000000000000000000000..30b225f6f4fada3d821470e1d2df67aaf194ac8f Binary files /dev/null and b/docs/obsidian-help/Attachments/version-history-collaboration.png differ diff --git a/docs/obsidian-help/Contributing to Obsidian/Developers.md b/docs/obsidian-help/Contributing to Obsidian/Developers.md new file mode 100644 index 0000000000000000000000000000000000000000..8c83b152920c2cf3fb1f445b739b8239a4c64858 --- /dev/null +++ b/docs/obsidian-help/Contributing to Obsidian/Developers.md @@ -0,0 +1,11 @@ +--- +aliases: +- Developers/Build plugins +- Developers/Build themes +--- + +If you're familiar with TypeScript or CSS, you can develop your own [[Community plugins]] and [[Themes]]. + +Learn more by heading over to the [Obsidian Developer Documentation](https://docs.obsidian.md). + +To help improve our developer documentation, submit a pull request to the [obsidian-developer-docs](https://github.com/obsidianmd/obsidian-developer-docs) repository. \ No newline at end of file diff --git a/docs/obsidian-help/Contributing to Obsidian/Financial contributions.md b/docs/obsidian-help/Contributing to Obsidian/Financial contributions.md new file mode 100644 index 0000000000000000000000000000000000000000..910088e529860b7727b2c2511ab5311a71df8c65 --- /dev/null +++ b/docs/obsidian-help/Contributing to Obsidian/Financial contributions.md @@ -0,0 +1,9 @@ +This page explains the ways you can support the development of Obsidian financially. + +One of the best ways to support the team is through one or more of our paid products. + +- If you need to sync notes across your devices, consider a subscription for [[Introduction to Obsidian Sync|Obsidian Sync]]. +- If you want to publish your notes to the world, consider a subscription for [[Introduction to Obsidian Publish|Obsidian Publish]]. +- If you use Obsidian for work, we ask you to purchase a [[Commercial license]]. + +We understand that you might not be interested in any of our paid products right now, though we'd love to know how we can change that! If you still want to support Obsidian and you only use Obsidian for personal purposes, consider getting a [[Catalyst license]]. diff --git a/docs/obsidian-help/Contributing to Obsidian/Style guide.md b/docs/obsidian-help/Contributing to Obsidian/Style guide.md new file mode 100644 index 0000000000000000000000000000000000000000..a10953a45b7d2b5a5d31d63b9931185a5059f11d --- /dev/null +++ b/docs/obsidian-help/Contributing to Obsidian/Style guide.md @@ -0,0 +1,263 @@ +--- +aliases: + - Obsidian Style Guide +--- +The Obsidian documentation uses the [Google developer documentation style guide](https://developers.google.com/style). For any topics not covered by the Google style guide, use the [Microsoft Style Guide](https://learn.microsoft.com/en-us/style-guide/). + +This page lists any deviations from the Google style guide, or terminology worth highlighting. + +> [!tip] Contribute +> Most of the documentation existed before this style guide did. If you find any violations of this style guide, please [create an issue](https://github.com/obsidianmd/obsidian-docs/issues/new) or submit a pull request to [obsidianmd/obsidian-docs](https://github.com/obsidianmd/obsidian-docs). + +## Terminology and grammar + +### Terms + +- Prefer "keyboard shortcut" over "hotkey". Use Hotkey when referring to the specific feature. +- Prefer "the Obsidian app" on mobile, and "the Obsidian application" on desktop. +- Prefer "sync" or "syncing" over "synchronize" or "synchronizing". +- Prefer "search term" over "search query". +- Prefer "heading" over "header" when referring to a text that introduces a section. +- Prefer "maximum" over "max" and "minimum" over "min". + +### Product names + +Obsidian product names start with "Obsidian", for example "Obsidian Publish" and "Obsidian Sync". + +If a paragraph becomes overly repetitive, you can use the short form in subsequent references. + +For example: + +_To allow device-specific configuration, Obsidian Sync doesn't sync its own settings. You need to configure Sync for each of your devices._ + +### UI and interactions + +- Use **bold** to indicate button text +- Prefer "select" over "tap" or "click". +- Prefer "sidebar" over "side bar". +- Prefer "perform" over "invoke" and "execute" when referring to commands or actions. + +When referring to multiple UI interactions in a sequence, use the → (U+2192) symbol. For example, "**Settings → Community plugins**". + +### Notes, files, and folders + +- Use "note" when referring to a Markdown file in the vault. +- Use "file" when referring to other file extensions than Markdown. +- Prefer "note name" over "note title". +- Prefer "active note" over "current note". +- Prefer "folder" over "directory". +- Prefer "file type" over "file format", unless specifically referring to the data format of the file content. + +When moving between notes, use "open" if the destination is hidden, and "switch" if both source and destination notes are open in separate splits. + +### Reference documentation for settings + +When possible, any settings should be documented within Obsidian using a descriptive text. Avoid documenting a specific setting in Obsidian Help unless: + +- It requires more in-depth knowledge on how and when to use it. +- It's commonly misused or asked about. +- It _drastically_ changes the user experience. + +Consider using a tip callout if you want to draw attention to a specific setting. + +### Directional terms + +Hyphenate directional terms when using them as adjectives. Avoid hyphenation when direction is used as a noun. + +**Recommended:** + +- Select **Settings** in the bottom-left corner. +- Select **Settings** in the bottom left. + +**Not recommended:** + +- Select **Settings** in the bottom left corner. +- Select **Settings** in the bottom-left. + +Prefer "upper-left" and "upper-right" over "top-left" and "top-right". + +Don't indicate a direction when referring to settings. The location of the settings control depends on the device. + +**Recommended:** + +- Next to **Pick remote vault**, select **Choose**. + +**Not recommended:** + +- To the right of **Pick remote vault**, select **Choose**. + +### Instructions + +Use imperatives for the names of guides, section headings, and step-by-step instructions. The imperative mood is concise and action-oriented, which is more straightforward for users following instructions. + +- Prefer "Set up" over "Setting up" +- Prefer "Move a file" over "Moving a file" +- Prefer "Import your notes" over "Importing your notes" + +### Sentence case + +Prefer *sentence case* over *title case* for headings, buttons, and titles. When referencing UI elements always match the case of the text in the UI. + +**Recommended:** + +- How Obsidian stores data + +**Not recommended:** + +- How Obsidian Stores Data +### Examples + +Prefer realistic examples over nonsense terms. + +**Recommended:** + +- `task:(call OR schedule)` + +**Not recommended:** + +- `task:(foo OR bar)` + +### Key names + +When referring to a character on the keyboard by name, add the character between parentheses right after the name: + +**Recommended:** + +- Add a hyphen (-) in front of the word. + +**Not recommended:** + +- Add a hyphen in front of the word. +- Add a `-` in front of the word. + +### Markdown + +Use newlines between Markdown blocks: + +**Recommended:** + +```md +# Heading 1 + +This is a section. + +1. First item +2. Second item +3. Third item +``` + +**Not recommended:** + +```md +# Heading 1 +This is a section. +1. First item +2. Second item +3. Third item +``` + +### Images + +Use "**width** x **height** pixels" for describing image or screen dimensions. + +**Example:** + +Recommended image dimensions: 1920 x 1080 pixels. + +## Icons and images + +Include icons and images when they make it easier to explain things that are hard to describe with words, or when you need to show important parts of the Obsidian application. You can save images in the `Attachments` folder. + +- The image should make the text it accompanies easier to understand. + + **Example**: Once enabled, the [[Word count]] plugin will create a new entry on your bottom statusbar. + +![[Style-guide-zoomed-example.png#interface|300]] + +- Images should be in either `.png` or `.svg` format. +- If an image looks too big in the note, make it smaller outside of Obsidian, or adjust its dimensions as explained in [[Embed files#Embed an image in a note|embedding an image in a note]]. +- In rare cases, you may want to place especially large or complex images in a [[Callouts#Foldable callouts|folded callout]]. +- For pop-up windows or modals, the image should show the entire Obsidian application window. + ![[Style-guide-modal-example.png#interface]] + +### Icons + +[Lucide](https://lucide.dev/icons/) and custom Obsidian icons can be used alongside detailed elements to provide a visual representation of a feature. + +**Example:** In the ribbon on the left, select **Create new canvas** ( ![[lucide-layout-dashboard.svg#icon]] ) to create a canvas in the same folder as the active file. + +**Guidelines for icons** + +- Store icons in the `Attachments/icons` folder. +- Add the prefix `lucide-` before the Lucide icon name. +- Add the prefix `obsidian-` before the Obsidian icon name. + +**Example:** The icon for creating a new canvas should be named `lucide-layout-dashboard`. + +- Use the SVG version of the icons available. +- Icons should be `18` pixels in width, `18` pixels in height, and have a stroke width of `1.5`. You can adjust these settings in the SVG data. + +> [!info]- Adjusting size and stroke in an SVG +> ```html +> +>``` + +- Utilize the `icon` anchor in embedded images, to tweak the spacing around the icon so that it aligns neatly with the text in the vicinity. +- Icons should be surrounded by parenthesis. ( ![[lucide-cog.svg#icon]] ) + +**Example**: `( ![[lucide-cog.svg#icon]] )` + +### Image anchor tags + +Image anchors tags are available to add decorative changes to the embedded images. + +> [!warning] Live preview warning +> The icon anchor tags will not display correctly in **Live preview.** Use **Reading view** to confirm the anchor tag has been applied. + +**Icon** + +`![[lucide-menu.svg#icon]]` + +The icon anchor tag ensures correct vertical alignment for icons used to indicate interface elements. + +The first menu icon uses the anchor tag ( ![[lucide-menu.svg#icon]] ), while the second menu icon ( ![[lucide-menu.svg]] ) does not. + + +**Interface** + +`![[Vault picker.png#interface]]` + +The interface anchor tag adds a decorative box shadow around the image. In the first image, the interface anchor tag is applied. +![[Vault picker.png#interface]] +In contrast, the second image does not have the interface anchor applied. + +![[Vault picker.png]] + +**Outline** + +`![[Backlinks.png#outline]]` + +The outline anchor tag adds a subtle border around the image. In the first image, the outline anchor tag is applied. + +> [!tip] Observe the lower left of the image to see the difference. + +![[Backlinks.png#outline]] + +The second image lacks the outline anchor tag. + +![[Backlinks.png]] + +### Optimization + +Images slow the loading time of the page, and take valuable [[Introduction to Obsidian Publish|Publish]] storage space. Optimizing images allows a reduction in file size, but maintains the visual integrity of the image. + +Both images and icons should be optimized. + + +> [!success] Tools for optimizing images +> Here are a some recommended programs for reducing the size of your images. +> - **Windows:** [FileOptimizer](https://sourceforge.net/projects/nikkhokkho/) +> - **macOS:** [ImageOptim](https://imageoptim.com/) +> - **Linux/Unix** [Trimage](https://trimage.org) +> +> We recommend an optimization rate of 65-75%. diff --git a/docs/obsidian-help/Contributing to Obsidian/Translations.md b/docs/obsidian-help/Contributing to Obsidian/Translations.md new file mode 100644 index 0000000000000000000000000000000000000000..56152059c47ae6a7965cd06bb191e86c4ef419fe --- /dev/null +++ b/docs/obsidian-help/Contributing to Obsidian/Translations.md @@ -0,0 +1,9 @@ +--- +aliases: + - Add a language +--- +If you know another language, preferably natively, you can help translate the Obsidian user interface or the documentation. + +To help translate the user interface, submit a pull request to the [translations repository](https://github.com/obsidianmd/obsidian-translations). + +To help improve our documentation, submit a pull request to the [obsidian-help](https://github.com/obsidianmd/obsidian-help) repository. diff --git a/docs/obsidian-help/Editing and formatting/Advanced formatting syntax.md b/docs/obsidian-help/Editing and formatting/Advanced formatting syntax.md new file mode 100644 index 0000000000000000000000000000000000000000..7d8098462cf391fa47f8a4e9744a741394a5035d --- /dev/null +++ b/docs/obsidian-help/Editing and formatting/Advanced formatting syntax.md @@ -0,0 +1,192 @@ +--- +aliases: + - Advanced Markdown +--- +Learn how to add advanced formatting syntax to your notes. + +## Tables + +You can create table using vertical bars (`|`) and hyphens (`-`). Vertical bars separate columns, and hyphens define the column header. + +```md +| First name | Last name | +| ---------- | --------- | +| Max | Planck | +| Marie | Curie | +``` + +| First name | Last name | +| ---------- | --------- | +| Max | Planck | +| Marie | Curie | + +The vertical bars on either side of the table are optional. + +Cells don't need to be perfectly aligned with the columns. Each header row must have at least two hyphens. + +```md +First name | Last name +-- | -- +Max | Planck +Marie | Curie +``` + +### Format content within a table + +You can use [[basic formatting syntax]] to style content within a table. + +First column | Second column +-- | -- +[[Internal links]] | Link to a file _within_ your **vault**. +[[Embed files]] | ![[og-image.png\|200]] + +> [!note] Vertical bars in tables +> If you want to use [[aliases]], or to [[Basic formatting syntax#External images|resize an image]] in your table, you need to add a `\` before the vertical bar. +> +> ```md +> First column | Second column +> -- | -- +> [[Basic formatting syntax\|Markdown syntax]] | ![[og-image.png\|200]] +> ``` +> +> First column | Second column +> -- | -- +> [[Basic formatting syntax\|Markdown syntax]] | ![[og-image.png\|200]] + +You can align text to the left, right, or center of a column by adding colons (`:`) to the header row. + +```md +Left-aligned text | Center-aligned text | Right-aligned text +:-- | :--: | --: +Content | Content | Content +``` + +Left-aligned text | Center-aligned text | Right-aligned text +:-- | :--: | --: +Content | Content | Content + +## Diagram + +You can add diagrams and charts to your notes, using [Mermaid](https://mermaid-js.github.io/). Mermaid supports a range of diagrams, such as [flow charts](https://mermaid.js.org/syntax/flowchart.html), [sequence diagrams](https://mermaid.js.org/syntax/sequenceDiagram.html), and [timelines](https://mermaid.js.org/syntax/timeline.html). + +> [!tip] +> You can also try Mermaid's [Live Editor](https://mermaid-js.github.io/mermaid-live-editor) to help you build diagrams before you include them in your notes. + +To add a Mermaid diagram, create a `mermaid` [[Basic formatting syntax#Code blocks|code block]]. + +````md +```mermaid +sequenceDiagram + Alice->>+John: Hello John, how are you? + Alice->>+John: John, can you hear me? + John-->>-Alice: Hi Alice, I can hear you! + John-->>-Alice: I feel great! +``` +```` + +```mermaid +sequenceDiagram + Alice->>+John: Hello John, how are you? + Alice->>+John: John, can you hear me? + John-->>-Alice: Hi Alice, I can hear you! + John-->>-Alice: I feel great! +``` + +````md +```mermaid +graph TD + +Biology --> Chemistry +``` +```` + +```mermaid +graph TD + +Biology --> Chemistry +``` + +### Linking files in a diagram + +You can create [[internal links]] in your diagrams by attaching the `internal-link` [class](https://mermaid.js.org/syntax/flowchart.html#classes) to your nodes. + +````md +```mermaid +graph TD + +Biology --> Chemistry + +class Biology,Chemistry internal-link; +``` +```` + +```mermaid +graph TD + +Biology --> Chemistry + +class Biology,Chemistry internal-link; +``` + +> [!note] +> Internal links from diagrams don't show up in the [[Graph view]]. + +If you have many nodes in your diagrams, you can use the following snippet. + +````md +```mermaid +graph TD + +A[Biology] +B[Chemistry] + +A --> B + +class A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z internal-link; +``` +```` + +This way, each letter node becomes an internal link, with the [node text](https://mermaid.js.org/syntax/flowchart.html#a-node-with-text) as the link text. + +> [!note] +> If you use special characters in your note names, you need to put the note name in double quotes. +> +> ``` +> class "⨳ special character" internal-link +> ``` +> +> Or, `A["⨳ special character"]`. + +For more information about creating diagrams, refer to the [official Mermaid docs](https://mermaid.js.org/intro/). + +## Math + +You can add math expressions to your notes using [MathJax](http://docs.mathjax.org/en/latest/basic/mathjax.html) and the LaTeX notation. + +To add a MathJax expression to your note, surround it with double dollar signs (`$$`). + +```md +$$ +\begin{vmatrix}a & b\\ +c & d +\end{vmatrix}=ad-bc +$$ +``` + +$$ +\begin{vmatrix}a & b\\ +c & d +\end{vmatrix}=ad-bc +$$ + +You can also inline math expressions by wrapping it in `$` symbols. + +```md +This is an inline math expression $e^{2i\pi} = 1$. +``` + +This is an inline math expression $e^{2i\pi} = 1$. + +For more information about the syntax, refer to [MathJax basic tutorial and quick reference](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference). + +For a list of supported MathJax packages, refer to [The TeX/LaTeX Extension List](http://docs.mathjax.org/en/latest/input/tex/extensions/index.html). diff --git a/docs/obsidian-help/Editing and formatting/Attachments.md b/docs/obsidian-help/Editing and formatting/Attachments.md new file mode 100644 index 0000000000000000000000000000000000000000..8260c7f557820f1310faf876ef601ae427cb72fc --- /dev/null +++ b/docs/obsidian-help/Editing and formatting/Attachments.md @@ -0,0 +1,28 @@ +--- +aliases: How to/Manage attachments +--- +You can import [[Accepted file formats]], or _attachments_, to your vault, such as images, audio files, or PDFs. Attachments are regular files that you can access using your file system. + +## Add an attachment + +You can add attachments to your vault in multiple ways. Only [[Accepted file formats]] can be added. + +> [!todo]- Copy and paste attachments +> You can paste attachments directly into your notes. Obsidian creates a file with the pasted content in the default attachment location and [[Embed files|embeds]] it in the note. + +> [!todo]- Drag and drop attachments +> If you drag a file from your file system into an open editor, Obsidian copies the file to the default attachment location and [[Embed files|embeds]] it in the note. + + > [!todo]- Download attachments to vault folder + > You can download an attachment directly to your vault, for example if you [[Import notes#Import from browser|import from your browser]], or from other apps that saves files directly to your file system. + +## Change default attachment location + +By default, attachments are added to the root of your vault. + +You can change the default attachment location under **Settings → Files & Links → Default location for new attachments**. + +- **Vault folder** adds the attachment to the root of your vault. +- **In the folder specified below** adds the attachment to a specified folder. +- **Same folder as current file** adds the attachment to the same folder as the note you added it to. +- **In subfolder under current folder** adds attachments to a specified folder next to the note you added the attachment to. If it doesn't exist, Obsidian creates it when you add an attachment. diff --git a/docs/obsidian-help/Editing and formatting/Basic formatting syntax.md b/docs/obsidian-help/Editing and formatting/Basic formatting syntax.md new file mode 100644 index 0000000000000000000000000000000000000000..1c5d25a7dd594e0789a1b624944fb7602a003f1b --- /dev/null +++ b/docs/obsidian-help/Editing and formatting/Basic formatting syntax.md @@ -0,0 +1,358 @@ +--- +aliases: + - How to/Format your notes + - Markdown +--- + +Learn how to apply basic formatting to your notes, using [Markdown](https://daringfireball.net/projects/markdown/). For more advanced formatting syntax, refer to [[Advanced formatting syntax]]. + +## Paragraphs + +To create paragraphs, use a blank line to separate one or more lines of text. + +``` +This is a paragraph. + +This is another paragraph. +``` + +> [!note]- Multiple blank spaces +> Multiple adjacent blank spaces in and between paragraphs collapse to a single space when displaying a note in [[Edit and preview Markdown#Editor views|Reading view]] and on [[Introduction to Obsidian Publish|Obsidian Publish]] sites. +> +> ```md +> Multiple adjacent spaces +> +> +> +> and multiple newlines between paragraphs. +> ``` +> +> > Multiple adjacent spaces +> > +> > +> > +> > and multiple newlines between paragraphs. +> +> If you want to add multiple spaces, you can add ` ` (blank space) and `
` (newline) to your note. + +## Headings + +To create a heading, add up to six `#` symbols before your heading text. The number of `#` symbols determines the size of the heading. + +```md +# This is a heading 1 +## This is a heading 2 +### This is a heading 3 +#### This is a heading 4 +##### This is a heading 5 +###### This is a heading 6 +``` + +%% These headings use HTML to avoid cluttering the Outline/Table of contents %% +

This is a heading 1

+

This is a heading 2

+

This is a heading 3

+

This is a heading 4

+
This is a heading 5
+
This is a heading 6
+ +## Bold, italics, highlights + +Text formatting can also be applied using [[Editing shortcuts]]. + +| Style | Syntax | Example | Output | +|-|-|-|-| +| Bold | `** **` or `__ __` | `**Bold text**` | **Bold text** | +| Italic | `* *` or `_ _` | `*Italic text*` | *Italic text* | +| Strikethrough | `~~ ~~` | `~~Striked out text~~` | ~~Striked out text~~ | +| Highlight | `== ==` | `==Highlighted text==` | ==Highlighted text== | +| Bold and nested italic | `** **` and `_ _` | `**Bold text and _nested italic_ text**` | **Bold text and _nested italic_ text** | +| Bold and italic | `*** ***` or `___ ___` | `***Bold and italic text***` | ***Bold and italic text*** | + +## Internal links + +Obsidian supports two formats for [[internal links]] between notes: + +- Wikilink: `[[Three laws of motion]]` +- Markdown: `[Three laws of motion](Three%20laws%20of%20motion.md)` + +## External links + +If you want to link to an external URL, you can create an inline link by surrounding the link text in brackets (`[ ]`), and then the URL in parentheses (`( )`). + +```md +[Obsidian Help](https://help.obsidian.md) +``` + +[Obsidian Help](https://help.obsidian.md) + +You can also create external links to files in other vaults, by linking to an [[Obsidian URI|Obsidian URI]]. + +```md +[Note](obsidian://open?vault=MainVault&file=Note.md) +``` + +### Escape blank spaces in links + +If your URL contains blank spaces, you must escape them by replacing them with `%20`. + +```md +[My Note](obsidian://open?vault=MainVault&file=My%20Note.md) +``` + +You can also escape the URL by wrapping it with angled brackets (`< >`). + +```md +[My Note]() +``` + +## External images + +You can add images with external URLs, by adding a `!` symbol before an [[#External links|external link]]. + +```md +![Engelbart](https://history-computer.com/ModernComputer/Basis/images/Engelbart.jpg) +``` + +![Engelbart](https://history-computer.com/ModernComputer/Basis/images/Engelbart.jpg) + +You can change the image dimensions, by adding `|640x480` to the link destination, where 640 is the width and 480 is the height. + +```md +![Engelbart|100x145](https://history-computer.com/ModernComputer/Basis/images/Engelbart.jpg) +``` + +If you only specify the width, the image scales according to its original aspect ratio. For example: + +```md +![Engelbart|100](https://history-computer.com/ModernComputer/Basis/images/Engelbart.jpg) +``` + +> [!tip] +> If you want to add an image from inside your vault, you can also [[Embed files#Embed an image in a note|embed an image in a note]]. + +## Quotes + +You can quote text by adding a `>` symbols before the text. + +```md +> Human beings face ever more complex and urgent problems, and their effectiveness in dealing with these problems is a matter that is critical to the stability and continued progress of society. + +\- Doug Engelbart, 1961 +``` + +> Human beings face ever more complex and urgent problems, and their effectiveness in dealing with these problems is a matter that is critical to the stability and continued progress of society. + +\- Doug Engelbart, 1961 + +> [!tip] +> You can turn your quote into a [[Callouts|callout]] by adding `[!info]` as the first line in a quote. + +## Lists + +You can create an unordered list by adding a `-`, `*`, or `+` before the text. + +```md +- First list item +- Second list item +- Third list item +``` + +- First list item +- Second list item +- Third list item + +To create an ordered list, start each line with a number followed by a `.` symbol. + +```md +1. First list item +2. Second list item +3. Third list item +``` + +1. First list item +2. Second list item +3. Third list item + +### Task lists + +To create a task list, start each list item with a hyphen and space followed by `[ ]`. + +```md +- [x] This is a completed task. +- [ ] This is an incomplete task. +``` + +- [x] This is a completed task. +- [ ] This is an incomplete task. + +You can toggle a task in Reading view by selecting the checkbox. + +> [!tip] +> You can use any character inside the brackets to mark it as complete. +> +> ```md +> - [x] Milk +> - [?] Eggs +> - [-] Eggs +> ``` +> +> - [x] Milk +> - [?] Eggs +> - [-] Eggs + +### Nesting lists + +All list types can be nested in Obsidian. + +To create a nested list, indent one or more list items: + +```md +1. First list item + 1. Ordered nested list item +2. Second list item + - Unordered nested list item +``` + +1. First list item + 1. Ordered nested list item +2. Second list item + - Unordered nested list item + +Similarly, you can create a nested task list by indenting one or more list items: + +```md +- [ ] Task item 1 + - [ ] Subtask 1 +- [ ] Task item 2 + - [ ] Subtask 1 +``` + +- [ ] Task item 1 + - [ ] Subtask 1 +- [ ] Task item 2 + - [ ] Subtask 1 + +Use `Tab` or `Shift+Tab` to indent or unindent one or more selected list items for easy organization. +## Horizontal rule + +You can use three or more stars `***`, hyphens `---`, or underscore `___` on its own line to add a horizontal bar. You can also separate symbols using spaces. + +```md +*** +**** +* * * +--- +---- +- - - +___ +____ +_ _ _ +``` + +*** + +## Code + +You can format code both inline within a sentence, or in its own block. + +### Inline code + +You can format code within a sentence using single backticks. + +```md +Text inside `backticks` on a line will be formatted like code. +``` + +Text inside `backticks` on a line will be formatted like code. + +If you want to put backticks in an inline code block, surround it with double backticks like so: inline ``code with a backtick ` inside``. + +### Code blocks + +To format a block of code, surround the code with triple backticks. + +~~~ +``` +cd ~/Desktop +``` +~~~ + +```md +cd ~/Desktop +``` + +You can also create a code block by indenting the text using `Tab` or 4 blank spaces. + +```md + cd ~/Desktop +``` + +You can add syntax highlighting to a code block, by adding a language code after the first set of backticks. + +~~~md +```js +function fancyAlert(arg) { + if(arg) { + $.facebox({div:'#foo'}) + } +} +``` +~~~ + +```js +function fancyAlert(arg) { + if(arg) { + $.facebox({div:'#foo'}) + } +} +``` + +Obsidian uses Prism for syntax highlighting. For more information, refer to [Supported languages](https://prismjs.com/#supported-languages). + +> [!note] +> [[Edit and preview Markdown#Source mode|Source mode]] and [[Edit and preview Markdown#Live Preview|Live Preview]] do not support PrismJS, and may render syntax highlighting differently. + +## Footnotes + +You can add footnotes[^footnote] to your notes using the following syntax: + +[^footnote]: This is a footnote. + +```md +This is a simple footnote[^1]. + +[^1]: This is the referenced text. +[^2]: Add 2 spaces at the start of each new line. + This lets you write footnotes that span multiple lines. +[^note]: Named footnotes still appear as numbers, but can make it easier to identify and link references. +``` + +You can also inline footnotes in a sentence. Note that the caret goes outside the brackets. + +```md +You can also use inline footnotes. ^[This is an inline footnote.] +``` + +> [!note] +> Inline footnotes only work in reading view, not in Live Preview. + +## Comments + +You can add comments by wrapping text with `%%`. Comments are only visible in Editing view. + +```md +This is an %%inline%% comment. + +%% +This is a block comment. + +Block comments can span multiple lines. +%% +``` + +## Learn more + +To learn more advanced formatting syntax, such as tables, diagrams, and math expressions, refer to [[Advanced formatting syntax]]. + +To learn more about how Obsidian parses Markdown, refer to [[Obsidian Flavored Markdown]]. diff --git a/docs/obsidian-help/Editing and formatting/Callouts.md b/docs/obsidian-help/Editing and formatting/Callouts.md new file mode 100644 index 0000000000000000000000000000000000000000..cd231e1919e1d37572c60e981552d89be80289e7 --- /dev/null +++ b/docs/obsidian-help/Editing and formatting/Callouts.md @@ -0,0 +1,228 @@ +--- +aliases: +- How to/Use callouts +--- + +Use callouts to include additional content without breaking the flow of your notes. + +To create a callout, add `[!info]` to the first line of a blockquote, where `info` is the _type identifier_. The type identifier determines how the callout looks and feels. To see all available types, refer to [[#Supported types]]. + +```markdown +> [!info] +> Here's a callout block. +> It supports **Markdown**, [[Internal link|Wikilinks]], and [[Embed files|embeds]]! +> ![[Engelbart.jpg]] +``` + +> [!info] +> Here's a callout block. +> It supports **Markdown**, [[Internal links|Wikilinks]] and [[Embed files|embeds]]! +> ![[Engelbart.jpg]] + +Callouts are also supported natively on [[Introduction to Obsidian Publish|Obsidian Publish]]. + +> [!note] +> If you're also using the Admonitions plugin, you should update it to at least version 8.0.0 to avoid problems with the new callout feature. + +### Change the title + +By default, the title of the callout is its type identifier in title case. You can change it by adding text after the type identifier: + +```markdown +> [!tip] Callouts can have custom titles +> Like this one. +``` + +> [!tip] Callouts can have custom titles +> Like this one. + +You can even omit the body to create title-only callouts: + +```markdown +> [!tip] Title-only callout +``` + +> [!tip] Title-only callout + +### Foldable callouts + +You can make a callout foldable by adding a plus (+) or a minus (-) directly after the type identifier. + +A plus sign expands the callout by default, and a minus sign collapses it instead. + +```markdown +> [!faq]- Are callouts foldable? +> Yes! In a foldable callout, the contents are hidden when the callout is collapsed. +``` + +> [!faq]- Are callouts foldable? +> Yes! In a foldable callout, the contents are hidden when collapsed. + +### Nested callouts + +You can nest callouts in multiple levels. + +```markdown +> [!question] Can callouts be nested? +> > [!todo] Yes!, they can. +> > > [!example] You can even use multiple layers of nesting. +``` + +> [!question] Can callouts be nested? +> > [!todo] Yes!, they can. +> > > [!example] You can even use multiple layers of nesting. + +### Customize callouts + +[[CSS snippets]] and [[Community plugins]] can define custom callouts, or even overwrite the default configuration. + +To define a custom callout, create the following CSS block: + +```css +.callout[data-callout="custom-question-type"] { + --callout-color: 0, 0, 0; + --callout-icon: lucide-alert-circle; +} +``` + +The value of the `data-callout` attribute is the type identifier you want to use, for example `[!custom-question-type]`. + +- `--callout-color` defines the background color using numbers (0–255) for red, green, and blue. +- `--callout-icon` can be an icon ID from [lucide.dev](https://lucide.dev), or an SVG element. + +> [!warning] Note about lucide icon versions +> Obsidian updates Lucide icons periodically. The current version included is shown below; use these or earlier icons in custom callouts. +> ![[Credits#^lucide]] + +> [!tip] SVG icons +> Instead of using a Lucide icon, you can also use a SVG element as the callout icon. +> +> ```css +> --callout-icon: '...custom svg...'; +> ``` + +### Supported types + +You can use several callout types and aliases. Each type comes with a different background color and icon. + +To use these default styles, replace `info` in the examples with any of these types, such as `[!tip]` or `[!warning]`. + +Unless you [[#Customize callouts]], any unsupported type defaults to the `note` type. The type identifier is case-insensitive. + +> [!note] +> ```md +> > [!note] +> > Lorem ipsum dolor sit amet +> ``` + +--- + +> [!abstract]- +> ```md +> > [!abstract] +> > Lorem ipsum dolor sit amet +> ``` + +Aliases: `summary`, `tldr` + +--- + +> [!info]- +> ```md +> > [!info] +> > Lorem ipsum dolor sit amet +> ``` + +--- + +> [!todo]- +> ```md +> > [!todo] +> > Lorem ipsum dolor sit amet +> ``` + +--- + +> [!tip]- +> ```md +> > [!tip] +> > Lorem ipsum dolor sit amet +> ``` + +Aliases: `hint`, `important` + +--- + +> [!success]- +> ```md +> > [!success] +> > Lorem ipsum dolor sit amet +> ``` + +Aliases: `check`, `done` + +--- + +> [!question]- +> ```md +> > [!question] +> > Lorem ipsum dolor sit amet +> ``` + +Aliases: `help`, `faq` + +--- + +> [!warning]- +> ```md +> > [!warning] +> > Lorem ipsum dolor sit amet +> ``` + +Aliases: `caution`, `attention` + +--- + +> [!failure]- +> ```md +> > [!failure] +> > Lorem ipsum dolor sit amet +> ``` + +Aliases: `fail`, `missing` + +--- + +> [!danger]- +> ```md +> > [!danger] +> > Lorem ipsum dolor sit amet +> ``` + +Alias: `error` + +--- + +> [!bug]- +> ```md +> > [!bug] +> > Lorem ipsum dolor sit amet +> ``` + +--- + +> [!example]- +> ```md +> > [!example] +> > Lorem ipsum dolor sit amet +> ``` + +--- + +> [!quote]- +> ```md +> > [!quote] +> > Lorem ipsum dolor sit amet +> ``` + +Alias: `cite` diff --git a/docs/obsidian-help/Editing and formatting/Edit and preview Markdown.md b/docs/obsidian-help/Editing and formatting/Edit and preview Markdown.md new file mode 100644 index 0000000000000000000000000000000000000000..d6340c97120d4d08f5a81d4be15210ce657222cc --- /dev/null +++ b/docs/obsidian-help/Editing and formatting/Edit and preview Markdown.md @@ -0,0 +1,45 @@ +--- +aliases: + - How to/Read and edit modes + - Editing and formatting/Editing and previewing Markdown +--- +Obsidian lets you customize how to edit and preview notes with Markdown syntax using _editor views_ and _editor modes_. + +Markdown is a markup language that uses special syntax to format text that's mainly useful when editing your notes. Less so when reading them. Instead, Obsidian can show them in a way that's more suitable for reading. + +Editor views and modes lets you customize how Markdown syntax appears when you're editing and reading notes. + +## Editor views + +You can switch between the _editing view_ and _reading view_, depending on whether you intend to make changes to the note. + +To switch between views, select the view switcher (open book icon or pencil icon) in the upper-right corner of the editor, or press `Ctrl+E` (or `Cmd+E` on macOS) in the editor. + +> [!note] +> You need to enable **Settings → Appearance → Show tab title bar** to see the icon for switching views. + +You can change the default editor view under **Settings → Editor → Default view for new tabs**. + +> [!tip] Side-by-side preview +> To open a note in both editing and reading view side-by-side, press `Ctrl` (or `Cmd` on macOS) and select the view switcher (open book icon or pencil icon) in the upper-right corner of the editor. + +## Editor modes + +In Editing view, you can edit your notes using one of two modes, _Live Preview_ or _Source mode_. + +You can change the default editor mode under **Settings → Editor → Default editing mode**. + +### Live Preview + +Live Preview is a smart editor mode that previews Markdown-formatted text while you're editing. + +You can reveal the syntax for any Markdown-formatted text by moving the text cursor to it. + +> [!tip] +> Since Live Preview lets you see the formatting in the editing view, it often removes the need to switch between editor views. + +### Source mode + +Source mode displays the Markdown syntax for the entire note. + +Use Source mode if you prefer to see the plain text representation of the note. diff --git a/docs/obsidian-help/Editing and formatting/Editing shortcuts.md b/docs/obsidian-help/Editing and formatting/Editing shortcuts.md new file mode 100644 index 0000000000000000000000000000000000000000..9022a1586dfac092b8a147f5071201fae23c6b6b --- /dev/null +++ b/docs/obsidian-help/Editing and formatting/Editing shortcuts.md @@ -0,0 +1,130 @@ +--- +aliases: + - Editing and formatting/Keyboard shortcuts for editing +--- +Learn how to use keyboard shortcuts to navigate and edit text in your notes. You can also define [[Hotkeys|custom hotkeys]]. + +## Windows and Linux shortcuts + +### Common actions + +| Action | Shortcut | +|-|-| +| Copy | `Ctrl+C` | +| Cut | `Ctrl+X` | +| Paste | `Ctrl+V` | +| Paste without formatting | `Ctrl+Shift+V` | +| Undo | `Ctrl+Z` | +| Redo | `Ctrl+Shift+Z` or `Ctrl+Y` | +| Copy paragraph | `Ctrl+C` (with no selected text) | +| Cut paragraph | `Ctrl+X` (with no selected text) | + +### Text editing + +| Action | Shortcut | +|-|-| +| Insert new line| `Enter` | +| Delete the previous character | `Backspace` | +| Delete the next character | `Delete` | +| Delete the previous word | `Ctrl+Backspace` | +| Delete the next word | `Ctrl+Delete` | +| Delete the current line | `Ctrl+Shift+K` (with no selected text) | + +### Text navigation + +| Action | Shortcut | +|-|-| +| Move the cursor one character | `Left/right arrow` | +| Move the cursor to the beginning of the previous word | `Ctrl+Left arrow` | +| Move the cursor to the end of the next word | `Ctrl+Right arrow` | +| Move the cursor to the beginning of the current line | `Home` | +| Move the cursor to the end of the current line | `End` | +| Move the cursor to the previous line | `Up arrow` | +| Move the cursor to the next line | `Down arrow` | +| Move the cursor to the beginning of the note | `Ctrl+Home` | +| Move the cursor to the end of the note | `Ctrl+End` | +| Move the cursor up one page | `Page up` | +| Move the cursor down one page | `Page down` | + +### Text selection + +| Action | Shortcut | +|-|-| +| Simplify selection | `Escape` | +| Select all | `Ctrl+A` | +| Extend selection one character | `Shift+Left/right arrow` | +| Extend selection to the beginning of the previous word | `Ctrl+Shift+Left arrow` | +| Extend selection to the end of the next word | `Ctrl+Shift+Right arrow` | +| Extend selection to the beginning of the current line | `Shift+Home` | +| Extend selection to the end of the current line | `Shift+End` | +| Extend selection to the beginning of the note | `Ctrl+Shift+Home` | +| Extend selection to the end of the note | `Ctrl+Shift+End` | +| Extend selection one page up | `Shift+Page up` | +| Extend selection one page down | `Shift+Page down` | + +## macOS shortcuts + +### Common actions + +| Action | Shortcut | +|-|-| +| Copy | `Cmd+C` | +| Cut | `Cmd+X` | +| Paste | `Cmd+V` | +| Paste without formatting | `Cmd+Shift+V` | +| Undo | `Cmd+Z` | +| Redo | `Cmd+Shift+Z` | +| Copy paragraph | `Cmd+C` (with no selected text) | +| Cut paragraph | `Cmd+X` (with no selected text) | + +### Text formatting + +| Action | Shortcut | +| ---- | ---- | +| Bold text | `Cmd+B` | +| Italic text | `Cmd+I` | + +### Text editing + +| Action | Shortcut | +|-|-| +| Insert new line| `Enter` | +| Delete the previous character | `Backspace` | +| Delete the next character | `Delete` | +| Delete the previous word | `Option+Backspace` | +| Delete the next word | `Option+Delete` | +| Delete to the beginning of the current line | `Cmd+Backspace` | +| Delete to the end of the current line | `Cmd+Delete` | +| Delete the current line | `Cmd+Shift+K` (with no selected text) | + +### Text navigation + +| Action | Shortcut | +|-|-| +| Move the cursor one character | `Left/right arrow` | +| Move the cursor to the beginning of the previous word | `Option+Left arrow` | +| Move the cursor to the end of the next word | `Option+Right arrow` | +| Move the cursor to the beginning of the current line | `Cmd+Left arrow` | +| Move the cursor to the end of the current line | `Cmd+Right arrow` | +| Move the cursor to the previous line | `Up arrow` | +| Move the cursor to the next line | `Down arrow` | +| Move the cursor to the beginning of the note | `Cmd+Up arrow` | +| Move the cursor to the end of the note | `Cmd+Down arrow` | +| Move the cursor up one page | `Ctrl+Up arrow` | +| Move the cursor down one page | `Ctrl+Down arrow` | + +### Text selection + +| Action | Shortcut | +|-|-| +| Simplify selection | `Escape` | +| Select all | `Cmd+A` | +| Extend selection one character | `Shift+Left/right arrow` | +| Extend selection to the beginning of the previous word | `Option+Shift+Left arrow` | +| Extend selection to the end of the next word | `Option+Shift+Right arrow` | +| Extend selection to the beginning of the current line | `Cmd+Shift+Left arrow` | +| Extend selection to the end of the current line | `Cmd+Shift+Right arrow` | +| Extend selection to the beginning of the note | `Cmd+Shift+Up arrow` | +| Extend selection to the end of the note | `Cmd+Shift+Down arrow` | +| Extend selection one page up | `Ctrl+Shift+Up arrow` | +| Extend selection one page down | `Ctrl+Shift+Down arrow` | diff --git a/docs/obsidian-help/Editing and formatting/Embed web pages.md b/docs/obsidian-help/Editing and formatting/Embed web pages.md new file mode 100644 index 0000000000000000000000000000000000000000..4cc536c63ae9982a8b074dec5442bf38aeb58d22 --- /dev/null +++ b/docs/obsidian-help/Editing and formatting/Embed web pages.md @@ -0,0 +1,39 @@ +--- +aliases: + - How to/Embedding web pages + - Iframe + - Editing and formatting/Embedding web pages +--- +Learn how to use the [iframe](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe) HTML element to embed web pages in your notes. + +To embed a web page, add the following in your note and replace the placeholder text with the URL of the web page you want to embed: + +```html + +``` + +> [!note] +> Some websites don't allow you to embed them. Instead, they may provide URLs that are meant for embedding them. If the website doesn't support embedding, try searching for the name of the website followed by "embed iframe". For example, "youtube embed iframe". + +> [!tip] +> If you're using [[Canvas]], you can embed a web page in a card. For more information, refer to [[Canvas#Add cards from web pages]]. + +## Embed a YouTube video + +To embed a YouTube video, use the same Markdown syntax as [[Basic formatting syntax#External images|external images]]: + +```md +![](https://www.youtube.com/watch?v=NnTvZWp5Q7o) +``` + +![](https://www.youtube.com/watch?v=NnTvZWp5Q7o) + +## Embed a tweet + +To embed a tweet, use the same Markdown syntax as [[Basic formatting syntax#External images|external images]]: + +```md +![](https://twitter.com/obsdmd/status/1580548874246443010) +``` + +![](https://twitter.com/obsdmd/status/1580548874246443010) diff --git a/docs/obsidian-help/Editing and formatting/Folding.md b/docs/obsidian-help/Editing and formatting/Folding.md new file mode 100644 index 0000000000000000000000000000000000000000..201540ec632b40cc2b9cb08f49ba9ea511acd76f --- /dev/null +++ b/docs/obsidian-help/Editing and formatting/Folding.md @@ -0,0 +1,16 @@ +Learn how to get a better overview of large notes by using _folding_ to hide parts of the note. Folding is useful when creating outlines for your notes and when you want to focus on what you're working on at the moment. + +You can fold headings and indented lists by hovering the mouse cursor over the section you want to fold, and then selecting the arrow on the left. Folded sections show an arrow regardless of if you hover it or not. + +Folding is turned on by default. To turn off folding, open **Settings** → **Editor**, and then turn off **Fold indent** or **Fold heading**, depending on your needs. + +To toggle all sections at the same time, use the following commands: + +- To collapse all sections, open the [[Command palette]], and then select **Fold all headings and lists**. +- To expand all sections, open the [[Command palette]], and then select **Unfold all headings and lists**. + +> [!tip] +> If you prefer to fold using your keyboard, you can assign [[Hotkeys|hotkeys]] to the **Fold less** and **Fold more** commands. +> +> - **Fold less** unfolds the section at the text cursor. +> - **Fold more** folds the section or list that contains the text cursor. diff --git a/docs/obsidian-help/Editing and formatting/HTML content.md b/docs/obsidian-help/Editing and formatting/HTML content.md new file mode 100644 index 0000000000000000000000000000000000000000..ba58e6e58e82e17dc79f65d39487d4790a120691 --- /dev/null +++ b/docs/obsidian-help/Editing and formatting/HTML content.md @@ -0,0 +1,31 @@ +--- +aliases: + - Advanced topics/HTML sanitization + - Editing and formatting/Using HTML +--- +Obsidian supports HTML to allow you to display your notes the way you want, or even [[Embed web pages|embed web pages]]. Allowing HTML inside your notes comes with risks. To prevent malicious code from doing harm, Obsidian _sanitizes_ any HTML in your notes. + +> [!example] +> The `