CKEditor Stylesheetparser remove parsed document stylesheets - ckeditor

The CMS i'm using has CKEditor 4.5.10 and the stylesheetparser plugin enabled. Recently the CMS switched to a bootstrap layout in the backend. Now the styles dropdown is filled with bootstrap classes that I don't need.
The text is only used in the frontend part of the website. I only want to parse my frontend screen.css file in the Styles dropdown. I push the stylesheet to the config.contentsCss array, so stylesheetparser can parse the classnames. However, all the loaded css of the current Backend page is also loaded (Bootstrap, ...).
This block of code parses all the loaded css in the current document: https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/stylesheetparser/plugin.js#L44-L86
As a CMS user I only want the limited list of CSS selectors in the Styles dropdown. It should ignore parsing the stylesheets of the current document, and only parse my .css file I used in contentsCss. Is something like that possible? How can I disallow the document stylesheets in the stylesheetparser plugin?

Figured out the issue. We used this plugin: http://ckeditor.com/addon/divarea
This plugin will remove the iframe and insert ckeditor as a DIV into your webpage. The stylesheetparser plugin will then check all your document stylesheets and parse them into the Styles dropdown. Because I use a lot of bootstrap in my backend page, the styles dropdown is filled with bootstrap classes. Removing the divarea plugin causes ckeditor to be an iframe (default behaviour) and thus, only the stylesheets that I pushed to the contentsCss array are loaded into the iframe document and the styles dropdown.

Related

Is there any way to change meta tag from the source code with vue js?

As you all know Vue js works in template. So it load the content the the page dynamically. so there is no way to change the meta tags manually. So there is a package called vue meta which is used to change the meta tags of the vue page dynamically. But the problem is when I change the meta tag dynamically It only changes in the inspect. But when I open the page source it isn't changing there.
you can see the meta tags in the inspector here
but there is no change in the page source
I even tried server side rendering for this. Is there any solutions??
Thanks in Advance

How to add Header and Footer to each rendered page on pdf document using htmltopdf nativescript plugin

I'm using the html2pdf Native script plugin, and would like to define a header and a footer to apply to each page. What is the most expedient method I can use to specify headers/footers with html2pdf in each page rendered on pdf documnet?

Get particular layout javascript and css

Currently I am trying to get the "checkout_onepage_index" layout css and javascript in another page. How Can i get the javascript and css in a controller or observer. I want to get all the css and javascript that was loaded in checkout_onepage_index layout.
I don't know much using observer but you can defiantly do this using xml just copu your checkout.xml js code and paste it into another file of xml like "catalog.xml".

How to add Custom User Interface to Sales Force

I'm trying to add a custom User Interface to SalesForce pages, how should I start?
Here is how you can customize your page UI with two simple steps:
1. Add attributes in your page element to remove default header, sidebar and stylesheets attached to the page.
2. Add CSS and jQuery if required from Static resources. This is optional step but very useful when work with large CSS and jQuery codes.
Adding attributes:
<apex:page id="thePage" controller="yourController" action="{!yourAction}" docType="html-5.0" standardStylesheets="false" sidebar="false" showHeader="false">
Adding static resources:
<apex:includeScript value="{!$Resource.yourJS}" />
<apex:stylesheet value="{!$Resource.yourCSS}" />
You can develop fully custom user interface on Visualforce pages and controllers. First, you can removes standard components (tabs, header and footer) from page using such options in tag:
<apex:page sidebar="false" showHeader="false" standardStylesheets="false">
So, you will have clear page on which you can add your markup. Also you can develop templates pages, which will include common application interface parts. Read more about Visualforce templates here.
Also you can use Salesforce custom components.
You can also use the popular CSS and JS frameworks. So it will be more development of front-end part and on server side you will just create actions methods in page controllers for UI.

AJAX: Django's templates flexibility gone? Update CSS & JS?

Leaving all the header/footer/nav parts of pages untouched,
refreshing only page's content with AJAX,
can't use base template extension's block mechanism to set content-corresponding styles, scripts, page title?
Wonder how to get .css and .js for updated content with AJAX?
In general, you will want to make all of your CSS and JS available in the header templates so that they are available when your dynamic content is loaded. The overhead is slight, and you will be following the "Django way."
Another option is to include inline CSS/JS in your dynamic content, but this approach is not recommended. It leads to messy code and can be difficult to troubleshoot.
Can't use full sentences?
Anyway, I have no idea why you think you need to get CSS and JS for partial pages. A set of HTML elements dynamically inserted via Ajax will simply use the existing CSS associated with the page.

Resources