Can't get text out of quote area in summernote editor - summernote

I'm having trouble getting out of quote mode when in the editor.
I'm trying to put the "Can't get out of quote mode below it" out of the quote section and choosing normal in the format dropdown doesn't work.

Looks like this is a known bug:
https://github.com/summernote/summernote/issues/42

Related

How to fix 'Link Highlighting in Inline Code'?

The method of writing a code element in Asciidoc is by writing an element enclosed in the grave accent(`):
`var`
And, the method to show a link is:
link:www.awebistelink.com[var]
I am attaching an image to show these two on a website that renders Asciidoc
Image Displaying the output in an asciidoc document
When I am trying to show a link highlight of a code element inside an inline code by writing:
`link:www.awebistelink.com[var]`
It renders perfectly fine on Asciidoc Please see it here
But on the website, it doesn't show any link, and simply shows a code element like as if we declared it simply as
`var`
The correct way to make a link label appear in monospace is to apply the backticks to the label itself, not the link.
Using your example, the markup should be:
link:www.awebsitelink.com[`var`]
I found the answer,
it should be
`link:www.awebistelink.com[var]`
I still don't know how it worked but now it works just fine as intended.

VS2015 html editor adding blank space after and before tag name when i use wrap and duplicate line

When i use Wrap with or Duplication line, Html editor format's like this.
How to fix it?

Ruby/Regex: Dealing with strings containing forward slashes and parentheses using gsub and regex

Hi I am using Watir to click through some links. I go to a page, click a link based on its text, and the do it again click a new link. I am locating the links based on their text (it is the only way I can based on their HTML) and need to match the text I pulled from the page to the link. The text that I get contains some extra text not part of the link, so I need to gsub it out. Here is my issue:
String: text = "Nuclear Launch Codes (Levels One/Two)"
Link: Nuclear Launch Codes (Levels One/Two) Blah Blah Blah
Because the links do not always have the exact text I need to locate them like so: /#{text}/
Problem is that returns "Nuclear Launch Codes (Levels One\/Two)"
I though I would gsub the 1st parenthesis and everything after, but I need to keep it because I can have Nuclear Launch Codes (Levels Four/Five)
Is there anyway to modify the string to match the link while ignoring the rest of the link text?
If I understand you correctly, try:
/#{Regexp.escape(text)}/
Or equivalently, if you prefer:
Regexp.new(Regexp.escape(text))
This will automatically escape parentheses, slashes and so on in the text so they are not treated as special regexp characters.

Selected text in ruby Tk Text widget?

I can't seem to find how to get the currently selected text from a Text widget in ruby. In perl there was a ->getSelected function, which does not seem to exist in the ruby implementation. Also, the selected text is supposed to be marked with a tag "sel", but whenever I try to use it with get("sel"), it says invalid text index. There must be a way to get the selected text though...
Also, another question, by default, the text widget in perl has a pop menu with all sorts of functionality like search, copy/paste. Was this just a perl specific add on?
Yes, the popup menu in perl is a perl-specific add-on.
As for getting the selected text, you are correct that the selected text has the "sel" tag, and you use that to get the selected text. To retrieve the selected text you should use the index sel.first and sel.last, for example:
get("sel.first", "sel.last")
A really good resource on Tk that covers usage in Tcl, Python, Ruby and Perl see tkdocs.com. The text widget is documented on that site in the tutorial on text.
Of course I finally figured this out right after posting. The index is "sel.first" and "sel.last". so I used get("sel.first", "sel.last")

Which file should I edit to change the breadcrumbs starting point?

I wanted to change the breadcrumbs starting point from Home to My title. I edited the file /magento/app/code/core/Mage/Catalog/Block/Breadcrumbs.php but it doesn't seem to be working. Is XML playing a role in that?
thanks
Your best option is to use Magento's translate feature. Notice how the text in Breadcrumbs.php is wrapped with ->__('text') which instructs Magento to see if there is a translation for text for the current module. If you turn on Translate Inline in System>Config>Admin>Developer, you will be able to edit the text on the page (after refreshing, click the red box then the little book icon). This will then be entered into the database in the core_translate table and replaced in future page renders.
As a general rule, you should never edit files in app/code/code as you will break future upgrades and patches.
turn on Translate Inline in System>Config>Admin>Developer, you will be able to edit the text on the page (after refreshing, click the red box then the little book icon)

Resources