Aller au contenu

Aymeric Marlange

  • Carnet
  • Contact

Edit text in the cursor line

This is a script for Drafts.

let [loc, len] = editor.getSelectedLineRange(),
  newStr = 'Hello World';
editor.setTextInRange(loc, len, newStr);
Cette entrée a été publiée dans le carnet, et marquée avec javascript, scripts, scripts4drafts, le 07/07/2023 par Aymeric.

Navigation des articles

← Get text in the cursor line Send text in the cursor line to iOS Reminders, edit it, and move the cursor to the end of edited line →
Fièrement propulsé par WordPress