Writer Region Plugin

Writer Region Plugin - Provides the ability to work with formatted text inside the Worksheet. - Сообщения

#1 Опубликовано: 08.03.2015 05:26:21
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

SMath Studio compatibility SMath Viewer compatibility mono compatibility

extension page Sources MIT license


WYSIWYG word processing for your worksheets :d

2016-05-03 01_44_24-SMath Studio Desktop - [WR_hello.sm_].png




>>> PLEASE REPORT IN THIS TOPIC ANY ISSUE, MORE DETAILED AS POSSIBLE <<<


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:

Показать спойлер

If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
9 пользователям понравился этот пост
frapuano 03.12.2016 06:29:00, IVR 22.12.2016 06:33:00, zoom 17.01.2016 17:13:00, Radovan Omorjan 08.03.2015 09:52:00, sergio 09.03.2015 06:49:00, Martin Kraska 09.03.2015 16:07:00, Вячеслав Мезенцев 10.03.2015 06:01:00, ioan92 08.03.2015 06:27:00, Andrey Ivashov 16.11.2018 14:59:00
#2 Опубликовано: 08.03.2015 05:37:56
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

Just for developpers

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 КиБ) скачан 350 раз(а).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
3 пользователям понравился этот пост
Andrey Ivashov 11.04.2025 13:48:12, Вячеслав Мезенцев 10.03.2015 06:02:00, ioan92 08.03.2015 06:27:00
#3 Опубликовано: 08.03.2015 08:00:52
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

Hello Ioan


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)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
ioan92 08.03.2015 08:04:00
#4 Опубликовано: 09.03.2015 16:18:37
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

Hi Davide, thank you for the great plugin.

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.

Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#5 Опубликовано: 09.03.2015 19:53:23
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

Hello Martin

Wrote

Hi Davide, thank you for the great plugin.


You're welcome

Wrote

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)


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;
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#6 Опубликовано: 12.03.2015 10:04:16
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

There is another topic on my wish-list:

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.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#7 Опубликовано: 13.03.2015 06:19:50
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

I think is possible.

Inside the region should be better to have CTRL+G as for the style modifiers (CTRL+B f.e., that enable/disable the bold mode and converts the surrounding/selected word) or like in math regions (just the character before the caret is converted)?


P.S. error found in the greek paragraph of your activebook
2015-03-13 13_15_17-SMath Studio Desktop - [Greek Characters.sm_].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Martin Kraska 14.03.2015 14:17:00
#8 Опубликовано: 14.03.2015 14:22:10
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

reproducible (recoverable) crash:

selecting multiple characters and typing (for replacement) produces an exception (index out of range...)
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
Davide Carpi 15.03.2015 05:24:00
#9 Опубликовано: 15.03.2015 05:50:01
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

Reproduced, thank you!
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#10 Опубликовано: 15.03.2015 13:59:01
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

PLUGIN UPDATED

- 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;
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
4 пользователям понравился этот пост
ioan92 16.03.2015 05:47:00, IVR 17.03.2015 08:45:00, Вячеслав Мезенцев 16.03.2015 00:19:00, sergio 16.03.2015 05:35:00
#11 Опубликовано: 16.03.2015 10:15:39
overlord

overlord

554 сообщений из 1333 понравились пользователям.

Группа: Moderator

Is there a reason this region saves a random png data on every change made or is it just junk data? It can easily be detected if you edit *.sm file with a notepad. If you delete this image data then there will be no difference at viewing or printing the document. Moving the region do not add the image data to region. However if you change anything at writer region the png data shall be added again.

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>
#12 Опубликовано: 16.03.2015 10:54:50
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

The src attribute contains a base64-encoded data URI, it is used to share the math objects to the external word processors as a PNG image. It is not essential in the worksheet code, but I need it for debug/testing purposes, at least for now.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#13 Опубликовано: 31.03.2015 18:20:02
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

If a writer region with custom wrap setting is cloned using ctrl-drag, then the custom region width gets lost. The wrap setting is still custom but the width extends as if None was specified.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
Davide Carpi 31.03.2015 20:13:00
#14 Опубликовано: 31.03.2015 20:14:01
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

Thank you, will be fixed in the next relase.

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
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#15 Опубликовано: 07.04.2015 19:24:28
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

PLUGIN UPDATED SMath Studio 0.97.5575 (07 April 2015)

- 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;
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
ioan92 08.04.2015 01:19:00
#16 Опубликовано: 02.08.2015 14:14:59
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

PLUGIN UPDATED SMath Studio 0.97.5581 (08 April 2015)

  • 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)
    • fixed critical bugs about non valid values in the font-size DropDown menu;
    • icons reworked;
  • 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]);
  • 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).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
4 пользователям понравился этот пост
Вячеслав Мезенцев 04.08.2015 02:32:00, IVR 02.08.2015 14:51:00, ioan92 02.08.2015 16:32:00, sergio 03.08.2015 04:52:00
#17 Опубликовано: 03.08.2015 11:50:56
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

PLUGIN UPDATED

- Fixed broken resize marker;
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
2 пользователям понравился этот пост
Oscar Campo 05.08.2015 13:28:00, Andrey Ivashov 05.08.2015 12:09:00
#18 Опубликовано: 05.08.2015 12:12:01
Andrey Ivashov

Andrey Ivashov

2270 сообщений из 3734 понравились пользователям.

Группа: Super Administrator

Great! Thank you Davide!

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!
1 пользователям понравился этот пост
Davide Carpi 05.08.2015 14:17:00
#19 Опубликовано: 05.08.2015 14:22:08
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

Hello Andrey

I think that would be great, we'll talk about it on Skype ASAP
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#20 Опубликовано: 06.08.2015 19:45:18
Andrey Ivashov

Andrey Ivashov

2270 сообщений из 3734 понравились пользователям.

Группа: Super Administrator

Sure!
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений