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

40 Commits

Author SHA1 Message Date
Trevor Buckner
76553d1e65 Merge branch 'master' into pr/1568 2021-12-01 16:56:10 -05:00
Charlie Humphreys
1ec1ddc80c Remove code fold toggling shortcut
#629
2021-11-14 09:58:41 -06:00
Charlie Humphreys
2d30ac21a7 Update code based on PR feedback
#692
2021-11-11 17:08:05 -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
b3e37dd2c1 add comment about trying capture groups in future. 2021-09-23 01:01:02 -05:00
Gazook89
beb3c7ec89 make undo behavior work regardless of url text 2021-09-23 00:22:40 -05:00
Gazook89
ae75eb07b7 matched functionality of link hotkey in github 2021-09-05 20:33:51 -05:00
Gazook89
8c03b453b2 circleCI fix 2021-08-13 08:31:41 -05:00
Gazook89
727a58f56d Fixed cursor finish position
- tested on single words and multi word strings
- tested removal of hyperlink
- tested with highlighting selection from left to right, and right to left.
- tested on empty strings
2021-08-13 08:28:02 -05:00
Gazook89
b89c10a298 Change cursor finish position
Change cursor finish position
2021-08-12 23:09:06 -05:00
Gazook89
5258e9f0e6 Add Hotkey Ctrl/Cmd + K to create Link 2021-08-12 22:41:34 -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
Trevor Buckner
e23120a4c6 Reduce duplicate code 2020-10-28 22:25:25 -04:00
Rodrigo Kuerten
19c04e125a Linting? 2020-10-26 23:09:36 -03:00
Rodrigo Kuerten
8a13387874 Updated makeBold and makeItalic functions to center cursor when selection is empty 2020-10-26 22:49:09 -03:00
Trevor Buckner
22a9799674 Update vitreum (#946)
- Updates Vitreum to v6.0.1 + some custom fixes.
  - Stylesheets must be imported with `require('./sheet.less');` but can also can now share stylesheets between jsx components.
  - Should eliminate a lot of security concerns with older nested dependencies.
  - Changed a lot of files to make this work
- Also removes dependency on PicoRouter in favor of React-Router
2020-05-19 01:36:31 -04:00
Kurtis Miller
34741291c7 Fix ESLint errors 2018-11-26 20:12:59 -05:00
Kurtis Miller
aafac16af2 Add bold/italic shortcuts, reposition renderer warning 2018-11-26 20:12:59 -05:00
Scott Tolksdorf
f18a181e2e Updating to user create-react-class 2018-04-09 00:12:56 -04:00
Scott Tolksdorf
ed1b5252be lint 2018-04-09 00:12:56 -04:00
Scott Tolksdorf
626cba6062 Newlines 2016-05-28 09:41:05 -04:00
Scott Tolksdorf
6a02e3d0cf Annnd back 2016-05-06 14:30:00 -04:00