How we can use complex bullets elements in html text area? - html

How can I insert different complex bullets elements which we use in Microsoft word into html text area?
When I insert them into text area, text area changes its style and replace bullets elements with '?' question mark.
Why html is not identifying complex bullets elements? Textarea is only identifying simple bullets elements.

HTML knows nothing of Microsoft Word's proprietary complex bullet elements.
HTML knows nothing of Microsoft Word's formatting.
HTML knows nothing but the plain ASCII text you placed into the textarea.
There are Rich Text Editors like http://ckeditor.com/ that can convert MS Word content into HTML (you used one similar on the textarea where you entered your question).
You may also need to ensure your content is rendering using UTF-8 to correctly display your content (and avoid the empty squares, etc.).

Related

Puncutation marks appear in the wrong side inside a right-to-left pharagraph tag in html

I am trying to mix between Hebrew and English within a single right-to-left paragraph tag, but puncuation marks are rendered on the opposite side.
For example, I wish to have the following rendered on the page:
But the double slash punctuation marks which should appear at the far left, are getting switched with the single puncuation mark at the far right, as you can see from running the following code snippet:
<p dir="rtl">אחת שתיים \\one\two\</p>
I had tried solving the problem using different methods (For example, using the unicode-bidi css property) but none of my attempts have worked.
Note: Changing the original text inside the paragraph tag to include special unicode characters (such as rlm control characters) or dividing the text within the tag into multiple tags is not an option in my case (I am trying to solve this problem without changing the html structure).
Preferably, I would want to solve this problem using only html or css, but also javascript might be an option, if one can't do it the other ways.

Bidirectional (BiDi) text inside HTML textarea not respecting LRM control character

I'm having a hard time with making BiDi strings work inside an HTML textarea as I'd expect.
This test string contains both Arabic and English, plus sequences of pseudo-tags (<1/>, <2/>), which are composed of neutral-direction characters (<, >, /, numbers) and should inherit their direction by the strong-direction character before them.
Given that these pseudo-tags are positioned after both RTL and LTR text, I need to force the direction of the text putting one LRM (U+200E, ‎) char before each pseudo-tags.
The result it's not what I expected:
Note that the textarea has the direction property set as follow: dir='rtl'
Tested with both Chrome and FF, none of them seems to work as expected. Am I missing something?
Results on Jsfiddle are even different: https://jsfiddle.net/o7d2ymdc/1/
Unfortunately, displaying these inside a textarea is going to be extremely difficult, if at all possible.
There are several issues that are at play here, among them is the fact that brackets and parentheses are mirrored in the Unicode Bidirectional algorithm: This <span dir="ltr"><</span> is rendered as '<', while this <span dir="rtl"><</span> is rendered as '>'. And all of this is added on top of the fact that we have different definitions of "end of string" in either of the RTL and LTR strings.
Your best bet could be using ContentEditable. You can display editable rich text - that is actually html nodes - and essentially isolate your RTL pieces from the HTML markup properly with spans, as if you would have statically displayed it. However, if this textbox allows for custom user-generated text, you may need to come up with a good algorithm that wraps the bidirectional text automatically as the user types, which can be a pretty big challenge.
If this helps, you're not the only one to deal with this. If you edit HTML blocks in Arabic Wikipedia, for example, you will see the exact same problem (which makes editing HTML and wikitext a fairly big challenge)
This problem is also one of the reasons why people prefer a WYSIWYG editor - that has proper contextual and conceptual separation between the markup/style and the text itself.

Flash/AS3 highlighting Arabic text

Whenever I try to highlight Arabic text, it starts to go really weird and highlights at wrong parts.
Try it out for yourself to see what I mean: http://www.fastswf.com/iJ_P74c
Try highlighting the Arabic text and notice how weird things happen, Then highlight the English sentence and you'll notice that it's perfectly normal.
Is there any way to fix this?
Edit: If it's important; the font used is Times New Roman; Device Fonts; Regular.
This is a known limitation of mixing RTL and LTR languages in the same text field, 'Classic Text` as Adobe calls it versus 'FTL text'.
Use TLFTextField instead of UITextField and text highlighting for mixed RTL and LTR languages in the same text block will be handled correctly.
TLF text provides the following enhancements over Classic text:
The ability to create right-to-left text for Arabic and Hebrew scripts.
Support for bi-directional text, where right-to-left text can contain elements of left-to-right text. This is important for embedding English words or Arabic numerals within Arabic/Hebrew text, for example
Print-quality typography.
Additional character styles, including leading, ligatures, highlight color, underline, strikethrough, case, digit case, and more.
Additional paragraph styles, including multi-column support with gutter width, last line justification options, margins, indents, paragraph spacing, and container padding values.
Control of additional Asian text attributes, including Tate Chu Yoko, Mojikumi, Kinsoku Shori Type, and Leading model.
You can apply attributes such as 3D Rotation, Color Effects, and Blend Modes to TLF text without placing it in a movie clip symbol.
Text can flow across multiple text containers. These containers are called threaded or linked text containers.

Disallow "justify" with HTML-Filter

On my Plone (4.2) Site, I have several users who regularly paste in texts from Word or OpenOffice. These texts are sometimes aligned as "justify", whereas I would not like to allow justified text blocks on the site (because it looks ugly).
Under the "HTML Filter settings" of the Plone Control Center, it does not seem to be possible to disallow a certain html attribute setting -- one can allow match and tag attributes. I would like to disallow all <xxx align="justify"> while still allowing elements to be right-aligned with <xxx align="right">.
Is there any way to do HTML filtering based on attributes' values in Plone?
You could disallow the attribute align in Plone's html filter. Then the default align is used which is "left".
Nowadays the most common way to align a text is to use css: . The css property "text-align" could also be disallowed in that html filter. Please don't forget to remove "justify" button from the tinyMCE toolbar.

HTML Textarea with specific line colors

I've got a <textarea>, but I need to color specific lines different colors. Apparently, I can't do this.
I could perhaps use a <div>, but I like the look and scrollbar of a <textarea>.
Is there any sort of database of HTML elements somewhere that I can check? It's rather annoying having to burden the posters of StackOverflow whenever I can't place the name of an element.
Textareas can only contain plain text. No possibility to format via CSS. You need something like a WYSIWYG Editor (CKEditor or TinyMCE)
Or if readonly, filled by javascript:
Use a simple div which can contain HTML markup inside for your line colors. Then style it with CSS to look like a textarea (scrollbar maybe)