Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <div class="flexbox">
  <div>
    名前<br>
    <input id="gcTextBox">
  </div>
  <div>
    電話番号<br>
    <input id="gcMask">
  </div>
</div>
              
            
!

CSS

              
                body { 
  font-family:sans-serif; 
  font-size:14px; 
  padding-bottom: 2rem; 
}
input,button,textarea,select { 
  font-size:inherit; 
}
input[type=checkbox],input[type=radio] { 
  margin-right:0.4rem; 
}
table.sample { 
  border-collapse:collapse; 
  margin-top:1rem; 
}
table.sample>tbody>tr>* { 
  padding:0.25rem 0.5rem; border:1px solid #D2D2D2; 
}
table.sample>tbody>tr>th { 
  text-align:left; 
  background:#F0F0F0; 
  font-weight:normal; 
}
.flexbox,.peoperty-panel { 
  display:flex; 
  flex-wrap:wrap; 
}
.flexbox>* { 
  margin:0 1rem 1rem 0; 
}
.peoperty-panel>* { 
  width:12rem; 
}
.peoperty-panel { 
  padding: 0.2rem 0.4rem 0.6rem; 
  background-color:#f8f9fa; 
  color:#212529; 
}
.peoperty-header { 
  padding: 0 0.4rem; 
  background:#343a40; 
  color:#fff; 
}
div.scroll { 
  height:11rem; 
  overflow:scroll; 
}
.nomargin { 
  margin:0 !important; 
}
body {
  padding-bottom: 12rem;
}
              
            
!

JS

              
                wijmo.setLicenseKey('GrapeCity-Internal-Use-Only,E796866772512648#B0IdMwSZzxWYmpjIyNHZisnOiwmbBJye0ICRiwiI34zdkZjdh9ESBVUMndkeUN4YZJ7M5ZWTJRVZ98WWKl4cW5ENMFVSlJzSxBnUEZncRZlbahmR4sGVDhmMVRmWkpHTUZjM8dFWjZmWvJWa5UFctVTQztka4QWc8A7cRJ7bIl7YC3SWLh5VQlUe8EXO5p7Z5pVV0B7ZFlFNZ3Gc6l7MV3WZ7UmRuJVOvITSEpHRudGOHd5ZRVFZMB7bFJWU0xmWJdjcwhXYi3EbRllRpNkZ9IEWzYjdlNnTTVVORFFN6dWViN5bBZUR9hmMrdESkBFeRFjS58kSYVmN6ZmYEpGa6xEaLVFOOZXZ98Wcw86RwgVQ7VUSmhEWxVzLHZDRzUTbF3CT7kGcNBnU9NmM4cGdhJnTyhTRyE4Rtl5bThXUWVmQRdnRmdjN6dFVINnUm34Yxo4ML5ma7UXekVWZyk5Sv8WN65kSsdEZWZUTQN4RVhXULtCRqJkI0IyUiwiIwgjN7MzNEVjI0ICSiwiNxQDMzMTO6QTM0IicfJye#4Xfd5nIJBjMSJiOiMkIsIibvl6cuVGd8VEIgQXZlh6U8VGbGBybtpWaXJiOi8kI1xSfiUTSOFlI0IyQiwiIu3Waz9WZ4hXRgAicldXZpZFdy3GclJFIv5mapdlI0IiTisHL3JyS7gDSiojIDJCLi86bpNnblRHeFBCI73mUpRHb55EIv5mapdlI0IiTisHL3JCNGZDRiojIDJCLi86bpNnblRHeFBCIQFETPBCIv5mapdlI0IiTisHL3JyMDBjQiojIDJCLiUmcvNEIv5mapdlI0IiTisHL3JSV8cTQiojIDJCLi86bpNnblRHeFBCI4JXYoNEbhl6YuFmbpZEIv5mapdlI0IiTis7W0ICZyBlIsIiMygTM7ADI5EDMxgTMwIjI0ICdyNkIsIybp9iblBXZk36YuMnLqIiOiMXbEJCLi8LpnrJvk/IvlrKomPqgjb8gjfrgjf9gjz1gjz0gjDrgjLiOiEmTDJCLlVnc4pjIsZXRiwiI8QjNyETNyczN6YDO6kzNiojIklkIs4nIyYHOxAjMioYIJV')

GC.InputMan.LicenseKey = "GrapeCity-Internal-Use-Only,E533581452858357#B0T8nyd92SaOJGMJRneVdXcXRlNrMGNnxUYoRVRrlVNNZ4Y4cTRYFUWyQmYlFzQ9lkTwFHdyUFTulFM5h7NiVUMhdVVyEkckJUO4VjVyVnQ8VTQkJkUDVUaKlEUzEWOn54V5VDdxc7dyVzSn5kaOVlZ4dWN7w4VJ96V6cVVRNDeVREWEtESrhzY4MkdiBTaxYnNvlGO8AVRvYEUjZGbw8EbKBVQDVFUyp5MNpFNywka5hjTENlcGNzURlzSWRDeZRHSFRESBpVcyM4LCJUV4JmWtNnYzcDTCNjTjZDMSlHcRRTcltCbxMUZzRnUwlmI0IyUiwiIEVENBdjQEdjI0ICSiwiM4YzN9UDM7ETM0IicfJye&Qf35VfioUSLljI0IyQiwiIyYHITpEIuFWT4VHculkI0IiTis7W0ICZyBlIsIyNyEzM5ADI5ITMxkTMwIjI0ICdyNkIsIybp9ibwR6YiojIz5GRiwiI+S09ayL9Pyb9qCq9jK88GO887K88XO882O88sO88wK88iojIh94QiwSZ5JHd0ICb6VkIsIyN5MDO5gjM5QTM8UzMzUjI0ICZJJye0ICRiwiI34TQMpnaBhWSkFVOBFkSQl6Rrl6LXZ6Y534d5pXRrR4NwtEUj3GetFUWyZzSUtmNXJXV9RmaYl5cOZHeJNUOpBHbOhzLoZkRhZ6V7h5dj9ESIRnaNN6Rq3kUrsGcuZFZNhkanNDTvYnPhqW"

// テキストコントロール
var gcTextBox = new GC.InputMan.GcTextBox(document.getElementById('gcTextBox'));

// ドロップダウンプラグイン
var gcDropDown1 = gcTextBox.createDropDown();
gcDropDown1.setWidth('auto');

var employees = [
  { id: 105, department: '第一営業', name: '森上 偉久馬', tel: '09011111111' },
  { id: 107, department: '第二営業', name: '葛城 孝史', tel: '09022222222' },
  { id: 110, department: '第一営業', name: '加藤 泰江', tel: '09033333333' },
  { id: 204, department: '営業開発', name: '川村 匡', tel: '09044444444' },
  { id: 207, department: '営業開発', name: '松沢 誠一', tel: '09055555555' },
  { id: 210, department: '営業一', name: '成宮 真紀', tel: '09066666666' },
];

// Wijmo FlexGridコントロール
var flexGrid1 = new wijmo.grid.FlexGrid(gcDropDown1.getElement().appendChild(document.createElement('div')), {
  itemsSource: employees,
  columns: [{
    binding: 'id',
    header: '社員ID',
    width: 60
  },
            {
              binding: 'department',
              header: '部署',
              width: 70
            },
            {
              binding: 'name',
              header: '名前',
              width: 100
            },
            {
              binding: 'tel',
              header: '電話番号',
              width: 120
            },
           ],
  selectionMode: wijmo.grid.SelectionMode.Row,
  headersVisibility: wijmo.grid.HeadersVisibility.Column,
  selectionChanged: function(sender, args) {
    gcTextBox.setText(employees[args.row].name);
    gcDropDown1.close();
  }
});
flexGrid1.hostElement.style.height = '140px';

// ドロップダウンを開いたときに再描画します
gcDropDown1.onOpen(function() {
  flexGrid1.refresh();
});

// マスクコントロール
var gcMask = new GC.InputMan.GcMask(document.getElementById('gcMask'));
gcMask.setFormatPattern('\\D{3}-\\D{4}-\\D{4}');

// ドロップダウンプラグイン
var gcDropDown2 = gcMask.createDropDown();
gcDropDown2.setWidth('auto');

// Wijmo FlexGridコントロール
var flexGrid2 = new wijmo.grid.FlexGrid(gcDropDown2.getElement().appendChild(document.createElement('div')), {
  itemsSource: employees,
  columns: [{
    binding: 'id',
    header: '社員ID',
    width: 60
  },
            {
              binding: 'department',
              header: '部署',
              width: 70
            },
            {
              binding: 'name',
              header: '名前',
              width: 100
            },
            {
              binding: 'tel',
              header: '電話番号',
              width: 120
            },
           ],
  selectionMode: wijmo.grid.SelectionMode.Row,
  headersVisibility: wijmo.grid.HeadersVisibility.Column,
  selectionChanged: function(sender, args) {
    gcMask.setValue(employees[args.row].tel);
    gcDropDown2.close();
  }
});
flexGrid2.hostElement.style.height = '140px';

// ドロップダウンを開いたときに再描画します
gcDropDown2.onOpen(function() {
  flexGrid2.refresh();
});
              
            
!
999px

Console