Writer Region Plugin - Provides the ability to work with formatted text inside the Worksheet. - Messages






WYSIWYG word processing for your worksheets :d
- installation: SMath Studio: Tools > Plugins... > Online Gallery;
- documentation: WriterRegion.pdf (262 KiB) downloaded 790 time(s). | Activebook;
- UI languages:
;
- dictionaries (not included): Apache OpenOffice, Firefox, LibreOffice
TODO LIST
- Evaluable regions;
- Styles (full implementation requires API improvements to get/set worksheets properties);
- RTL/LTR support (see Unicode Bidirectional Algorithm);
- new/alternative Hunspell wrapper (NHunspell no more updaqted, latest sources not available);
- tables;
OLD documentation:
The code contains additional features (style limitations, region's rotation, ...) to use the plugin or the core of this plugin in your projects; let me know if there are issues/bugs to solve or possible improvements.
Examples of use:
- WriterRegion (basics)
- PieChartRegion (multiple regions, fields)
- BarChartRegion (under development)
- SectionRegions [under development]
WriterManager.sm (11 KiB) downloaded 337 time(s).

I know, I've tried a less disturbing "floating toolbar" but I've not (yet) found a good way to handle it (as for now the toolbar is called from the single region and may handle just that region - I have to handle in some way when the region looses the focus or is deleted from the canvas). When Andrey will provides a way to add toolbars from plugins I'll remove completely the form and this issue will be solved :d .
P.S. plugin updated (Math objects vs styles issues)
P.P.S. plugin updated (Copy format for Math objects; Save/read full style settings for empty lines)
Here is a preliminary wish-list.
- make the default line spacing customizable or sez it to 1 (this gives grid alignment with the default font setting on my system)
- set the default wrap depending on where the region is inserted. If it is at the left margin, set it to page, if elswhere, set it to custom
- open the hyperlink editor upon double-click on hyperlinks, just as the math editor on math insets.
- if possible, provide a choice, if a sm hyperlink target is to be opened in place of the current document (as with hyperlink text regions) or using the windows run command (leading to a new SMath instance). Currently, the writer region hyperlinks can't be used for interactive handbook cross linking. Thism however, would be very desirable, because they are much easier to edit than the hyperlink text regions.
WroteHi Davide, thank you for the great plugin.
You're welcome

WroteHere is a preliminary wish-list.
- make the default line spacing customizable or sez it to 1 (this gives grid alignment with the default font setting on my system)
Sure, I think I'll implement the first thing... Also, probably I'll provide the spacing as a paragraph's property, as for the word processors.
Wrote- set the default wrap depending on where the region is inserted. If it is at the left margin, set it to page, if elswhere, set it to custom
That's an interesting idea. It may be matter of taste so I don't know, I have to think a little if should be possible to make it as a customizable option (f.e. my worksheets often are organized in two columns - description on the left and math on the right - thus this approach may be not the best in this or similar cases)
Wrote- open the hyperlink editor upon double-click on hyperlinks, just as the math editor on math insets.
CTRL+SHIFT+H currently does this job (full edit of the hyperlink that surrounds the caret) without interferences with the normal text behaviour (double-click to select and edit/move a word, as for generic word processors); this can be done also from the toolbar button, even if I know is less accessible.
Wrote- if possible, provide a choice, if a sm hyperlink target is to be opened in place of the current document (as with hyperlink text regions) or using the windows run command (leading to a new SMath instance). Currently, the writer region hyperlinks can't be used for interactive handbook cross linking. Thism however, would be very desirable, because they are much easier to edit than the hyperlink text regions.
Absolutely yes. I have to know if the function to open the document is available form within plugins or is hardcoded (in this case I'll ask Andrey to make it available)
P.S. PLUGIN UPDATED
- Custom wrap: fixed the size of empty regions;
- Blinking caret;
Could you please enable the shortcut Ctrl-G for greek letters (for text input and in the math editor)? Currently, you have to type greek letters elsewhere and copy them to the region.
Edit: One more productivity feature: Use ENTER as a shortcut to close the math editor. Then insets can be created without touching the mouse. This way you can easily give math formatting to any cited symbol in the text.
Thanks, Martin.
P.S. error found in the greek paragraph of your activebook
selecting multiple characters and typing (for replacement) produces an exception (index out of range...)
- added CTRL+G to swap between latin characters and greek symbols (on selection, on words, on further characters)
- math dialog: added CTRL+G to swap between latin characters and greek symbols (on selection, on further characters)
- math dialog now accepts RETURN and ESC keys;
- hyperlink dialog now accepts RETURN and ESC keys;
- fixed crash on text's replacement;
- fixed objects' focus issues when there are hyperlinks;
- minor changes/improvements;
Example-2 creates totally the same result on SMath with Example-1, actually Example-2 is notepad modified Example-1.
Example-1:
<region id="0" left="0" top="0" width="97" height="62" color="#000000" bgColor="#ffffff">
<writer lang="eng"><![CDATA[<span style="font-family: 'Arial Unicode MS'; font-size: 10pt; font-weight: normal; font-style: normal; text-decoration: none; color: Black; background-color: Transparent; text-align: left; line-height: 115%">
<div><span style="font-family: 'Courier New'"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE8AAAAwCAYAAABQQCeSAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAICSURBVGhD7ZmJsYQgDEAtj4Ioh15sxU74BFCBD15EIWzeDDOL4yL7NoTDSTOPYXkVsLwKbsubpqlJ6ZFH8r6G5VXA8ipgeQPSUN6spWkL2oMi1OKv0+GWCcyoU2LScvYVL3Kv06CZvJRFSU0t+PqQtygthPIVOrSXN0vTriAXdUBTeYsSpk1pMh5Nmsmz4oKhCnVqM24beZDjTFvQXlhY3gC4dOL/1IP1E8tLmKURFqQTqJf8sbwTUOSdirNLDrr5KybYOmIM23N5c7TkUILm2i0l3kbGvBZ5VBe+/4CVQcEekjwI83ixO0ua8tJIg3opBeHIS/emhLdcLhCCEfRFzrNT/PZQqaWtDzJ0C6DJ+0UOjYTCepXXsl/ZJ7uh58oKSXnBHhpS177twjnJiZ7sGs4LCz/3xGm/rECfe5EnssMnrx0rdRCuv1lK5O5dS5YtAnHPDqvk9cCVvoWnJAcrj9sML8+JWyMO9y3d0PL2iHN5DjsCyctrCb68YHngykGSDg8TRnz1uP64y4C8C2MizkU0aSMP7iEYaSnvyPPfsSUnyQxXIU3Z7qMZgfjyEuzwTCJxnfW2y5D7MKa/j7kkr4rMMLbyoog0669RJ4w7pCevcM6XO4mN3nFcnGR645XIA4HwPVtKUqLcSPPQ9BV5vwLLq4DNVMDyKmB5FbC8x2j9B3wdVWeGEbvtAAAAAElFTkSuQmCC" width="79px" height="48px" alt="sqrt({a^2}/56)+x^3" data-style="font-family: 'Courier New'; font-size: 10pt; color: Black; background-color: Transparent"></span></div></span>]]></writer>
</region>
Example-2
<region id="0" left="0" top="0" width="97" height="62" color="#000000" bgColor="#ffffff">
<writer lang="eng"><![CDATA[<span style="font-family: 'Arial Unicode MS'; font-size: 10pt; font-weight: normal; font-style: normal; text-decoration: none; color: Black; background-color: Transparent; text-align: left; line-height: 115%">
<div><span style="font-family: 'Courier New'"><img alt="sqrt({a^2}/56)+x^3" data-style="font-family: 'Courier New'; font-size: 10pt; color: Black; background-color: Transparent"></span></div></span>]]></writer>
</region>
P.S.
Wrote- if possible, provide a choice, if a sm hyperlink target is to be opened in place of the current document (as with hyperlink text regions) or using the windows run command (leading to a new SMath instance).
I've asked Andrey to extend the APIs to be able to implement this feature

- Plugin updated to respect changes in SS Core;
- Fixed missing WrapWidth on CTRL+DRAG;
- Toolstrips organization changed to have paragraph's properties grouped;
- Minor changes;
- Toolbar new features:
- Toolbar now is available as floating item (can be opened at once in the worksheet);
- added "Symbol" menu;
- windows "character map" available from here;
- added "Change Case" menu;
- added functions "sentence case", "capitalize each words", "toggle case";
- "More" menu: New "Options..." item (introduced to set up global options);
- you can choose between 2 different ways to export data to clipboard; this should enable the region to export math images to any external Word processor*;
- you can choose the default wrap for the new regions;
- you can choose to move the new regions on the leftmost page margin, regardless the insertion point;
- [DEV] LOG utilities available from inside SMath (CTRL+SHIFT+D in this form)
- you can choose between 2 different ways to export data to clipboard; this should enable the region to export math images to any external Word processor*;
- fixed critical bugs about non valid values in the font-size DropDown menu;
- icons reworked;
- Toolbar now is available as floating item (can be opened at once in the worksheet);
- Math objects: the single object now can be copy-pasted as editable math in MS Word** ("paste special" still contains also the plain text and the bitmap image);
- Changed handling of mouse cursor to avoid annoying flickering;
- on text selection (noticed with some video drivers);
- over links on CTRL key pressed (workaround for [url="http://smath.info/bts/Issues/IssueDetail.aspx?id=1239"]SS-1239[/url]);
- on text selection (noticed with some video drivers);
- Hotkeys: CTRL+SHIFT+F assigned to "Copy Format";
- Fixed critical bug of math objects containing XML special characters;
- Fixed non selectable hyperlinks written after adding math objects;
- [DEV] code changes to enable batch TextRegion conversion from next TextRegionUtilities plugin;
- minor changes & fixes;
PLEASE NOTE:
* Most of the Word processors are able to manage both the modes, however MS Word doesn't handle embedded images, Google Docs and MS Office Online doesn't handle (local) temporary files.
** Some MathML attributes such as colors and alignments are ignored (tests on MS Word up to 2010). It is possible to left-align the items (if, line, while, for, sys, cases) from inside MS Word (Column Alignment > Left).
- Fixed broken resize marker;
What you think if together we will try to include Writer Region into SMath Studio in the Cloud? I believe it may be interesting...
Best regards!

I think that would be great, we'll talk about it on Skype ASAP

-
New Posts
-
No New Posts