For example, usually WebStorm will not add extra whitespace to the element, if I want to make it look nice, I have to add extra whitespace for every element I created.
I tried to google it but all I find is "deleting extra whitespace" kind of question and answers. Maybe it is because I don't know how to describe the question. And Google won't accept the image which can let me explain the question more clearly. I can't do anything. Need help with this.
Screenshot 1:
Screenshot 2:
You can go to Settings > Code Style > HTML (ctrl + alt + S) and check Wrap text and After tag name. However this wil add a space to all HTML, not just the self closing ones. <head> will become <head >. In empty tag will do that for you.
Related
I am using Template10 with the Hamburger starting project template. I'd like to have a margin between the hamburger area on the left and all content. I tried changing the shared Shell.xaml page (by adding a margin, etc.) but couldn't figure out the best way to sort it out. Conceptually, that makes sense, but it's the specific detail of how to make it work that I'm missing.
Is there an easy way to do it without changing each content page?
Regarding the questions in the comments: I want it in the closed case of a wide view; the question doesn't make any sense in any other case. As far as what I tried, it doesn't really ultimately matter, since none of what I tried worked - I'm asking what the right way is to do it, which I never figured out.
Here's what the default looks like, without a margin:
Here's what it looks like with a margin added to the content area, which is also how the sample template contents handle this:
I don't want to have to mark up every content page with left margins to get the offset in the second picture.
1: https://i.stack.imgur.com/jUIuO.png
Okay, now I have enough information. You have a few options here. The first is just bite the bullet like the rest of the developer community and format your pages like normal. But if you simply must, you can create an implicit Page style with a setter setting Margin="16,16,16,16" but, listen, and I am not kidding, you will ultimately regret it unless your app is super-simple. The biggest problem will be the spacing will be OUTSIDE the containing ScrollViewer.
Thanks for using Template 10.
I'm trying to create a very simple and light wysiwyg editor using designMode/execCommand, eg:
$(document).ready(function() {
wysiFrame.document.designMode = 'On';
});
<iframe name="wysiFrame" id="wysiFrame"></iframe>
When I enter text in the iframe it is not wrapped in any tags. When I hit return the new line is wrapped in a div, eg:
here's my bit of text
<div>and this is the text after hitting return</div>
If I add:
$('#wysiFrame').contents().find("body").append('<p>Select me and type</p>');
and then select the text and over type the tags are added (in Chrome at least) as expected, new paragraphs and line breaks.
I tried:
$('#wysiFrame').contents().find("body").append('<p></p>');
But that gave me:
My typed text
<p></p>
Is there a way to wrap entered text within paragraph tags? I have trawled online but have only been able to find reference to preventing line breaks in favour of paragraph tags.
All help, suggestions and ideas welcome.
Thanks in advance.
Managed to get something together that although not elegant may be useful to others looking for a no-fuss, simple (dirty!) solution. In my 'designMode = 'on' function I added:
$('#wysiFrame').contents().find("body").append('<p> </P>');
When you click in the iFrame the insertion point lands between the space and the closing paragraph tag, just a little clean up needed server-side. Tested in Chrome, Safari and Firefox, seems to work reliably in all.
Any other suggestions out there?
When I hover over a custom html tag that I'm using from a platform (Polymer) or even a custom one I made it says that you can mark such a tag as custom somewhere. Is there a place to do this in Intellij? I'm using the latest version (14).
Here is a screenshot of what I'm talking about:
Any help would be appreciated! It would be nice to get rid of all these error highlights when I'm working with Polymer. Thanks!
Place the caret over the highlighted tag, hit ALT+ENTER and select Add tag to custom tags.
However that works only for current project. If you want to set the ignored tags globally, try this:
Go to Settings/Inspections, find the Unknown HTML tag inspection, select the Default profile instead of Project Default and specify the tags separated by comma in the textfield in the bottom right corner. Here is a screenshot:
Safari/Chrome Developer Tools indicate that a CSS rule is overridden by something else by striking it through, as shown in the image.
Sometimes I find myself in a situation where I can not figure out from the CSS files what causes this rule to be ignored. But surely Safari itself must know as it strikes it through.
Is there a way to know what overrides such a rule?
Look at the one which isn't striked out, higher up on the list.
Alternatively, view the computed styles. They will be the definitive applied styles.
When you inspect an element, you can show the 'box'. Just bottom of that, you have a 'filter' which should show you every properties being applied to your element.
If you click on a property, it will give you the file and the line number.
Developer Tools will list all rules for an element. Just read through all the CSS rules that apply, and check for a non-struck-through one with the same name.
Go to Elements >> Computed and you'll get the stylesheet that defines the rule you're looking for.
Go to the Computed tab of Chrome Developer tools. Find wanted property and expand details.
Is there some SSML tags etc, to remove a particular line of text from speaking. Yes, I know I can remove this using string functions, before sending it to the speech synthesizer. But my question is, is there any way to mark or tag some text, so that it won't play. I am looking for some XML based solution for this issue.
There are so many ways, you should clarify what you want to accomplish.
Maybe one of these will help you:
1. standard XML comment <!-- -->
2. <sub alias=" "> your text </sub>
3. <audio src='short_silence.wav'> your text </audio>
4. <prosody volume='silent'> your text </prosody>
I'm wondering if XML commenting is a valid solution for what you're trying to accomplish:
<!-- <say-as interpret-as="telephone" format="39">+39.347.7577577</say-as> -->
Or:
<say-as interpret-as="telephone" format="39"><!-- +39.347.7577577 --></say-as>
Hope this helps.
Looking quickly at the SSML Documentation from W3C, I found the prosody element.
It looks like you might be able to skip the section by setting the volume to 0 and setting the duration to a very small value.
Setting the volume to zero should suppress the audio output, but it will likely take the same time to "read" the section as if it were being read out loud. If you set the duration as well, you should be able to essentially "skip" over the section (quickly read it silently).
You'll have to experiment to see if this works.
Using meta tag might offer some solution.
<speak>This is spoken <meta content="this is not spoken"/> </speak>