hughevans / pagedown-bootstrap-rails Goto Github PK
View Code? Open in Web Editor NEWA Ruby gem version of pagedown-bootstrap for the Rails asset pipeline.
License: MIT License
A Ruby gem version of pagedown-bootstrap for the Rails asset pipeline.
License: MIT License
Thanks for the great gem, was incredibly easy to get up and running with your documentation.
I have it setup and it looks like PageDown Extras is included and should be working, but I can't seem to get the added features to work. Specifically the new line without 2 spaces just doesn't seem to work. I've tried adding the the extension: all and the specific extensions to test in the init file, but still nothing.
Am I missing something stupid here, or are those features not compatible with this gem?
DEPRECATION WARNING: input method now accepts a `wrapper_options` argument. The method definition without the argument is deprecated and will be removed in the next Simple Form version. Change your code from:
def input
to
def input(wrapper_options)
See https://github.com/plataformatec/simple_form/pull/997 for more information.
A pull request in a while.
DEPRECATION WARNING: Extra .css in SCSS file is unnecessary. Rename /opt/rubies/2.2.0-rc1/lib/ruby/gems/2.2.0/gems/pagedown-bootstrap-rails-2.1.0/vendor/assets/stylesheets/pagedown_bootstrap.css.scss to /opt/rubies/2.2.0-rc1/lib/ruby/gems/2.2.0/gems/pagedown-bootstrap-rails-2.1.0/vendor/assets/stylesheets/pagedown_bootstrap.scss. (called from _app_views_layouts_application_html_erb___1964874363730556850_70168223823960 at /app/views/layouts/application.html.erb:6)
Deprcation warnings slow down Sass compiler =\
Nice to meet you.
My name is KeigaSagae.
I am Japanese.
Pagedown-bootstrap-rails is a very convenient function.
By the way,I want to change the position of the preview.
【Current status】
There is a preview under the editor.
【Ideal】
There is a preview on the right of the editor.
Please tell me how to do it.
Rails 4's turbolinks short-circuit the jquery ready call in pagedown_init. Clicking "edit" on my blog posts now brings up a textarea without pagedown enabled; when I refresh the page, however, the pagedown controls appear.
This stackoverflow answer suggests using this format instead:
ready = -> ...
(...code here...)
$(document).ready(ready)
$(document).on('page:load', ready)
If that looks good I'll submit a pull request.
Your gem works great, it was very easy to install and I appreciate the CoffeeScript init and SimpleForm helper!
What's not so straight forward is that it's not saving the data as HTML, but instead is saving it as the original entered text.
I could either convert it on page render or convert it on data save.
Am I missing something? Should this be done automatically already?
Thanks!
Using pagedown-bootstrap is quite easy. However, if I want to customize the toolbar, it becomes problematic, since the entire HTML are written in js (https://github.com/hughevans/pagedown-bootstrap-rails/blob/master/vendor/assets/javascripts/markdown.editor.js.erb#L1381)
I'm wondering if there is any way that I can extract the toolbar out, and make into HTML again? So it would be easier for otheres to see the HTML, or customize it.
Note: I'm not sure whether .jsx
would be a good choice, I just put it here to make an example.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.