TinyMCE. Replacing/adding htmls tags with style from css? - tinymce-4

Is there a way to add new HTML tags and to make TinyMCE take its formatting from a CSS file?
I've been looking for ways of adding new formats but the internal TinyMCE formatting engine is not as flexible as CSS.
I'll clarify:
TinyMCE works by using standard html formatting tags:
<p>, <h1>, etc.
I'd like to either, create a new format that creates a new tag such as <custom_1>. That way I'd be able to format it with the css linked to the output document.
Thanks!

Related

Using CSS in Markdown file removes other styling

I want to add custom CSS in my Markdown (.md) file. I have looked here : http://www.mkdocs.org/ and found the extra_css, but I wish to have the CSS in the same file.
I have tried adding style tags at the top of the page like so :
<style> body { background:red } </style>
But it seems to remove all the other styling on the page.
Question is, how do I add my own CSS to my markdown file ?
Ideally the purpose of markdown file is plain text formatting syntax. Adding custom styles is actually counter productive of the format hence there is a good reason why styles were left alone for .md files. Having said that, there are workarounds for everything. Read on if your still interested.
I wouldn't personally recommend it but if you need to add custom styles then you could try the following:
Increase the specificity of your styles for easier overriding.
You could use Marked, a previewer for md files which gives you the ability to add custom styles.
Use inline styles, inline styles have more priority than internal styles(the one you mentioned)
eg: <body style="background: red;">...</body>
Using R Markdown, you can add your own CSS to an HTML document using the css option:
Reference: http://rmarkdown.rstudio.com/html_document_format.html#custom_css
---
title: "Habits"
output:
html_document:
css: styles.css
---
Hope this helped

Where can I edit the inline code style for a Jekyll blog?

I'm trying to set up the styling of my Jekyll blog. I've noticed that the inline code highlighting that uses the two backticks `.
Here you can see the inline highlighting style is very different to the code block styling. The code block styling is done in the _highlighter.scss file. Any ideas where I can edit the style of the inline code?
The style location may vary depending on several factors:
the theme you are using and if that theme is customized
the syntax highlighter engine
In a standard Jekyll instance, inline code blocks will start like <code class="highlighter-rouge>, that is, the style would be a mix of the code tag and the above class.
The easiest way to find out where to change your jekyll instance styling is to use the browser inspect code mode, that will show you which file and style to change.

Riot.JS: Tag within Tag in HTML Page

I am new to RiotJS (just discovered it yesterday). I just tried to do a little experiment which did NOT work. I created two tag files (navbar.tag and dropdown.tag). Each one was as simple as could be – simply a h3 tag with the name of the file:
// navbar.tag
<h3>Navbar</h3>
// dropdowntag
<h3>Dropdown</h3>
On my index.html page I want to nest the dropdown tag within the navbar tag like this:
<navbar>
<dropdown></dropdown>
</navbar>
That does not to work. Navbar shows up, but not dropdown. Only if I separate the two tags do both work -- i.e., like this:
<navbar></navbar>
<dropdown></dropdown>
Any idea how I can nest different tags within an html page. I know you can nest them within .tag files, but that is not what I want to do. What I want is the flexibility to nest custom tags that I create on ay html page (like I can do with regular html tags).
Any ideas?
Thanks.
You cannot modify the existing structure. RiotJS use this constraint as an advantage to ensure good performance.
To insert another tag into existing tag, use <yield/>.
See JSFiddle.

How do I change the text font color on the Vulcan template in Wordpress?

I have my own website and I am currently using the Vulcan template on Wordpress and I want to change a texts font color. Is there a way to do this?
Yes of course, if there is a will there is a way.
Are you changing an element inside a post?
Open up your page/post editor and switch the editor to "Text" mode (look to the far right on the editor) and keep reading.
Are you changing a "hard-coded" element in a file?
Open up the file in question with your favorite text-editor and keep reading.
Changing multiple elements?
Look into using CSS classes (https://developer.mozilla.org/en-US/docs/Web/CSS/Class_selectors). Add your classes to your HTML elements using the class attribute.
Changing just one element?
Look into using the style (http://reference.sitepoint.com/html/core-attributes/style) attribute on your element.

Drupal CKEditor HTML tags

When I apply bold CKEditor wraps the text in tags. When I select italic it puts tags. My default input format is Full HTML (also when creating content). In the Wysiwyg profiles I set CKEditor for Full HTML input. In the configuration of CKEditor, under Cleanup and output I selected Convert tags to styles.
This should use inline CSS, but it doesn't. It puts HTML that don't change the text. It stays like it's not formatted. What's wrong?
Filtered HTML should force it to display the content correctly using the html tags.

Resources