I want to create a component on ExtJS like the editor that have stackoverflow for ask question (only Bold and Emphasis buttons). I think that should be an extension of textarea but i dont know how to select text selected and how to replace with tags+text. Please give me some ideas.
Thanks
Markdown by John Gruber can be obtained from his site. You could use his documentation as a basis for creating your own plugin for the HtmlEditor.
If you're talking about the ability to use asterisks for bullets and such, in that mode StackOverflow's editor uses something called "Markdown".
Here's one example of someone trying to make a markdown-based textarea with preview in Extjs:
http://www.sencha.com/learn/Extension:Ext.ux.MarkdownEditor
If you look around for other Markdown-related editors, you might find some ideas. If you're instead looking for just an "Online Rich-Text Editor" there's plenty of those.
UPDATE 29-APR-2014: There's actually a project you should take a look at. It's called "StackEdit":
https://stackedit.io
It's an open source initiative to supply a markdown editing component. Not ExtJS based, but those who find this question may be interested in what they are doing it.
(I discovered it through one of SO's open-source-recruiting sidebar campaigns; advertising can be useful, apparently.)
Related
I am trying to implement multipage functionality with quill. I want to fix the height of each page, and when user reaches the end of page, instead of editor height to grow or scrollbar to appear, I want cursor to go to next page(editor), similar behaviour as observed in Google Docs or Microsoft word document.
I have already added 2 editors in the view, but not having any idea on how to switch to new page as cursor reaches the end of first page.
i come straight from google trying to figure out something similar with quill and as far as i know and as far as i came while researching this specific topic:
to me it seems as if its not possible with multiple editors since as soon as the user wants to select paragraphs/elements over a multi page span you'd have to figure out how to
make the selection actually possible (try to select content over a span of two div elements which both are "contenteditable"-enabled, which was one of my first tries kinda).
spread the selection on multiple editors (you'd have to keep track of how much the user selected and when and how far the selection is within which editor which is kinda tricky)
execute an action over multiple editors which will be especially hard since there is no thing as "shared toolbar" yet (as far as i know)
so i really hope (🙏) the time helped you to find an sharable 🤲 solution to this but as far as i built up my knowledge about quill so far (which is a bit over a few weeks old now).
what i will try in the near future is to add a new module to show a page break and style all other elements accordingly to simulate the look of a page.
this is my first question on Stack Overflow,so I hope you can be friendly if I will make some mistakes.
I'm trying to learn a little bit of Gtk2.0 mechanisms. I'm a newbie with this library so I'm trying to construct a basic GUI.
I created a 230x150 window, attached a GdkPixbuf icon and learned how to trigger signals, in particular I'm interested on showing/hiding the icon on pressing of an arrow key.
I have achieved the objective of showing the icon but I'm not finding the way to hide this one. I looked at the documentation, but anything seems to be working.
I attach the code below so you can help me better. Thanks in advance for hints.
http://pastebin.com/iUJRc6hw
You should be able to hide the icon with gtk_widget_hide(app->icon).
I would like to insert an image inside a GtkLabel but the <image> tag doesn't exists in Pango. I also tried to using the hacky way that consist of having a <span class="image"></span> and setting it a background-image via the CSS but class="" isn't a valid Pango attribute.
My question is: Is their a way to insert an image inside a label ? Not before or after but inside. Basically i would like to add emojis in my instant messenger messages.
I searched the web, and here but doesn't found a solution that fit my needs. :/
Thanks in advance for replies.
It seem that doing this isn't possible. The proper way to do it seems to be using a GtkTextView. For peoples that are running into the same issue of me, just run gtk3-demo → Text View → Multiple Views.
I posted some full code of Pango's handling of images here. Pango's image handling is very limited but might be able to handle your simple requirements.
I'm using version 4.1.4
Is it possible to create a form having some fields with a background color ?
something like the next image.
Thanks
Alejandro
I wanted to put an easy answer to this one. This works with 4.1 too.
$form->getElement('yourfield')
->js(true)
->closest('.atk-form-row-line')
->css(array('background'=>'red'));
Of course there are many ways and styling of the forms is described here:
http://agiletoolkit.org/doc/form/styling
http://agiletoolkit.org/codepad/gui/formstyle
I work with a lot of floating-point images, and would find it extremely useful to have an image-based representation of my arrays. I'd like to create a WPF UserControl that renders the data array (as shown below) as an image, instead of a scrollable list of text values.
Is this possible? I have looked at the MDSN documentation on VS 2010 extensibility, at SO's list of VS 2010 extensions, and at this topic on creating a custom editor, but I'm a bit lost on where to start.
Update 1:
Thanks to Brian and Basarat Ali for the leads on DebuggerVisualizer. Looks like the correct strategy, EXCEPT that unfortunately a visualizer for any type of arrays is disallowed.
A work-around (of limited utility) is to visualize a wrapper object.
At Brian's suggestion, I have posted a solution on CodePlex:
VS2010 Debugger Visualizers Contrib (http://debuggervisualizers.codeplex.com/).
The project's source code demonstrates a working wrapper visualizer and a non-functional "raw" data visualizer for a 1D double[] array. Here's a screenshot of the test console running:
If anyone has any suggestions on how to work-around this problem, please let me know!
Also, any explanation of why System.Array cannot be visualized is welcome!
Update 2:
I just re-searched SO with the word DebuggerVisualizer, and find this to be previously asked. Looks like user Will Dean suggests implementing Project Mole's work-around using a WeakReference. Don't see how this would work in a DebuggerVisualizer, though.
Update 3:
Josh Smith of Project Mole just suggested a very helpful work around (thanks Josh!):
Note, you can use your ArrayWrapper approach without needing to modify your source code to open a visualizer. You can type this into the Watch window in VS:
new YourNamespace.ArrayWrapper(myArray);
Hit the Enter key, then you should see a magnifying glass icon in the Watch window next to that line of code. Click it to open your custom visualizer.
You should create a debugger visualizer. Here's a walkthrough : http://msdn.microsoft.com/en-us/library/ms164759.aspx . I believe that what you want is to be able to view all the results in an external program. For this you can just add an export option to you list to export as a csv file. However if you still feel you want a bitmap you can convert the list to an image using RenderTargetBitmap : http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.rendertargetbitmap.aspx
Since this is for runtime information in the debugger, you might consider a DebuggerVisualizer rather than an editor extension. There are some trade-offs, I am unclear which would be best for this.
(In any case, I think it is possible, and it does look useful, and I hope someone with a spare weekend hacks one out and posts the source code.)