Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Releases: nothingislost/obsidian-codemirror-options

0.3.1

13 Oct 16:32
Compare
Choose a tag to compare

0.3.1

  • Further improved the performance of Collapse External Links and Render Images Inline
  • Fixed a bug which was preventing images from rendering when initially inserted into the document

0.3.0

Shiny new things

  • OpenMD
    • Added Single Column Table Support
    • Added native Templater Syntax Support
    • Added support for Headers in Lists
  • Added the Auto Align Tables feature
  • Added the Render Images Inline feature

Improvements

  • Removing "task" from the Token List option will now properly remove the CSS styled check box
  • The Token List setting to allows text selection
    • This is to allow copy/pasting the default token list
  • Fixed a performance related issue with Collapse External Links & Render Images Inline
    • These settings were doing way more work than needed which caused noticeable lag when working on large documents. In addition, turning the settings off did not properly unload the CodeMirror event handlers.
    • These settings may be unstable as the performance tweaks are ironed out. If you notice lag, disable both of these options and see if things improve.

Known Issues

  • Selecting inline images can cause an image to not render after the selection is cleared. Making a change anywhere in the editor will fix this for now.

0.3.0

13 Oct 00:11
Compare
Choose a tag to compare
0.3.0 Pre-release
Pre-release

0.3.0

CodeMirror Options 0.3.0 Demo

Shiny new things

  • OpenMD
    • Added [Single Column Table Support
    • Added native Templater Syntax Support
    • Added support for Headers in Lists
  • Added the Auto Align Tables feature
  • Added the Render Images Inline feature

Improvements

  • Removing "task" from the Token List option will now properly remove the CSS styled check box
  • The [[Token List]] setting to allows text selection
    • This is to allow copy/pasting the default token list
  • Fixed a performance related issue with [[Collapse External Links]] & [[Render Images Inline]]
    • These settings were doing way more work than needed which caused noticeable lag when working on large documents. In addition, turning the settings off did not properly unload the CodeMirror event handlers.
    • These settings may be unstable as the performance tweaks are ironed out. If you notice lag, disable both of these options and see if things improve.

Known Issues

  • Selecting inline images can cause an image to not render after the selection is cleared. Making a change anywhere in the editor should fix this for now.

0.2.1

05 Oct 14:52
Compare
Choose a tag to compare

0.2.1

  • Bug fixes related to the 0.2.0 release
  • Register commands for most options
  • Fix highlighting token parsing
  • Fix code block class application

0.2.0

  • This is a major release which adds/changes quite a few things
  • Updated: Hide Markdown Tokens
    • Further stabilization improvements
      • Removed all usage of display: none in edit mode due to the fact that this hiding method breaks cursor placement
      • All token hiding should be done with font-family: monospace;font-size: 1px !important; letter-spacing: -1ch;color: transparent;
      • If you have a theme or CSS snippet that is using display:none on elements inside of a CodeMirror block, it is advised to disable those styles in favor of the token hiding provided by this plugin.
    • Added the ability to enable/disable each token type individually
    • Added hiding support for additional token types
      • Highlight/Mark
      • Internal link URL & Ref
  • New: Container Attributes
    • This new option applies data attributes to all CodeMirror line divs that describe the child elements contained within the line
    • Think of this like Contextual Typography for Edit Mode
    • This option currently applies the following attributes to each CodeMirror line
      • [data-tag-name="<html_element_type>"]
        • Currently supported HTML tags: ol, ul, h1-h6, code, frontmatter
      • [data-heading="<the_full_text_of_any_heading_found>"]
      • [data-hashtags="<space_delimited_list_of_all_tags_found>"]
  • New: OpenMD Mode
    • This new option replaces Obsidian's HyperMD mode with a modified version which enables new functionality
    • The new mode is forked from official HyperMD mode and tries to replicate any Obsidian specific customizations
    • Warning: This new mode could have missing features or differences in parsing behavior when compared to the default Obsidian mode. Please raise an issue for any regressions or bugs encountered.
    • New functionality provided by this mode:
      • Enhanced parsing of internal links to split up file name, reference, and alias into distinct spans. This allows for proper hiding of internal link tokens when using the "Hide Markdown Tokens" feature
      • Fixed the handling of hashtags that include underscores
  • New: Collapse External Links
    • This features collapses external links (in edit mode) so that they only show the link name. The full link text will expand when clicking into the link.
  • Updated: Edit Mode Click Handler
    • This option has been updated to add a class to the div.cm-s-obsidian element whenever a modifier key is pressed
      • Currently supports ctrl (.HyperMD-with-ctrl), alt (.HyperMD-with-alt), meta (.HyperMD-with-meta)
      • This feature allows you to apply conditional CSS like changing the cursor to a pointer when hovering a link and also pressing ctrl/cmd
  • New: Set cursor blink rate

0.2.0

04 Oct 00:23
Compare
Choose a tag to compare
0.2.0 Pre-release
Pre-release

0.2.0

  • This is a major release which adds/changes quite a few things
  • Updated: Hide Markdown Tokens
    • Further stabilization improvements
      • Removed all usage of display: none in edit mode due to the fact that this hiding method breaks cursor placement
      • All token hiding should be done with font-family: monospace;font-size: 1px !important; letter-spacing: -1ch;color: transparent;
      • If you have a theme or CSS snippet that is using display:none on elements inside of a CodeMirror block, it is advised to disable those styles in favor of the token hiding provided by this plugin.
    • Added the ability to enable/disable each token type individually
    • Added hiding support for additional token types
      • Highlight/Mark
      • Internal link URL & Ref
  • New: Container Attributes
    • This new option applies data attributes to all CodeMirror line divs that describe the child elements contained within the line
    • Think of this like Contextual Typography for Edit Mode
    • This option currently applies the following attributes to each CodeMirror line
      • [data-tag-name="<html_element_type>"]
        • Currently supported HTML tags: ol, ul, h1-h6, code, frontmatter
      • [data-heading="<the_full_text_of_any_heading_found>"]
      • [data-hashtags="<space_delimited_list_of_all_tags_found>"]
  • New: OpenMD Mode
    • This new option replaces Obsidian's HyperMD mode with a modified version which enables new functionality
    • The new mode is forked from official HyperMD mode and tries to replicate any Obsidian specific customizations
    • Warning: This new mode could have missing features or differences in parsing behavior when compared to the default Obsidian mode. Please raise an issue for any regressions or bugs encountered.
    • New functionality provided by this mode:
      • Enhanced parsing of internal links to split up file name, reference, and alias into distinct spans. This allows for proper hiding of internal link tokens when using the "Hide Markdown Tokens" feature
      • Fixed the handling of hashtags that include underscores
  • New: Collapse External Links
    • This features collapses external links (in edit mode) so that they only show the link name. The full link text will expand when clicking into the link.
  • Updated: Edit Mode Click Handler
    • This option has been updated to add a class to the div.cm-s-obsidian element whenever a modifier key is pressed
      • Currently supports ctrl (.HyperMD-with-ctrl), alt (.HyperMD-with-alt), meta (.HyperMD-with-meta)
      • This feature allows you to apply conditional CSS like changing the cursor to a pointer when hovering a link and also pressing ctrl/cmd
  • New: Set cursor blink rate

0.1.4

26 Sep 05:17
Compare
Choose a tag to compare

0.1.4

  • Fixed a bug which would cause "can't read property 'length' of undefined" randomly, when opening files
  • Changed the code block copy button handling to account for the new default Obsidian copy button
  • Fixed a bug which would prevent CodeMirror options from applying to all open panes
  • Fixed a bug which would cause syntax highlighting to not apply sometimes in preview mode
  • Added highlight tokens (==) to the list of tokens hidden by the "Hide Tokens" feature
  • Stabilize Hide Markdown Tokens
    • The cursor placement logic has been replaced with a hopefully more stable method which prevents the scroll position from jumping up and down on click
    • The only outstanding cursor bug that I'm aware of is when placing the cursor to the right of the fold widget on a folded line

0.1.3

13 Sep 14:44
Compare
Choose a tag to compare

0.1.3

  • Move copy button to top right and reduce size
  • Remove trailing line breaks from copied text
  • Add option to include copy button on all PRE blocks in preview

0.1.2

11 Sep 18:14
Compare
Choose a tag to compare

0.1.2

  • More bug fixes to syntax highlighting logic

0.1.1

11 Sep 15:52
Compare
Choose a tag to compare

0.1.1

  • Bug fixes to the line number and copy button handling
  • Add highlighting support for js html and json

0.1.0

11 Sep 01:32
Compare
Choose a tag to compare

0.1.0

  • Add an option to show line numbers in preview mode
  • Add an option to show a copy button on code blocks in preview mode
  • Fix the default font size for code blocks to 16px. This can be overridden using Style Settings
  • In preview mode, wrap code blocks in a <code> element to better mimic the original prism.js DOM structure.
    • The structure is now <div><pre><code></code></pre></div>
    • This change should hopefully be transparent for most use csses

0.0.8

06 Sep 22:56
Compare
Choose a tag to compare

This is the stable(ish) release of the features introduced in the 0.0.7 pre-release.

This release adds two HyperMD features

  • Hide Markdown Syntax
  • Click Handling for Checkboxes