-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
big vs smaller toolbar. Is it possible to force which one to use? #244
Comments
I think the If you want the small toolbar create a spam element and make it "editable": if you don't want this element in the output then you can add a data-ko-wrap="false" to the same element. |
Ok... I will try that. My current template is like this: 2 Questions: Is that correct?
|
|
Ok. I did the test. The result is that the element disappear and styles are applied as inline html not css. (different from what I thought before) SMALL toolbar only has 2 styles. Bold and Italic and they are applied as this: OK. It solves the 1st issue about using Small Tool Bar. perfectly!!!! But still I would like to explore the 2nd option ( Making TinyMCE to default to DIV Style instead of Paragraph style. ) because some times you also have links and other stuff, but don’t want TinyMCE to add some P tags around them because of the space added when editing . If I change to So, I would be a matter of: B) or Telling TinyMCE to not print any tag after editing. Im not sure if that option (B) is possible. C) or using / adding inline (SPAN tags) for format styles. I tried reading some TinyMCE docs but it needs to be TinyMCE available to configure inside mosaico. |
Exactly, I just found that link. Ok, I will try to see how can I use that information. |
Ok. I did the test and Everything worked perfect with that plug-in solution. |
Thank you for the update/feedback! |
We found that most browser/tinymce bugs related to contenteditable are about editing non-DIV elements, so we try to change the template converter to always create an utility DIV and make it editable (Fix #429 and #362). This should still work with 4.5.x (currently the last version supported by mosaico) and by updated releases. Mosaico now supports multiple editing styles: the legacy styles are named "singleline" and "multiline" and they are automatically applied depending on the data-ko-editable element (td & div use "multiline", the other ones "singleline") but a data-ko-editor-style="newstyle" can be used to force the use of a different tinymce options set. This set will inherit ko.bindingHandlers.wysiwyg.standardOptions, ko.bindingHandlers.wysiwyg.fullOptions and then ko.bindingHandlers.wysiwyg.extendedOptions. (Fix #244) This changeset also remove the support for ko.bindingHandlers.wysiwyg.getContentOptions and replaces it with a new option "_use_raw_format" that defines wether to use "raw" format when getting/setting the content from tinymce. The new default is to use "raw" format for the singleline style and non raw format for everything else (the raw in singleline is required in order to prevent tinymce from trimming contents). Note that previously mosaico used raw format for every style, so if you want to preserve the previous behaviour you need to set ko.bindingHandlers.wysiwyg.fullOptions._use_raw_format to true. (should fix #446) Another breaking change is the default "extended_valid_elements" option that changed from "strong/b,em/i,*[*]" to "strong/b,em/i" so to enable content filtering and strip unwanted tags (like scripts). You can revert it by setting that option to the old value but beware XSS vulnerabilities. This changeset enable to upgrade of tinymce to newer 4.x (4.7.x, 4.9.x) and latest 5.x (Fix #593). For 5.x and 6.x we also had to update the scrollfix binding so that the toolbar is correclty moved when the edit area is scrolled. TinyMCE 6.x compatibility requires more changes because they removed support for "forced_root_block = false" or "forced_root_block = ''" that is needed for the singleline editing. You can trick tinymce by usign "forced_root_block = 'unknownelementname'" but it will prevent use of "ENTER" to insert <br/>. Issues #596 and #443 may be fixed by this changeset.
Hi. I was wondering how can I force which toolbar to use: big or small.
I did read: Template language
and it specifies:
However, I 'd like force sometimes the one I wish use and not use the automatic feature. I couldn't find the option to do that. For instance, How could use the SMALL toolbar within a TD element?
Why do I ask this? Because when using the Big Toolbar TinyMCE automatically asign the Paragraph Style but sometimes what I need is the DIV Style.
So, 2 options would be possible to this issue:
Thanks in advance.
The text was updated successfully, but these errors were encountered: