tinymce pre plugin button looks disabled - ruby-on-rails

I am using tinymce in my rails 3.2 application.
I have added pre as a plugin in tinymce.yml in config. But the the button that appears on UI to add the code segment looks disabled. Why? There are no javascript or css errors on my page at all.

Related

.Warnings : Nested CSS was detected, but CSS nesting has not been configured correctly. Please enable a CSS nesting plugin *before* Tailwind in config

I have integrated tailwindscc in elctron react using boilerplate so Upon starting the server, or even each refresh the console spits out:
However, I don't see what must be done to correct this. I've tried to change setting and still no success.
postcss.config.js:
package.json:

Rails 5 Turbolinks appears to reload page

I am still new to Turbolinks and unsure whether it is working correctly. I have a new rails app that I've created with Turbolinks enabled by default. I am using the link_to rails helper to build some links. When I click on one of the links the page reloads in the browser. I was under the impression that this should not occur as only the body should be swapped using AJAX. Is there any additional attributes I need to add to my link or additional configuration I need to set up?
Make sure that you have the Turbolinks js loaded in the page. If you are using webpacker and removed the default application js that used the asset pipeline you will probably need to use Turbolinks from npm, import it and then call Turbolinks.start() in your entry file.

Bootstrap Starter Template Not Displaying the Same as the Source

I'm trying to learn how to use Bootstrap with a rails application and don't understand a difference between the Bootstrap Starter Template and what I see when I load my rails app.
I copy-paste the source code of the Starter Template directly into my root view of my application. But when I run rails s, and go to localhost, the div with h1 "Bootstrap Starter Template" is displayed to the left and underneath navbar.
I've googled reasons for this, and I've seen that there's a solution to add padding to the body class.
What I don't understand:
why do I need to add the padding solution to my copy-pasted view when the same source code displays perfectly fine on the bootstrap examples page
I'm not sure if this matters, but I'm using gem bootstrap-sass version 3.3.5

bootstrap-generators not using the templates when building a new scaffold

I have a brand new rails app and want to use the bootstrap-generators gem.
I have followed the instructions on their website, but if I now generate a scaffold I don't get the bootstrap styled inputs/buttons/etc.
screenshot
Notice that the button is the standard rails button, not the nice bootstrap button. As you can see, the main layout does have bootstrap theme working
I can see that the bootstrap template files are in the /lib/templates/erb/scaffold folder. If I now create a new scaffold it seems that these templates are ignored.
What am I missing, and why woudn't the bootstrap scaffold templates be used?
Spring was running in the background and therefore the new template files were not being loaded. Simply typing 'spring stop' fixed all my problems :)

Rails needs page refresh to render correctly bootstrap markdown

I am developing an app using Ruby on Rails. In a specific view I have a textarea that uses Bootstrap Markdown.
The problem is that each time I visit that view, the textarea is rendered completely plain, without the Markdown functionality. Hitting F5 (refresh) renders the form correctly.
I tried to clear my browsers cache etc, but no luck. I always have to hit refresh to see the page correctly.
What may cause that?
Edit:
I am using this Markdown Plugin
I have also included the js files as stated in this question.
The turbolinks gem has been known to interfere with other javascript files and it's recommended that you remove it completely unless you really need it.
As Mohammad AbuShady said in his comment, you'll need to edit the part of the javascript files for your markdown that tells the page to start rendering. In your case this involves adding
$("#some-textarea").markdown({autofocus:false,savable:false})
inside page:load on the relevant pages.
In case you need turbolinks still, I found this very helpful: JQuery gets loaded only on page refresh in Rails 4 application
I had the same issue and adding jquery-turbolinks gem allowed the bootstrap-markdown editor to load perfectly for me.

Resources