markup

Why does the DIV tag render differently in IE8 and Firefox?

Why do div tags render differently in IE8 and Firefox? Is there a way to have them rendered the same? This is a very general question, the reason I ask is I am fighting both browsers when using div tags, some elements are not rendering the same. ...

WPF: Dynamic MarkupExtension- ReRendering/Updating of value

Hey everyone, I´m using a markupextension for loading internationalized strings in a WPF application like this: <Button Content="{Translate MyText}"/> My markupextension is named "TranslateExtension" and it searches a value for the key "MyText" from a database. It does this in the ProvideValue(IServiceProvider serviceProvider) me...

Where can I find a good MediaWiki Markup parser in PHP?

I would try hacking MediaWiki's code a little, but I figured out it would be unnecessary if I can get an independent parser. Can anyone help me with this? Thanks. ...

How can i format aspx-markup as html to show it on webpage

Hello, i've been using C. Coller's excellent CopyAsHtml-Visual Studio addin for copying C# code as html to a webpage. Now, i started to wonder if there exists a similar tool for converting the aspx-markup to valid html to show on page? Functionality that i'm looking for can be seen on G. Houston's blog. F.ex. if i feed this <asp:But...

How to convert wiki markup to RTF?

I'd like to create some formatted text in a .net RichTextBox control. It seems like a lot of hassle to use the existing mechanism for formatting, e.g. selection etc. Some kind of markup would be much easier. I.e. just like markup works in this site. E.g. Some **bold** text. gives you "Some bold text". Does anyone: know if anything...

How can I parse marked up text for further processing?

See updated input and output data at Edit-1. What I am trying to accomplish is turning + 1 + 1.1 + 1.1.1 - 1.1.1.1 - 1.1.1.2 + 1.2 - 1.2.1 - 1.2.2 - 1.3 + 2 - 3 into a python data structure such as [{'1': [{'1.1': {'1.1.1': ['1.1.1.1', '1.1.1.2']}, '1.2': ['1.2.1', '1.2.2']}, '1.3'], '2': {}}, ['3',]] I've looked ...

Valid HTML and the number of TD elements

I have a HTML table with several columns and several rows. The last row does not always have as many TD elements as the other rows. It renders correctly in several browsers I have checked and passes validation checks. But it seems incorrect. Should the number of TD elements be the same in every row? EDIT: This could happen with or witho...

Is it possible to encode (<em>asdf</em>) in python Textile?

I'm using python Textile to store markup in the database. I would like to yield the following HTML snippet: (<em>asdf</em>) The obvious doesn't get encoded: (_asdf_) -> <p>(_asdf_)</p> The following works, but yields an ugly space: ( _asdf_) -> <p>( <em>asdf</em>) Am I missing something obvious or is this just not possi...

How to mark-up phone numbers?

Hi, I want to mark up a phone number as callable link in an HTML document. I have read the microformats approach, and I know, that the tel: scheme would be standard, but is quite literally nowhere implemented. Skype defines, as far as I know, skype: and callto:, the latter having gained some popularity. I assume, that other companies h...

Looking for lightweight document description language for printing

I'm looking for a very lightweight document description language, which can be easyly parsed in C. The purpose is printing of small documents or labels similar to cash register receipts. I need only basic formatting features for font settings, alignment and insertion of predefined variables. Any ideas? Would using of some subset of rtf ...

PHP: Truncate HTML, ignoring tags

I want to truncate some text (loaded from a database or text file), but it contains HTML so as a result the tags are included and less text will be returned. This can then result in tags not being closed, or being partially closed (so Tidy may not work properly and there is still less content). How can I truncate based on the text (and p...

Simple CakePHP text markup solution for editing news posts

When first searching the web for a simple CakePHP way to convert small news posts (written by a non-technician) I found the flay method in TextHelper. However it turned out that it has been deprecated, referencing to TextileHelper w/ SmartyPants. Textile indeed seems to be a very competent markup language. Nevertheless, I'm afraid it i...

What Html markup for a focusable TD ?

I want to practive, and even best-practice, with Html+JS+CSS. I use a one page client-only Sudoku page. My Sudoku markup is basically a <table>, with <td>. (I'm open to suggestions to improve this). My requirements : Have a cell under focus (the keyboard notion of focus) (highlighed with css to a yellow background) Navigate through ce...

How to convert between two types of document markup with regex in C#?

Hi I am trying to convert between html-style markup such as bold and italics into my own custom markup format: <b>Bold word</b> ---> * Bold word * So the bold tag is converted to wrapping stars, etc. Whats the easiest/best/fastest way to do this? Parsing the string manually is easy enough, but what about regular expressions? I am u...

What's the actual name of <% %> tags?

Possibly a redundant and useless question, but my colleagues and I refer to <% %> as server tags, but is there an actual name for them? one i've seen used is calling them Alcohol tags. Edited based on answers We're referring to them in ASP.NET, but I would've thought they'd use the same name across all languages if they did the same j...

Lightweight markup language for Python

Programming a Python web application, I want to create a text area where the users can enter text in a lightweight markup language. The text will be imported to a html template and viewed on the page. Today I use this command to create the textarea, which allows users to enter any (html) text: my_text = cgidata.getvalue('my_text', 'defa...

What is the best way to style a list of checkboxes

What I'd like to achieve is a layout like this some label [ ] checkbox 1 [ ] checkbox 2 [ ] checkbox 3 [ ] checkbox 4 [ ] represents a checkbox What markup and CSS would be best to use for this? I know this would be easy to do with a table I'm wondering if this is possible with divs ...

Are there any standards for markup like the one that SO site uses?

I will like to design/develop a formatting markup for an application that we are developing. Is there any standard on this like what StackOverflow uses when writing each question description. ...

Need reference for ASP.net MVC View-markup syntax...

I'm getting started with .NET MVC. I have experience with C# and I'm getting confortable with controllers and models. I'm however not very knowledgeable when it comes to writing views. I'm struggling to find a good reference on the matter. Available code samples are usually simple and oriented towards demonstrating the overall MVC m...

Should I use the <p /> tag in markup?

I have always used either <br /> or a <div/> tag when something more advanced is necessary. Is use of the <p/> tag still encouraged? ...