0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 22:52:40 +00:00
Commit Graph

60 Commits

Author SHA1 Message Date
Charlie Humphreys
38d8764f15 Disable code folding in style tab, disable active line highlight and whitespace visibility 2021-12-20 00:42:53 -06:00
Charlie Humphreys
2c2579ae2b Update usage of trailing space to include special chars for spaces 2021-12-13 20:49:32 -06:00
Charlie Humphreys
84f3519dbe Remove unnecessary findPersistent method 2021-12-10 23:39:26 -06:00
Charlie Humphreys
b60bc2996b Update search/replace shortcuts and add 'Enter'-based shortcut for navigating backwards 2021-12-10 23:05:16 -06:00
Charlie Humphreys
65c9a2cba0 Update CodeMirror library import order and add comments explaining each file 2021-12-10 23:04:22 -06:00
Trevor Buckner
220316ec7e Merge branch 'master' into pr/1819 2021-12-09 22:30:23 -05:00
Trevor Buckner
d4b26cc4c4 Merge branch 'master' into pr/1719 2021-12-03 15:16:19 -05:00
Trevor Buckner
1865e56b04 lint 2021-12-02 23:44:48 -05:00
Trevor Buckner
4fefc1e4d2 Merge branch 'master' into pr/1707 2021-12-02 23:29:47 -05:00
Trevor Buckner
a30e150ade Disable max lines to satisfy lint
Eventually we should move the hotkey scripts into a separate file. They are becoming a beast of their own.
2021-12-02 15:47:18 -05:00
Trevor Buckner
9da1bfc606 Finish Merge with Master 2021-12-02 12:18:22 -05:00
Charlie Humphreys
2ea6610c57 Merge branch 'code-folding' into codemirror-tweaks
# Conflicts:
#	shared/naturalcrit/codeEditor/codeEditor.jsx
2021-11-14 14:46:26 -06:00
Charlie Humphreys
1ec1ddc80c Remove code fold toggling shortcut
#629
2021-11-14 09:58:41 -06:00
Charlie Humphreys
ea68e4778e Merge branch 'code-folding' into codemirror-tweaks 2021-11-11 21:16:40 -06:00
Charlie Humphreys
2d30ac21a7 Update code based on PR feedback
#692
2021-11-11 17:08:05 -06:00
Charlie Humphreys
da6b00918d Add addons for code search, auto-closing code, active line highlight, and trailing whitespace
#1201 #1202
2021-11-10 17:11:00 -06:00
Charlie Humphreys
52d7e6892b Adjust comment to better describe the require section
#629
2021-11-10 11:37:18 -06:00
Charlie Humphreys
c86e8c51cb Remove code added for debugging purposes
#629
2021-11-10 10:26:55 -06:00
Charlie Humphreys
b06dedfa4a Fix linting issues
#629
2021-11-08 17:24:33 -06:00
Charlie Humphreys
eec6e66543 Replace copied code with require methods to import the CodeMirror helpers
Put back the correct require notation for importing the foldcode and foldgutter helpers

#629
2021-11-07 21:35:35 -06:00
Charlie Humphreys
c0b9f4488f Add code folding feature for all content within a single page
Added the gutter definitions and css for code folding. Enabling code folding in the editor was
tricky due to how CodeMirror loads its files. At the moment, the CodeMirror code-folding code has
been copied into the fold-code.js file. Additionally, that file contains the helper registration
for the Homebrewery-specific code folding function.

#629
2021-11-02 22:40:17 -05:00
Trevor Buckner
ddb12ffbe2 Make sure initial tab loads with language for code highlighting 2021-10-24 18:03:10 -04:00
Trevor Buckner
63d659ff49 use CodeMirror Documents
Instead of re-building the whole editor box with every tab switch, we just swap in and out CodeMirror "documents".

Maintains undo history, scroll position, highlight coloring, etc.
2021-10-19 23:49:11 -04:00
G.Ambatte
ab2900cadf Expose CodeMirror functions in codeEditor.jsx 2021-10-18 22:29:25 +13:00
Sean Robertson
bfcb29ff9c Reduce CodeMirror codeEditor historyEventDelay to 250 2021-10-18 22:29:25 +13:00
G.Ambatte
9bc52b412c Initial pass at Editor Toolbar - Undo and Redo. 2021-10-18 22:29:25 +13:00
Gazook89
3bf5d7a2db change makeComment function to adapt to gfm or css editor 2021-09-30 17:59:45 -05:00
Gazook89
40a75b9b27 increment ordered list numbering 2021-09-28 16:09:00 -05:00
Gazook89
63c59a223a refine removal of lists regardless if UL or OL
Next step after this is to get numbered lists to increase
2021-09-28 14:34:31 -05:00
Gazook89
6717692187 finish UL creation/removal function 2021-09-28 11:19:02 -05:00
Gazook89
41609f90ea update to detect if an unordered list or not. 2021-09-27 21:34:09 -05:00
Gazook89
cb0f5217fe get and set selection to cover entire lines 2021-09-27 21:23:05 -05:00
Gazook89
ba9413eae5 initial commit, add hotkey definitions 2021-09-27 09:31:59 -05:00
Rodrigo Kuerten
c10bdabee0 Added h1 and h2 & cmd version 2021-09-22 18:21:34 -03:00
Rodrigo Kuerten
bbad4b9e8a Removed H1 and H2 options and updated cursor after added hashtags 2021-09-21 17:25:37 -03:00
Rodrigo Kuerten
ec2c74f093 Created base make header functions 2021-09-21 17:11:07 -03:00
Gazook89
bec2a7c77a add hotkeys for new \page and \column 2021-09-11 00:12:58 -05:00
Gazook89
389ad1cf17 add hotkeys for &nbsp; and empty <spans>
makeNbsp, makeSpace, removeSpace
2021-09-10 23:18:23 -05:00
Gazook89
7dcd335630 add makeDiv hotkey - V3 Curly Divs
Shift-Cmd/Ctrl-M  makes a curly div.
2021-09-06 21:12:48 -05:00
Gazook89
08c845ff00 add underline hotkey and change italic hotkey to *
Using `*` rather than `_` characters for italics is more inline with existing snippets.
2021-09-06 20:35:55 -05:00
Trevor Buckner
77d447c0a3 Fix redundant Codemirror hotkeys 2021-08-11 12:54:18 -04:00
Trevor Buckner
86184f8595 Changed shortcut to CTRL + /, fixed icon 2021-08-08 22:13:23 -04:00
Gazook89
37d11ec303 Add spaces to satisfy circleCI 2021-08-07 22:49:51 -05:00
Gazook89
ca9a8173bd Add HTML Comment Hotkey
Resubmission of #1492  from new clone (old clone was deleted).
2021-08-07 22:43:15 -05:00
Trevor Buckner
e67fadef02 Separate "style" and "metadata" panels 2021-06-05 15:58:31 -04:00
Trevor Buckner
5824ab6eb5 Merge branch 'PRODUCTION' into master 2021-03-01 15:17:40 -05:00
Rodrigo Kuerten
9dcce15790 Updated extraKeys (bold and italic) and added new shortcut (for span tags) (#1191)
* Updated extraKeys (bold and italic) and added new shortcut (for span)

* Updated makeSpan shortcut to Ctrl/Cmd-M

* ESLint

* Space after {{ so text appears

Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2021-02-28 23:03:50 -05:00
Trevor Buckner
d57df84a59 Update Production (#1249)
* Legacy renderer (#1184)

* Include two versions of Marked.js

* Include two versions of Marked.js

* Working two different render pipelines

Adds stylesheet "styleLegacy.less"
Adds markdownHandler "markdownLegacy.js"
The BrewRenderer will switch between these and the new pipeline dependent on the "version" prop passed in.

* Mustache-style div blocks

* Legacy snippets & columnbreak

* Codemirror styling for Div Blocks

* Lint

* Codemirror highlights for inline Divs as well

These will turn red `{{class Content}}`

Multi-line divs will turn purple

```
{{class,class2
content
}}
```

No real need for these to be different colors. Just for testing.

* More lint

* Update dependencies.

* Adding Button to switch render pipelines

* Update Marked.js

* Popup alert to refresh page when renderer changed

* Don't compress files in Development (very slow)

* Block DIV or inline Span depending on {{ placement

* \column emits a Div instead of Span

* Allow share page to use new renderer

* {{ divs no longer need empty lines. Spans work in lists.

* Typo

* Typo

* Enforce \page must be at start of line. Code cleanup.

* Inject newlines after/before {{/}} to avoid needing blank lines

* Fixes issues with tables.

* Remove console.log

* Fix spacing issue for Spans

* Move things from Brewrenderer to Markdown

Try to keep all custom text fiddling in one spot.

* Rename variables

* Update Font-Awesome to v5.15. Fix style issues on popups.

* Update {{ Divs/Spans, Fix nested hilighting

* Fixed Spans/divs with no tags or just commas

* Use blacklist for {{ to allow more characters

* Update package-lock.json

* Update all icons to Font-awesome 5

* V3 hidden behind config variable

Add "globalThis.enable_v3 = true" in the console to enable.

* lint

* Legacy renderer (#1229)

* Include two versions of Marked.js

* Include two versions of Marked.js

* Working two different render pipelines

Adds stylesheet "styleLegacy.less"
Adds markdownHandler "markdownLegacy.js"
The BrewRenderer will switch between these and the new pipeline dependent on the "version" prop passed in.

* Mustache-style div blocks

* Legacy snippets & columnbreak

* Codemirror styling for Div Blocks

* Lint

* Codemirror highlights for inline Divs as well

These will turn red `{{class Content}}`

Multi-line divs will turn purple

```
{{class,class2
content
}}
```

No real need for these to be different colors. Just for testing.

* More lint

* Update dependencies.

* Adding Button to switch render pipelines

* Update Marked.js

* Popup alert to refresh page when renderer changed

* Don't compress files in Development (very slow)

* Block DIV or inline Span depending on {{ placement

* \column emits a Div instead of Span

* Allow share page to use new renderer

* {{ divs no longer need empty lines. Spans work in lists.

* Typo

* Typo

* Enforce \page must be at start of line. Code cleanup.

* Inject newlines after/before {{/}} to avoid needing blank lines

* Fixes issues with tables.

* Remove console.log

* Fix spacing issue for Spans

* Move things from Brewrenderer to Markdown

Try to keep all custom text fiddling in one spot.

* Rename variables

* Update Font-Awesome to v5.15. Fix style issues on popups.

* Update {{ Divs/Spans, Fix nested hilighting

* Fixed Spans/divs with no tags or just commas

* Use blacklist for {{ to allow more characters

* Update package-lock.json

* Update all icons to Font-awesome 5

* V3 hidden behind config variable

Add "globalThis.enable_v3 = true" in the console to enable.

* lint

* Give user styles higher priority to still allow overrides

* Apply style priority to *all* user styles

* Change .legacy .v3 to .phb, .phb3

* Revert accidental color change

* Fix brew styles overwriting each other. (#1230)

* Fix /page not working in legacy mode. (#1233)

* Fix brew styles overwriting each other.

* Word wrapping, start fixing spacing on Title letter

* Fix \page in legacy brews when not at line start

* Default 'legacy' if not set. Auto-change styles.

* Fix brew styles overwriting each other.

* Word wrapping, start fixing spacing on Title letter

* Fix \page in legacy brews when not at line start

* Fix Page Padding

* Set 'legacy' as default value if not set in brew saved file.

* Apply Legacy\v3 renderer to print page (#1235)
2021-02-19 17:47:56 -05:00
Trevor Buckner
ee4ecc0b41 Default 'legacy' if not set. Auto-change styles.
* Fix brew styles overwriting each other.

* Word wrapping, start fixing spacing on Title letter

* Fix \page in legacy brews when not at line start

* Fix Page Padding

* Set 'legacy' as default value if not set in brew saved file.
2021-02-08 15:09:09 -05:00
Trevor Buckner
e5ccfa3a50 Fix /page not working in legacy mode. (#1233)
* Fix brew styles overwriting each other.

* Word wrapping, start fixing spacing on Title letter

* Fix \page in legacy brews when not at line start
2021-02-08 13:58:24 -05:00