To open the Styles pane in Word, click the Home tab in the Ribbon. It would deal with spaces quite nicely, for example. To open the Reveal Formatting pane in Word, first select the text for which to see the formatting. * or append - for example newlines/carriage returns etc need to be both displayed as a marker, and actually occur within the contenteditable element.Įdit: What you could do in addition to the above is to edit a font, replacing/adding unicode points for hidden characters instead/as well as visible ones - you would still need to capture input, but this would remove a few headaches. For large amounts of text, I can see it becoming horrific: not sure what the JS overhead would be in terms of performance, but I can't imagine it would be particularly good. It's doable if you can ensure the max amount of text can be kept small, and if you can control what users can enter.
#HOW TO DISPLAY THEN HIDE FORMATTING MARKS IN WORD 2013 CODE#
And though you can use use unicode entities for many of the markers (pilcrows, maybe?), a space (for example) will still show as whitespace (or as the entity code if escaped), so you would need to use a representative icon - essentially, the majority of the hidden characters will each need to have their own specific, defined rendering rules. The actual input still needs be either saved as typed, or parsed again before saving to strip the new, pretend characters.
You'll then need to replace* (in realtime) every space/paragraph mark/&c with a relevant marker for the user. Something like Bacon that can easily capture keyed user input as a stream (and allow you to map across the stream) would simplify the process somewhat. Your best bet if you really want to do this is to capture the input within the div as a user enters text. No, there definitely isn't a simple way to do this, because it's a fairly complex feature. In this way you can be certain you won't inadvertently delete hidden text.(I don't have access to Word, but I'm assuming it's the exact same functionality present in most text editors, or InDesign's 'show hidden characters' option &c.) The best way to guard against this is to make sure hidden text is always displayed when you are developing or editing your document. This is especially true if you delete larger blocks of text, such as entire paragraphs. This makes it very easy to delete hidden text without even realizing it. When you turn it off, it doesn't show up at all on your screen. Turning off the display of hidden text presents a danger that you need to be aware of, however. (This is the tool that contains the paragraph symbol it looks like a backwards P and is technically called a pilcrow.) This tool is directly attached to the Show All Formatting Marks option in the Word Options dialog box it toggles the setting of the check box. You can also control the display of hidden text (along with all other non-printing characters) by clicking on the Home tab of the ribbon, in the Paragraph group. (Same caveat about the Show All Formatting Marks check box applies.) The reason is that if the Show All Formatting Marks check box is selected, then all the check boxes that appear just above it (in the "Always Show These Formatting Marks On the Screen" section) are displayed.Īfter hidden text is hidden, you can later display it by following the same steps, but make sure the Hidden Text check box (step 3) is selected. Note that if the Show All Formatting Marks check box is selected in the Word Options dialog box, it doesn't really matter whether the Hidden Text check box is selected or not (step 3). The display options in the Word Options dialog box. Click Display at the left side of the dialog box.In Word 2010 or a later version, display the File tab of the ribbon and then click Options.) (In Word 2007 click the Office button and then click Word Options. To turn off the display of hidden text on the screen, follow these steps: When you later display hidden text, it will all be displayed again. When the display of hidden text is turned off, the text is not deleted, its display is simply suppressed-it is not shown. You can control whether hidden text is displayed or printed. In Word, hidden is a text attribute just like italics or bold. Hidden text is text that has the hidden attribute applied.