question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for manual resizing

See original GitHub issue

Sorry if this is a duplicate, but a quick search of the issue list found nothing that seemed related.

I was wondering if CodeMirror could be made to support the CSS resize attribute. So that I could write something like this:

.CodeMirror-scroll
{
    resize: vertical;
}

In the current release (2.34), this actually renders a resize handle, but I can’t move it. Or am I just doing it wrong?

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:17 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
JoseTadeuMarquescommented, Apr 4, 2018

@Sphinxxxx use cm-resize 😃

3reactions
lunakidcommented, Apr 25, 2018

Guys, it’s a bit too early for the celebration just yet. 😉

@JoseTadeuMarques, unfortunately, what you see is not what you think: the CM instance is not actually resizing just by setting the CSS. What you describe and what you saw is only a HTML DIV resizing (which is quite unsurprising, adding a CSS rule for just that).

To understand what CM resizing really means, i.e. resizing the actual CM Javascript object (with all its geometry-related internal state), rather than just resizing a HTML box on the screen, see e.g. my demo at CodePen, where e.g. the line numbers + line wrapping clearly evidences how the editor properly recalculates its state with that method – which was necessary exactly because just setting CSS resize does not cut it. (I.e. it will not pass resize events to the CM instance to get it recalculate its state!)

(For those who want to understand the mechanics, please see the details in my original comment above.)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add support for manual resizing · Issue #850 · codemirror ...
I'd like to just have a simple drag-handle, a bar running along the bottom edge of the editor, that the user can drag...
Read more >
But you can manually fix it | Resizable BAR Review - YouTube
Link to Nvidia Profile Inspector for adding resize BAR support to games: https://github.com/Orbmu2k/nvidiaProf... My system: CPU: AMD Ryzen ...
Read more >
Resize a picture, shape, text box, or other object
You can change the size of pictures, shapes, text boxes, or other objects by either dragging the object frame or typing exact sizes....
Read more >
resize - CSS: Cascading Style Sheets - MDN Web Docs - Mozilla
The resize CSS property sets whether an element is resizable, ... Support on block level, replaced, table cell, or inline block elements.
Read more >
Manually resizing a running cluster - Amazon EMR
Choose the Amazon EC2 instance type, enter the number of instances for the task group, then select Add task instance group to return...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found