Is there an Atom plugin to add comment headers that are visible in a minimap? - atom-editor

I'm looking for a plugin that lets adding comment headers that are visible in minimaps, as illustrated in this image:
You can see the "TABS", "TREEVIEW", "CURSOR", etc. headers

You can try the following package: https://atom.io/packages/figlet
It will allow you to convert the selected text into ASCII art using FIGlet, allowing you to specify which font to use.
Then you just need to add the required comment characters at the beginning of each line.

Related

reStructuredText link to section with custom text

I'm aware of the documentation regarding implicit hyperlinks in the reStructuredText manual, but I'm wondering if it is possible to reference a section without having to repeat the full section title. E.g. if I take the example from the documentation,
Titles are targets, too
=======================
Implict references, like `Titles are targets, too`_.
then I'd like to have a way to refer to the section by using a different link name (e.g `the target section`_). How can I do that?
You can refer to a section titled Titles are targets, too with:
`link text <Titles are targets, too_>`_
This creates a link whose text is link text but points to the section titled Titles are targets, too.

Mediawiki Extension:RSS

The MediaWiki Extension:RSS (http://www.mediawiki.org/wiki/Extension:RSS) uses the plainlinks class to present the RSS feed link. I have tried all manner of searching, including trying to edit the MediaWiki:Rss-feed template to force the link to presented in non-bolded format.
Has anyone used this extension and can tell me how to change the fonts in the RSS link?
Thanks
As far as I can understand your question, you should be able to remove the boldface formatting from the RSS item titles by editing the page MediaWiki:Rss-item (not MediaWiki:Rss-feed) on your wiki.
What you need to do is two things:
remove the string ''' (MediaWiki markup for bold text) from either side of the title, and
remove the ; (MediaWiki markup for a list definition, which is also bolded by the default style sheet) from the beginning of the line.
That is, change the default content of the page:
; '''<span class='plainlinks'>[{{{link}}} {{{title}}}]</span>'''
: {{{description}}}
: {{{author}}} {{{date}}}<!-- don't use newline here -->
to this:
<span class='plainlinks'>[{{{link}}} {{{title}}}]</span>
: {{{description}}}
: {{{author}}} {{{date}}}<!-- don't use newline here -->

How not to inherit format when pasting into CKEditor?

Problem: When a user copies a load of code from another website and pastes it into CKEditor it includes a load of inline styles which refer to the style of the content on the website it was copied from. When the pasted content is then saved and shown on my website it doesn't use my styles but the copied inline ones which conflict.
I've had a look through the CKEditor documentation, and to be honest I don't find the documentation to narrow down to what I'm looking for. There is a paste function available which removes formatting but this is an optional button in the menu, whereas most users will just post into the main large area, so its pretty worthless.
Main Question: is there a way to set CKEditor to strip formatting when pasting?
Ah, I found the answer:
// Apply editor instance settings.
CKEDITOR.config.forcePasteAsPlainText = true;

Loss of line breaks after interference with usual mode of creating or viewing content in drupal

have created a module and two custom content types(protocol and protocol2). The module interferes with the usual mode of creating and editing the content type protocol and it changes the usual mode of viewing the content type protocol2.
In both these cases I get the problem that I lose the line breaks that where present in the textarea where the content was added, or in the case of viewing the line breaks that where stored.
That is a text entered in a textarea like this:
"Text
with
line
breaks."
ends up looking like this:
"Text with line breaks."
I have echoed the content of form_state and in both those cases I see no line breaks, and I use form_state when fetching and changing the text.
I'm not sure what the problem might be or exactly when and how that information is lost. Does anyone have any hints?
This probably means that your default text format is one that strips line breaks. Go to admin/config/content/formats to see your text formats and which one is the default.
If you want to specifically set a certain text format for your textarea in your custom module, you something like the below:
$form['yourfield'] = array(
'#type'=>'text_format',
'#format'=>'full_html',
...
...
);
Does that fix it?

How to disable header on frontpage of rst2pdf document?

I am generating some PDF's and I would like to disable the header on the frontpage. I know there are built-in templates in rst2pdf and one template is called coverPage but I don't seem to be able to get it to work.
The manual is saying you should use a
..raw:: pdf
PageBreak coverPage
statement but that will insert a empty before the coverpage, so how can I have a coverpage without a header and without using the oddeven directive (I want to use the same header on all remaining pages).
Thanks for your suggestions!
That's how you change the stylesheet after the cover page. You'll need to create a custom stylesheet that specifies what is the format of the first page and then change the style for the rest of document. Have a look at chapter 15 of the manual.
Note: current accepted answer contains broken link (linked website has gone).
The correct answer is simple:
1) In you style-file define:
pageSetup:
firstTemplate: coverPage
2) Then in your template, when you want to start using header/footer add:
..raw:: pdf
PageBreak cutePage
Make sure cutePage has set header/footer to true.

Resources