Are there any html and css bundle in textmate for autocompletion. Keeping track of every div becomes painful at some point. Thanks
TextMate's killer feature is and has always been its snippet expansion mechanism. Even now that it has been copied by every editor/IDE under the sun.
If you don't know about it or don't use it there's almost no point in chosing TextMate over any free text editor.
Just type div then hit Tab to expand it to
<div id="">
</div>
There are snippets like this one for the most common HTML tags, check the Bundles menu.
You can also type div or any tag name and hit Ctrl+< to turn it in a proper tag.
You can also select some text and hit Ctrl+Shift+W to wrap it with tags.
Why don't you read the documentation? Or print out this cheatsheet? Or simply look around in TextMate's menus? TextMate costs money, if you don't put some efforts into it you have wasted your €45.63.
Related
How can you paste HTML directly into a CKEDITOR without clicking source? I can test that the settings support the tags I paste because it works if I paste after clicking "source." I've tried "full html" input type and my custom text input type.
But if I paste directly the code gets cleaned/converted.
For example this:
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">Louisiana has a chance to have a really great Governor in #EddieRispone. Auto insurance costs and taxes will be coming way down with Eddie, and your 2nd Amendment will be protected. Current Democrat governor has done a really poor job! VOTE EARLY FOR EDDIE!</p>— Donald J. Trump (#realDonaldTrump) November 2, 2019</blockquote>
renders as this (unless pasted into source):
You have to use the source button to EDIT the source code.
The code you're trying to put is only usable in html. So your script is going to read this as TEXT and not as HTML like you cant. You have to put it via the source code button.
Or you can use PHP to parse your document but it's not the easiest way to do this.
I have a header tag that contains the title of the page. The Windows screen reader is not reading that text and i wanted to know if there is a way to do so by adding some aria items?
<section class="section">
<header class="section-title" ip-l10n="county_list">List of Countries</header>
</section>
Just to make sure we're talking about the same thing, there are headings and headers. Headings are <h1> through <h6> elements. Headers are typically used when describing tables and are the names at the top of the column, the column header or <th> tag.
You had mentioned that your header contained the "title of the page". The title of the page is normally contained in a heading, specifically an <h1> if it's the main title of the page. So I wasn't clear which term you were really asking about.
I know your example used the <header> element so I will limit my comments to just that element, but I did want to point out the aforementioned differences to make sure we're all talking about the same thing. Accessibility and aria tags are all about semantics so it's good to be clear about the semantics of your question.
The <header> element is a container for stuff that's usually at the top of your page. By default, it creates a banner landmark. A <header> usually contains a <nav> which is the main navigation for the site that is repeated on all pages. It might also contain the company logo as an image and serves as a link back to the home page. It might also have account info, or if a retail site, the shopping cart contents. So a <header> might have interactive and non-interactive things.
In your example code, you just have plain text in your header. That's not interactive so a screen reader user will not hear the text if they are using the tab key to navigate the site. They will hear the text if they navigate the DOM using the up/down arrow keys with the screen reader.
If instead, you really meant for your code to be a heading, and thus the <h1> tag, that is also static text that is not interactive so again, the screen reader user will not hear the text if they are using the tab key to navigate the site. However, they can hear the text if they use the screen reader H quicknav key (to navigate to a heading).
So if you want to clarify your question, I can update my answer.
When editing in ckeditor I very frequently end up with extra clusters of <p> </p> tags. Not only does it add extra unneeded linebreaks, they often show up on the resulting page with a broken-looking character in them.
Is there a configuration setting or something to tell the editor not to add these extra non-breaking spaces in paragraph tags?
Thanks,
doug
The paragraphs with represent empty lines in editor. They make the content look exactly the same inside editor and outside it (when displayed on a target page). If they cause you some problem, then it's not the editor, but your backend. So I rather recommend checking it.
Surprisingly though, there's an option to disable filling empty blocks config.fillEmptyBlocks.
But it's really not the answer.
I'm loving Sublime text but there are a few things I'd like to configure on the auto-complete:
HTML: Auto-completion of attributes within tags
When adding a class attribute to a div I have to do control+space to get the auto-complete list, is there a way of bringing that up automatically when adding attributes to tags?
HTML: Adding equals and quotes
When auto-completing the class attribute I then have to type the equals and quotes, can they be added automatically?
CSS: Auto-completion of property values
When I autocomplete a property, e.g. position I then have to add a space and press control+space or start typing to get the values autocomplete list. Is there a way of showing this list straight after the property autocomplete?
I've tried searching for an existing solution but can't find one, so I'm hoping there are some config files that I can amend! Any help pointing me in the right direction would be greatly appreciated! Thanks!
Darren
Try control + shift + p -> set syntax HTML in order to get auto-completion on html tags
also install: http://wbond.net/sublime_packages/package_control (streamlines package installation process)
and emmet: https://github.com/sergeche/emmet-sublime (makes writing html/css x times faster)
for more information on configuring sublime text you could check:
http://net.tutsplus.com/tutorials/tools-and-tips/sublime-text-2-tips-and-tricks/
and
http://net.tutsplus.com/articles/news/perfect-workflow-in-sublime-text-free-course/
Definitively for autocompletion install first Package Control and them Emmet from the Palette Command, just search "emmet" and Enter.
If you don't have Package Control installed, do that first. Next find the Tag package through Package Control via ST2 and install it. I believe that's the one you're looking for, otherwise Emmet (Zen Coding) could be the one I'm thinking of. Either way, make sure your document syntax is set to HTML.
I'm trying to use CKEditor for a project and I found the need for bookmarks. The documentation says that the intrusive way to create bookmarks add span elements in the source. This is just fine with me and that is exactly what I would want it to do.
However, I can see in the source that the span elements are wrapped in p elements.
<p><span id="cke_bm_147S" style="display: none;"> </span> </p>
This creates problems for me with the way the text is displayed and mainly when trying to navigate the document.
I didn't find anything that even mentions the creation of these p elements. Could I have set something wrong? Is there a way to prevent these to be created?
Thank you
The span bookmark is an inline element so it cannot be the root element of the content. It is wrapped in a block element (which is by default a paragraph).
This behaviour depends on editor enterMode. If it is a default one - ENTER_P - you will have a p element as a wrapper. For ENTER_DIV you will have a div element. And for ENTER_BR there will be no wrapper which means it is the effect you would like to achieve.
Check this codepen for demo.
Please keep in mind that enterMode other that ENTER_P is not recommended due to some caveats. So maybe in your case it will be better to reconsider some different solutions instead of changing enterMode.