wysiwyg

ckeditor image align center customization

怎甘沉沦 提交于 2020-01-21 05:36:28
问题 After researching at least a dozen threads on image centering in regards to ckeditor I wanted to post what I am using for one of our company applications and see if any other geeks have tips or suggestions for improvement. I am posting this on stackoverflow because it's where we all go for help and I know others are researching this same topic. Our editor is used for email templates so I wanted to make sure the style attributes are also reinserted into the img tag attributes: <img align="left

Magento - add WYSIWYG editor to custom widget

别来无恙 提交于 2020-01-21 03:19:14
问题 I created a widget inside my custom module. Everything is working and the widget can be embedded onto CMS pages. However, instead of a textarea parameter type I want to add a WYSIWYG editor. This is the significant part in my widget.xml: <parameters> <description translate="label"> <required>0</required> <visible>1</visible> <label>Description</label> <type>textarea</type> </description> </parameters> I wonder if there's a way to extend Magento's functionality to allow a WYSIWYG editor

Accordance between pixel and mm

无人久伴 提交于 2020-01-17 07:41:11
问题 I'm doing: PhysicalParameters() { IntPtr DeskTopHWND = GetDesktopWindow(); IntPtr HDC = GetDC(DeskTopHWND); int mmX = GetDeviceCaps(HDC, HORZSIZE); int mmY = GetDeviceCaps(HDC, VERTSIZE); int pxX = GetDeviceCaps(HDC, HORZRES); int pxY = GetDeviceCaps(HDC, VERTRES); ReleaseDC(DeskTopHWND, HDC); double CoeffPIX_MM_X = 1.0 * mmX / pxX; double CoeffPIX_MM_Y = 1.0 * mmY / pxY; } The result for both is 0.25 But what I see (MS Word' WysiWyg ) it should be about 0.27 Please, explain the subject. 回答1:

A WYSIWYG Where it's possible to limit the text/height

廉价感情. 提交于 2020-01-16 18:13:07
问题 Ok, so I tried out tinyMCE. After no luck and a lot of research on how to limit the editors content, I'm looking for other alternatives. These are the needs for the WYSIWYG: Able to have these function/buttons: bold,italic,underline,bull list, table controls Able to limit the input. If I set the editor to 300 width x 500 height, and you type more than the height, it should NOT apply a scroller and you should be unable to write more. Able to set multiple editors in one page Which WYSIWYG

Python/Javascript: WYSIWYG html editor - Handle large documents fast and/or design theory

喜你入骨 提交于 2020-01-15 05:54:26
问题 Background: I am writing an ebook editing program in python. Currently it utilizes a source-code view for editing, and I would like to port it over to a wysiwyg view for editing. The best (only?) html renderer I could find for python was webkit (I am using the PyQt version). Question: How do I accomplish wysiwyg editing? The requirements/issues are as follows: An ebook may be up to 10,000 paragraphs / 1,000,000 characters. PyQt Webkit (ContentEditable): No problem. PyQt Webkit (TinyMce, etc):

How to open hyperlink in new window under tinymce text editor?

蓝咒 提交于 2020-01-13 11:22:11
问题 I have below configuration for tinymce. I want to open the result of hyperlink click in separate tab or window. I used theme_advanced_link_targets : "_blank" as shown below but did not help. Is there any other cofig paramter for this? var tinyMCESettings = { theme : "advanced", plugins : "preview", readonly : readOnly, theme_advanced_buttons1 : "forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull", width : width, theme_advanced_toolbar_location : "top", theme_advanced

Load blockquote plugin in CKEditor

主宰稳场 提交于 2020-01-13 11:08:23
问题 I want to use CKEditor via django-ckeditor. CKEditor gets loaded, but I fail to load the blockquote plugin. I downloaded blockquote.zip , unpacked it Copied it to my app like this myapp/static/ckeditor/ckeditor/plugins/blockquote I run collectstatic . I can access the blockquote/plugin.js file via browser if I inter the URL by hand. I updated the config: CKEDITOR_CONFIGS = { 'default': { 'extraPlugins': 'blockquote', } } The HTML contains the blockquote : <textarea cols="40" id="id_body" name

Load blockquote plugin in CKEditor

一笑奈何 提交于 2020-01-13 11:08:10
问题 I want to use CKEditor via django-ckeditor. CKEditor gets loaded, but I fail to load the blockquote plugin. I downloaded blockquote.zip , unpacked it Copied it to my app like this myapp/static/ckeditor/ckeditor/plugins/blockquote I run collectstatic . I can access the blockquote/plugin.js file via browser if I inter the URL by hand. I updated the config: CKEDITOR_CONFIGS = { 'default': { 'extraPlugins': 'blockquote', } } The HTML contains the blockquote : <textarea cols="40" id="id_body" name

Prevent CKEditor from formatting code in source mode

帅比萌擦擦* 提交于 2020-01-12 02:43:23
问题 How can you prevent any automatic formatting when in CKEditor when viewing in source mode? I like to edit HTML source code directly instead of using the WYSIWYG interface, but whenever I write new lines, or layout tags how I would indent them, it all gets formatted when I switch to WYSIWYG mode and then back to source mode again. I stumbled upon a CKEditor dev ticket, Preserve formatting of ProtectedSource elements, that alluded to a setting which may have existed once upon a time which would

Best Practice: User generated HTML cleaning

浪尽此生 提交于 2020-01-10 19:43:10
问题 I'm coding a WYSIWYG editor width designMode="on" on a iframe. The editor works fine and i store the code as is in the database. Before outputing the html i need to "clean" with php on the server-side to avoid cross-site-scripting and other scary things. Is there some sort of best practice on how to do this? What tags can be dangerous? UPDATE: Typo fixed, it's What You See Is What You Get. Nothing new :) 回答1: The best practice is to allow only certain things you know aren't dangerous, and