Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WYSIWYG editor option #383

Merged
merged 29 commits into from Mar 6, 2021
Merged

Add WYSIWYG editor option #383

merged 29 commits into from Mar 6, 2021

Conversation

thebaer
Copy link
Member

@thebaer thebaer commented Sep 9, 2020

This draft pull request adds a new editor option: a what you see is what you get editor, powered by ProseMirror.

To test this out, set editor = wysiwyg in your configuration file.

TODO

  • Verify that auto-save works well consistently
  • Verify that single line breaks work
  • Fix backslash inserted before first hashtag on a line starting with hashtag
  • Support Read More (<!--more-->) and other shortcodes (ideally through a menu item)
  • Auto-updating word count
  • Reflect selected font in editor
  • Enable Ctrl+Enter publishing shortcut
  • Show correct Publish button state when editing a post
  • Add Ctrl+K shortcut for linking selected text
  • Disable magic / smart quotes and dashes
  • Parse HTML
  • Clean up code

Thanks to @robjloranger for getting this work started! When complete, this will close T727.


  • ✅ I have signed the CLA

Rob Loranger and others added 15 commits March 10, 2020 15:11
This keeps it consistent with all our other CSS.
- Match light / dark theme
- Make editor fill the viewport
- Remove borders
- Add spacing in toolbar
This takes styling from the Classic Editor on Write.as.

It adds all application code for auto-saving the title, publishing it
with the post body, and including it in the word count.
This upgrades @babel/preset-env to 7.9.0 from 7.8.7.

See: nodejs/node#32852 (comment)
@thebaer thebaer added this to the 0.13 milestone Sep 9, 2020
@thebaer
Copy link
Member Author

thebaer commented Feb 22, 2021

@VV-EE I'm running the following commands after these updates:

npm install
npm run-script build

And getting this output in the browser's console now:

prose.bundle.js:2 Uncaught TypeError: r.replaceAll is not a function
    at new t (prose.bundle.js:2)
    at Module.<anonymous> (prose.bundle.js:2)
    at r (prose.bundle.js:1)
    at prose.bundle.js:1
    at prose.bundle.js:1

Is there anything I'm missing?

@thebaer
Copy link
Member Author

thebaer commented Feb 22, 2021

When I comment out this line that seems to be causing the issue, I get another error:

prose.bundle.js:2 Uncaught Error: Input data should be a String
    at b.parse (prose.bundle.js:2)
    at ys.parse (prose.bundle.js:2)
    at new t (prose.bundle.js:2)
    at Module.<anonymous> (prose.bundle.js:2)
    at r (prose.bundle.js:1)
    at prose.bundle.js:1
    at prose.bundle.js:1

@thebaer thebaer marked this pull request as ready for review March 3, 2021 22:13
@thebaer
Copy link
Member Author

thebaer commented Mar 6, 2021

Merging now!

@thebaer thebaer merged commit fbb67bc into develop Mar 6, 2021
@thebaer thebaer deleted the wysiwyg branch March 6, 2021 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants